js 初始化如下,
AddArticle.editor = Util.newVditor({ id: 'articleContent', cache: Label.articleOId ? false : true, preview: { mode: 'both', }, resize: { enable: false, }, //height: 360, counter: 4096, placeholder: $('#articleContent').data('placeholder'), input: function () { if (Label.articleType === 3) { var postData = JSON.parse(localStorage.postData) prevValue = localStorage.getItem('vditorarticleContent') || '' AddArticle.recordThought(prevValue, postData) localStorage.postData = JSON.stringify(postData) } }, })
结果显示如下图所示,
分析了一波,和官方的 static 例子对比,工具的 item 都没有设置左浮动布局,工具栏缺少了类标记 class="vditor-toolbar__item"。有哪位大佬知道原因呢?怎么破
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于