繁体   English   中英

如何使用ckeditor更新php ajax中的textarea值?

[英]how to update textarea value in php ajax with ckeditor?

我在我的网站中使用 CkEditor。

当我在 textarea 字段中使用 php ajax 更新数据库中的数据但数据未显示 textarea 字段时。 但是没有 ckeditor 我的代码运行完美。 请帮我 !!

您需要使用CkEditor设置数据方法文档

CKEDITOR.instances.editor1.setData(data.desc);

$.ajax({ type: "POST", url: "function/fetch.php", dataType: "html", data: {updateEmailTemplateID: id,UserID:UserID }, success: function (response) { response = JSON. parse(response); $('input[name="Updatetitle"]').val(response.title); CKEDITOR.instances.editor2.setData(response.description); $('#Update').modal('展示'); } });

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM