Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Latest commit

 

History

History
37 lines (29 loc) · 714 Bytes

markdown.md

File metadata and controls

37 lines (29 loc) · 714 Bytes

Markdown-It

Get the markdown-it object of mavonEditor

method 1: Global Registration

  import mavonEditor from 'mavon-editor'
  Vue.use(mavonEditor)
  ...
  mavonEditor.markdownIt

method 2: Local Registration

  import {mavonEditor} from 'mavon-editor'
  mavonEditor.getMarkdownIt()
  or
  mavonEditor.mixins[0].data().s_markdown

method 3: Use mavonEditor ref

   <mavonEditor ref=md></mavonEditor>
   ...
   this.refs.md.markdownIt

Use markdown-it object

eg: set the line break style

    // get markdownIt as above
    markdownIt.set({ breaks: false });

markdown-it API