TinyMce的JBimages插件不插入图像

时间:2014-05-27 10:17:20

标签: wysiwyg tinymce-4 justboil.me

在阅读完所有文档后,我正在使用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>

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

有什么想法吗?非常感谢阅读=)

2 个答案:

答案 0 :(得分: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
}); 

答案 1 :(得分: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>