将Imagemanager插件添加到tinyMce RTE中

时间:2011-09-12 07:54:13

标签: php

有人知道如何将'imagemanager'和'filemanager'插件添加到tinyMce中。??

我已经阅读了tinyMCE的文档,但它没有帮助。

... THX

1 个答案:

答案 0 :(得分:0)

  1. 将两个经理文件夹复制到\tinymce\jscripts\tiny_mce\plugins\

  2. 将init javascript放入js文件夹中。 tm_init.js内容的一个示例:

    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. 在您的html中加入init.jstinimce

    <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. textarea成为一个名人编辑:

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