在webpack的模塊化構建當中,使用vue開發在組件內import了ueditor,第一次打開或刷新頁面,ueditor是正常渲染的ueditor渲染在一個彈窗當中,彈窗關閉后,ueditor被銷毀,再次打開彈窗,則ueditor沒有被渲染由于是spa應用,許多時候沒有被刷新,那么,怎么讓ueditor多次渲染?而避免刷新呢?import '../../static/ueditor/ueditor.config.js'import '../../static/ueditor/ueditor.all.js'import '../../
static/ueditor/lang/zh-cn/zh-cn.js'
// 在mounted中執行
UE.getEditor('content', {
UEDITOR_HOME_URL: __dirname + 'static/ueditor/',
serverUrl: config.ajaxUrl + '/ueditor/jsp/controller.jsp',
autoHeight: false,
initialFrameHeight: '250',
emotionLocalization: true,
scaleEnabled: true,
toolbars: [[
'fullscreen','undo', 'redo','emotion','bold', 'italic', 'underline','forecolor',
'backcolor','insertimage','blockquote','justifyleft', 'justifycenter', 'justifyright','inserttable'
]]
});模板:<script id="content" name="content" type="text/plain"></script>very much Thanks in advance.
在vue中,如何多次調用ueditor?
郎朗坤
2018-10-08 11:29:43