Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/244.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用ajax将数据从Tinymce保存到php_Javascript_Php_Jquery_Html_Ajax - Fatal编程技术网

Javascript 使用ajax将数据从Tinymce保存到php

Javascript 使用ajax将数据从Tinymce保存到php,javascript,php,jquery,html,ajax,Javascript,Php,Jquery,Html,Ajax,我正在应用程序中使用TinyMCE 我想使用ajax将TinyMCE中输入的数据保存到php中 在发送到ajax之前,我尝试过使用tinyMCE.triggerSave(),但是当添加了一些表情符号图像时,我得到了图像的输出为[img]链接[/img]完成了这个html注册在浏览器中输出为html时这种类型的编码 如何将数据以html格式保存到db 我的剧本 tinymce.init({ selector:'textarea#chat_message', theme: "mode

我正在应用程序中使用TinyMCE

我想使用ajax将TinyMCE中输入的数据保存到php中

在发送到ajax之前,我尝试过使用
tinyMCE.triggerSave()
,但是当添加了一些表情符号图像时,我得到了图像的输出为
[img]链接[/img]
完成了这个html注册在浏览器中输出为html时这种类型的编码

如何将数据以html格式保存到db

我的剧本

tinymce.init({
    selector:'textarea#chat_message',
    theme: "modern",
    menubar: false,
    width:900,
    height:100,
    statusbar: false,
    plugins: [
        "save advlist autolink lists link image charmap print preview anchor",
        "searchreplace spellchecker visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste emoticons bbcode  anchor lists"
    ],
    toolbar:" save bold italic | bullist numlist outdent indent | autolink | link | image | lists | charmap | anchor | spellchecker | wordcount visualblocks | visualchars | table | directionality | emoticons | paste |  spellchecker | bbcode | code |",
entity_encoding: 'raw'
});
$(“#chat_message”).html()
将为您提供实际内容(无需剥离html标记)