outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
https://www.getoutline.com
BSD 3-Clause "New" or "Revised" License
2.87k stars 590 forks source link

feat: Give the possibility to add custom rules to markdown-it instance #563

Closed stefanoimperiale closed 2 years ago

stefanoimperiale commented 2 years ago

It could be great to give the possibility to add a custom rule to markdown-it instance in the ExtensionManager. For instance, I need to add the capability to parse footnotes, using the markdown-it-footnote library but it must be used as a plugin of markdown-it.

tommoor commented 2 years ago

This is cool, I actually think it would be good to take the existing rules and attach them to the right extension rather than being centralized while we're at it – are you open to that?

stefanoimperiale commented 2 years ago

Ok, I'm on it. I moved the rules in a specific directory, and attach them to the relative extension (e.g. the underline rule is not under the Underline.ts file)