[英]PHP & Ajax - how to transfer value of textarea to textbox when value is not empty
[英]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.