数据库中未显示 Tinymce 格式的内容

Tinymce formatted content not displayed from database

您好,我在单个页面中有很多 tinymce 编辑器。当我在 tinymce 中格式化内容并将其保存到数据库中时。所有标签都保存在 mysql 中。但是在编辑时我从数据库中获取数据但是一些 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,
    });

必须进行某种过滤或消毒。

从数据库中获取数据后,您可能已经strip_tags使用了。