Tui.editor: Can't access markdown-it object, therefore can't add extra markdown-it plugins

Created on 4 Jan 2018  路  1Comment  路  Source: nhn/tui.editor

First let me start with: awesome work on TUI editor!

I'm trying to add a markdown-it plugins (for example: https://github.com/nunof07/markdown-it-alerts), but don't have access to the markdown-it instance. I've loaded TUI editor through Webpack.

Any idea how I can accomplish this?

Question

Most helpful comment

You can access markdownit object like below

tui.Editor.markdownitHighlight.use(markdownitPlugin);

beware! It's not documented because modifying markdownit object from outside can affects tui-editor behaviors unexpectedly.
And the markdown object only works for viewer and preview. not for wysiwyg editor view.

Thank you for your interest in tui-editor!

>All comments

You can access markdownit object like below

tui.Editor.markdownitHighlight.use(markdownitPlugin);

beware! It's not documented because modifying markdownit object from outside can affects tui-editor behaviors unexpectedly.
And the markdown object only works for viewer and preview. not for wysiwyg editor view.

Thank you for your interest in tui-editor!

Was this page helpful?
0 / 5 - 0 ratings