开发者

Adding Imagemanager Plugins into tinyMce RTE

开发者 https://www.devze.com 2023-04-04 00:05 出处:网络
Anybody know how to add the \'imagemanager\' and \'filemanager\' plugins into tinyMce..?? I\'ve read the documentation fro开发者_如何学Pythonm tinyMCE, but it didn\'t help.

Anybody know how to add the 'imagemanager' and 'filemanager' plugins into tinyMce..??

I've read the documentation fro开发者_如何学Pythonm tinyMCE, but it didn't help.

thx...


  1. Copy both manager folders to \tinymce\jscripts\tiny_mce\plugins\

  2. Put init javascript in your js folder. An example of tm_init.js content :

    var tm_c = {
        script_url : '/js/tinymce/jscripts/tiny_mce/tiny_mce.js',
        theme : "advanced",
        plugins : "imagemanager,paste,searchreplace",
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,cut,copy,paste,|,search,replace,|,removeformat,|,insertimage",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : "",
        theme_advanced_buttons4 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : false,
        template_external_list_url : "lists/template_list.js",
        external_link_list_url : "lists/link_list.js",
        external_image_list_url : "lists/image_list.js",
        media_external_list_url : "lists/media_list.js"
    }
    
  3. Include this init.js and tinimce in your html

    <script type="text/javascript" src="/js/tinymce/jscripts/tiny_mce/jquery.tinymce.js></script>
    <script type="text/javascript" src="/js/tm_init.js"></script>
    
  4. Make the textarea a tinymce editor:

    $("#content").tinymce(tm_c);
    
0

精彩评论

暂无评论...
验证码 换一张
取 消