0
嗨我在單頁中有許多tinymce編輯器。當我在tinymce中格式化內容並將其保存到數據庫中時。所有的標籤都保存在mysql中。但在編輯時,我從數據庫獲取數據,但某些tinymce(不是全部)無法讀取標籤,並且它顯示的內容沒有格式化。我的初始化是:Tinymce格式化的內容不能從數據庫中顯示
tinymce.init({
selector: "textarea", theme: "modern", width: "100%", height: 300,
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor responsivefilemanager code",
"paste"
],
paste_retain_style_properties: "all",
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_caption: true,
image_advtab: true,
external_filemanager_path: "<?php echo base_url(); ?>" + "tinymce/file_manager/filemanager/",
filemanager_title: "Responsive Filemanager",
external_plugins: {"filemanager": "<?php echo base_url(); ?>" + "tinymce/file_manager/filemanager/plugin.min.js"},
document_base_url : "<?php echo base_url(); ?>",
relative_urls : false,
remove_script_host : false,
});
將數據保存到數據庫時的數據看起來像什麼樣,當它恢復時它看起來像什麼? – beerwin
當我保存在數據庫中我有標籤的內容,但是當我獲取我沒有看到任何標籤只有文本。 – user254153
您必須對該字段進行一些過濾/清理。 – beerwin