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

Specify default config in initial import? #202

Open Tsaukpaetra opened 2 years ago

Tsaukpaetra commented 2 years ago

Hello, I am trying to specify default configuration, such as disable toc and save button

This is my attempt, but it seems to not have any effect?

import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import kancenUS from '@kangc/v-md-editor/lib/lang/en-US';
VueMarkdownEditor.lang.use('en-US', kancenUS);
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
VueMarkdownEditor.use(vuepressTheme, {
    config: {
        'disabled-menus': ['save', 'toc']
    }
});
Vue.use(VueMarkdownEditor)

The documentation is not very understandable how to accomplish this?