Adds a markdown editor to Canvas
This userscript allows you to write your Canvas assignments and pages in Markdown.
To install this user script, you will need a userscript manager, such as Tampermonkey.
Whenever a Canvas text field is detected, a couple of buttons will be placed next to the HTML editor button.
Clicking on the Markdown button (M🠗) will open the Markdown editor. Click it again to close the editor.
The editor has two modes: Pretty and raw.
There is also a settings button (M⚙) that allows you to customize the styles of certain elements in the output. These settings are saved in your browser's local storage.
You can also download the settings as a JSON file and upload them again on another device or browser.
This user script stores the Markdown source embedded in the HTML value for the assignment as a comment. Changes made to the assignment in the Canvas UI will not be reflected in the Markdown source. Switching back to the Markdown editor will overwrite the HTML value with the Markdown source.
This user script relies on third-party libraries to function. These libraries are imported during runtime from the following sources: (See the /lib
directory for more information)