关于Uediter无法获取初始值的解决办法


Uediter 组件添加 属性 :v-if=”!loading”

<Uediter :text=”form.article_content” :config=”ueditor.config” @contentChange=”contentChangeFunc” ref=”ue” v-if=”!loading”>

在uniapp中用接口获取Uediter内容不生效

可以使用<textarea name=”article_content” id=”myEditor”>{{form.article_content}}</textarea>,然后js中加载

setTimeout(function(){
var editor = new UE.ui.Editor();
editor.render(“myEditor”);
},500)

提交时获取值:

let ue = UE.getEditor(‘myEditor’);
params.article_content = ue.getContent();


发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注