2

在阅读了所有文档并逐步按照说明进行操作后,我正在使用 TinyMce 4 的justboil.me插件。该插件完美地将图像上传到正确的路径,但它没有显示在编辑器上。当我在 tinyMce 中看到 HTML 输出时,根本没有图像标签。

这是我的TinyMce配置:

<script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script>
tinymce.init({
selector:"textarea",
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste jbimages"
],
external_plugins: {
    "jbimages": "http://root.flubby.org/apps/tiny_mce/plugins/jbimages/plugin.min.js"
    },
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link jbimages",
relative_urls: false
    });
</script>

注意:我在一个完全不同的域上运行这个脚本。我认为它不会影响,因为插件正在运行并上传图像。只是没有将其添加到内容的最后一步。

有任何想法吗?非常感谢阅读 =)

4

2 回答 2

3

您可以使用此代码

tinymce.init({
    imageupload_url: "../upload/",
    selector: "textarea",
    theme: "modern",
    language: "en",
    plugins: [
         "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
         "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
         "save table contextmenu directionality emoticons template paste textcolor imageupload"
    ],
    content_css: "css/content.css",
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons imageupload", 
    relative_urls: false
}); 
于 2016-01-16T20:57:56.007 回答
1

这是我的配置,希望对您有所帮助:)

   <script src="../js/tinymce/tinymce.min.js"></script>
   <script>
   tinymce.init({
   height           : 240,
   width            : 900,
   selector         : "textarea",
   plugins      : "jbimages table link autolink charmap print preview searchreplace code",
   toolbar      : "undo redo | bold italic underline charmap searchreplace | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect table | link code | jbimages preview",
   menubar          : false,
   relative_urls    : false
   });
   </script>
于 2014-08-14T07:11:37.583 回答