限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。
当前位置:首页 >前端技术 >Html/Css

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

分类:Html/Css时间:2025-02-18浏览:826
以下是详细代码,支持多个编辑器
< 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
Share your thoughts respectfully.