在DB中,如下。
<img src="../../../../assets/images/frontpage/big_tree.jpg" alt=""
width="516" height="200" />
但是当在tinyMCE中时,所有的<、>和"都变成这样的html实体。 所以在FF中不显示。
<img src="../../../../assets/images/frontpage/big_tree.jpg"
alt="" width="516" height="200" />
如何避免这个问题?
我有以下tinyMCE init
tinyMCE.init({
mode : "textareas",
/* // if I want to add to a specific area then use this
mode : "specific_textareas",
editor_selector : "mceEditor", // add class="mceEditor" where you want to add tinyMCE
*/
theme : "advanced",
plugins : "advimage,advlink,media,contextmenu",
//theme_advanced_buttons1_add_before : "newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,forecolor,backcolor,liststyle",
theme_advanced_buttons2_add_before: "cut,copy,separator,",
theme_advanced_buttons3_add_before : "",
theme_advanced_buttons3_add : "media",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
//extended_valid_elements : "hr[class|width|size|noshade]",
extended_valid_elements : "span[class|align|style]",
file_browser_callback : "ajaxfilemanager",
paste_use_dialog : false,
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : true,
apply_source_formatting : true,
force_br_newlines : true,
force_p_newlines : false,
relative_urls : true
});
提前致谢。
最佳答案
在 php 中你可以使用 html_entity_decode .
关于tinymce - < 并将引号更改为 tinyMCE 中的 HTML 实体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10152840/