限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。

Html/Css

ueditor编辑器html模式下无法保存内容,支持多编辑器

以下是详细代码,支持多个编辑器 < script id="zf_2019701550_1739870122" ueditor="zf_2019701550_1739870122" class="zfcms_ueditor" name="content" type="text/plain" > var ue = UE.getEditor("zf_2019701

作者
王明昌
发布时间
最后更新
以下是详细代码,支持多个编辑器
< script id="zf_2019701550_1739870122" ueditor="zf_2019701550_1739870122" class="zfcms_ueditor" name="content" type="text/plain" >

var ue = UE.getEditor("zf_2019701550_1739870122",{
initialFrameHeight:350,
scaleEnabled:false
});
if(!ueditor_ids){
var ueditor_ids = [];
}
ueditor_ids.push("zf_2019701550_1739870122");

然后保存的时候使用
if(typeof ueditor_ids !== 'undefined' && ueditor_ids.length > 0){
for(var i = 0; i < ueditor_ids.length; i++){
if(UE.getEditor(ueditor_ids[i]).queryCommandState('source')!=0){
UE.getEditor(ueditor_ids[i]).execCommand('source');
}
}
}
0/500
友善分享您的看法。
反馈邮箱