code-farmer-i / vue-markdown-editor

A markdown editor built on Vue
https://code-farmer-i.github.io/vue-markdown-editor/
MIT License
1.1k stars 109 forks source link

Plugins & preview #220

Open ajmas opened 1 year ago

ajmas commented 1 year ago

I am having issue using the 'to do' plugin with the preview component. The issue is that despite loading the plugin, in the same way as the editor, it does not seem to getting applied to the output. Expectation is to see the rendered checkbox. Instead it looks like it would if the plugin was not applied.

I am using version 2.3.15

Registration:

import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';

import createTodoListPlugin from '@kangc/v-md-editor/lib/plugins/todo-list/index';
import '@kangc/v-md-editor/lib/plugins/todo-list/todo-list.css';

VMdPreview.use(createTodoListPlugin());
VMdPreview.use(vuepressTheme, { });

app.use(VMdPreview);

and then in a vue component:

<v-md-preview :text="note" />