You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
2.2 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dd3b1"],{8102:function(a,t,s){"use strict";s.r(t);var n=function(){var a=this;a._self._c;return a._m(0)},e=[function(){var a=this,t=a._self._c;return t("div",[t("h1",[a._v("Markdown parse")]),t("blockquote",[t("p",[a._v("v0.4.7+")])]),t("p",[a._v("Provides methods for importing and exporting "),t("code",[a._v("Markdown")]),a._v(" files.")]),t("h2",[a._v("Import")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[a._v("import")]),a._v(" markdown "),t("span",{staticClass:"hljs-keyword"},[a._v("from")]),a._v(" "),t("span",{staticClass:"hljs-string"},[a._v("'simple-mind-map/src/parse/markdown.js'")]),a._v("\n")])]),t("p",[a._v("If you are using the file in the format of "),t("code",[a._v("umd")]),a._v(", you can obtain it in the following way:")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-tag"},[a._v("<"),t("span",{staticClass:"hljs-name"},[a._v("script")]),a._v(" "),t("span",{staticClass:"hljs-attr"},[a._v("src")]),a._v("="),t("span",{staticClass:"hljs-string"},[a._v('"simple-mind-map/dist/simpleMindMap.umd.min.js"')]),a._v(">")]),t("span",{staticClass:"hljs-tag"},[a._v("</"),t("span",{staticClass:"hljs-name"},[a._v("script")]),a._v(">")]),a._v("\n")])]),t("pre",{staticClass:"hljs"},[t("code",[a._v("simpleMindMap.markdown\n")])]),t("h2",[a._v("Methods")]),t("h3",[a._v("transformToMarkdown(data)")]),t("ul",[t("li",[t("code",[a._v("data")]),a._v(": Mind map data can be obtained using the "),t("code",[a._v("mindMap.getData()")]),a._v(" method.")])]),t("p",[a._v("Convert mind map data into "),t("code",[a._v("Markdown")]),a._v(" format data, and the returned data is a string.")]),t("h3",[a._v("transformMarkdownTo(mdContent)")]),t("ul",[t("li",[t("code",[a._v("mdContent")]),a._v(": The "),t("code",[a._v("Markdown")]),a._v(" data to convert, string type.")])]),t("p",[a._v("Convert the "),t("code",[a._v("Markdown")]),a._v(" string into node tree data and return a "),t("code",[a._v("Promise")]),a._v(" instance. You can use the "),t("code",[a._v("mindMap.setData()")]),a._v(" method to render the converted data onto the canvas.")])])}],o={},d=o,i=s("2877"),r=Object(i["a"])(d,n,e,!1,null,null,null);t["default"]=r.exports}}]);