Php Ckeditor通过ajax表单提交方法发布html内容
我有一个带有ckeditor的简单表单textarea,它是Php Ckeditor通过ajax表单提交方法发布html内容,php,ajax,forms,ckeditor,Php,Ajax,Forms,Ckeditor,我有一个带有ckeditor的简单表单textarea,它是 <textarea class="form-control ckeditor" name="ex" id="ex">My Description</textarea> and this the content getting by alert. <p>My description</p> 我的描述 这是通过警报获取的内容。 我的描述 现在我通过malsupajax表单提交方法将表单
<textarea class="form-control ckeditor" name="ex" id="ex">My Description</textarea>
and this the content getting by alert.
<p>My description</p>
我的描述
这是通过警报获取的内容。
我的描述
现在我通过malsupajax表单提交方法将表单提交到后端文件。但是我在$\u POST['ex'中没有得到这个值代码>
var\u dump($\u POST['ex'])
提供空字符串。
我还尝试了htmlentities()
,但它不起作用。如何将此说明插入到mysql
数据库中。因为它不是字符串。我需要这个后端文件的描述
有人能给我举一个这个流程的例子吗。CKEditor创建了一个iframe来替换textarea,而实际的textarea没有被使用。您可能需要做的是在提交之前更新textarea
for(var instanceName in CKEDITOR.instances)
{
CKEDITOR.instances[instanceName].updateElement();
}
然后在服务器端,只需执行您的操作
echo $_POST['ex'];
textarea内容是空的,内容不在里面吗?@MaK是一个生成html内容的ckeditor。它应该是php变量。谢谢,请告诉我这里的instanceName是什么。它只是一个变量,由循环为CkeditorTanks中的每个实例设置,以供回复。