简体   繁体   English

TinyMCE映像工具不起作用

[英]TinyMCE Image Tools Not Working

I cannot seem to get the imagetools plugin to load with TinyMCE 4.2.5. 我似乎无法使用TinyMCE 4.2.5加载imagetools插件。 I have downloaded TinyMCE 4.2.5 and installed it in my root site /tinymce . 我已经下载了TinyMCE 4.2.5并将其安装在我的根站点/tinymce

Here's my code: 这是我的代码:

<script src="~/tinymce/tinymce.min.js"></script>

<script type="text/javascript">

    tinymce.init({
        selector: "textarea",
        theme: "modern",
        plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor colorpicker textpattern imagetools"
        ],
        toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
        toolbar2: "print preview media | forecolor backcolor emoticons",
        image_advtab: true,
        templates: [
            { title: 'Test template 1', content: 'Test 1' },
            { title: 'Test template 2', content: 'Test 2' }
        ]
    });

</script>

Yet, when I paste an image into the editor, click on it, there are no image tools. 但是,当我将图像粘贴到编辑器中时,单击它时,没有图像工具。 I've verified the imagetools plugin exists in in the plugins directory and there are no errors in the browser console when the editor loads. 我已经验证了imagetools插件存在于plugins目录中,并且在加载编辑器时浏览器控制台中没有错误。 It is like the feature is simply disabled. 就像该功能只是被禁用。

I've also tried this with 4.2.5. 我也尝试使用4.2.5。 I've tried this with Firefox and Chrome. 我已经尝试过使用Firefox和Chrome浏览器。 It simply doesn't work. 它根本不起作用。

This is what it supposed to do: 这是应该做的:

http://ephox.com/resources/blog/tinymce-4.2-released#.Vgg9cJeTQ0w http://ephox.com/resources/blog/tinymce-4.2-released#.Vgg9cJeTQ0w

As it turns out, the image tools will only load if your image is loading from the same domain as the TinyMCE script does. 事实证明,仅当您的图像与TinyMCE脚本来自同一域中加载时,才会加载图像工具。

Here's some more information directly from Ephox: 这是直接从Ephox获得的更多信息:

http://www.tinymce.com/forum/viewtopic.php?id=36139 http://www.tinymce.com/forum/viewtopic.php?id=36139

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM