webpackJsonp([1],{0:function(t,e){},"2s8v":function(t,e){},NHnr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("woOf"),r=i.n(n),o=i("NiRt"),a=i.n(o),s=(i("xuTp"),{name:"markdown-editor",data:function(){return{editor:null,html:""}},props:{value:String,name:String,previewClass:String,autoinit:{type:Boolean,default:function(){return!0}},highlight:{type:Boolean,default:function(){return!1}},sanitize:{type:Boolean,default:function(){return!1}},configs:{type:Object,default:function(){return{}}}},mounted:function(){this.autoinit&&this.initialize()},activated:function(){var t=this.editor;t&&((t.isSideBySideActive()||t.isPreviewActive())&&t.toggleFullScreen())},methods:{initialize:function(){var t=r()({element:this.$el.firstElementChild,initialValue:this.value,renderingConfig:{}},this.configs);console.log(this.configs),t.initialValue&&this.$emit("input",t.initialValue),this.highlight&&(t.renderingConfig.codeSyntaxHighlighting=!0),this.editor&&(this.editor=null),this.editor=new a.a(t);var e=this.previewClass||"";this.addPreviewClass(e),this.bindingEvents()},defaultTools:function(){var t=this;return[{name:"custom",action:function(){t.$refs.NaTitle.isShow=!t.$refs.NaTitle.isShow},className:"fa fa-bars",title:"Title"}]},bindingEvents:function(){var t=this;this.editor.codemirror.on("change",function(){var e=t.editor.value();t.$emit("input",e),t.html=t.editor.markdown(e)})},addPreviewClass:function(t){var e=this.editor.codemirror.getWrapperElement(),i=document.createElement("div");e.nextSibling.className+=" "+t,i.className="editor-preview "+t,e.appendChild(i)}},destroyed:function(){this.editor=null},watch:{value:function(t){t!==this.editor.value()&&this.editor.value(t)},configs:function(){this.initialize()}}}),u={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"markdown-editor",attrs:{id:"markdown-editor"}},[e("textarea",{attrs:{name:this.name}})])},staticRenderFns:[]};var l=i("VU/8")(s,u,!1,function(t){i("na8d")},"data-v-b66cf246",null).exports,d={name:"vue-freemde",data:function(){return{markValue:"",defaultConfigs:{}}},props:{value:{type:String,default:""},configs:{type:Object,default:function(){}}},components:{Editor:l},methods:{onRefresh:function(){this.editor.codemirror.refresh()}},mounted:function(){this.markValue=this.value,this.defaultConfigs=this.configs},computed:{editor:function(){return this.$refs.Editor.editor}},watch:{configs:function(){},markValue:function(t){var e=this;this.value!==t&&this.$emit("input",t),this.$nextTick(function(){e.editor.codemirror.refresh()})},value:function(t){t!==this.markValue&&(this.markValue=t)}}},c={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"main-content"}},[i("editor",{ref:"Editor",attrs:{configs:t.configs},model:{value:t.markValue,callback:function(e){t.markValue=e},expression:"markValue"}})],1)},staticRenderFns:[]};var f=i("VU/8")(d,c,!1,function(t){i("2s8v")},"data-v-6d4d26bc",null).exports;e.default=f;f.install=function(t){t.component(f.name,f)},"undefined"!=typeof window&&window.Vue&&window.Vue.component(f.name,f)},na8d:function(t,e){},xuTp:function(t,e){}},["NHnr"]);
//# sourceMappingURL=app.3215f095e8f162afbf9e.js.map