Markdown Plugins

Hi. I think it would be interesting to have the possibility to add Markdown plugins to extend the syntax.
It should be relatively simple since Joplin uses markdown-it that supports plugins.
This could also solve Make [TOC] available in markdown
What do you think?


This sounds like a great idea. There are a few feature requests open that could be solved by allowing to activate plugins.

However, I’m afraid that this could create an opening to new attack vectors, which makes the app less secure. Depending on the plugins, I could be wrong though.

1 Like

Well I think it’s up to the users to install only plugins that they know to be secure… Of course this kind of plugins need to access the text to analyze it. Maybe the plugins functionality could be disabled by default so user can enable it only if needed and prevent execution of plugins they’re not aware of.

@laurent what do you think about this idea? Is this something you’d consider?

Not sure at this point, maybe something to consider if many people are interested in it.

It would make a lot of things easier for you as well.

The following FRs could be solved by plugins (I could have missed some):

1 Like

mermaid PlugIn to e.g support gantt-charts etc. would be great. - Jens

Adding plugins is unfortunately not that easy. I've been trying to get the markdown-it-table-of-contents working to no avail.
I've looked into other implementations and there only the plugin has to be activated and that's it. Joplin uses its own renderToken function that makes it a bit more complicated. At least I have not been able to get it to work.

But hey, any help would be appreciated. :wink: If you know how to add new token parsing to a custom renderer, please do so. I'm stuck and any help will certainly move this further along.

@tessus really? Well, I'm glad I wasn't the only one who failed to do that, then. Thanks. :smiley: