TinyFCK = TinyMCE + FileManager
TinyFCK is the TinyMCE editor merged with the FCKEditor's file manager/uploader.
More information about TinyFCK can be found at http://p4a.sourceforge.net/tinyfck
To make it work with tinymce.module and Drupal only a few changes are necessary.
This is a step by step instruction to install TinyFCK on Drupal.
1. Download and install latest TinyMCE package from drupal.org
(as you normally do for tinymce module)
2. Download TinyFCK package from http://p4a.sourceforge.net/tinyfck#download
and unpack it.
3. Replace the content of modules/tinymce/tinymce/jscripts/tiny_mce with
the content of TinyFCK package.
4. Enable php connector in TinyFCK. Goto tiny_mce/filemanager/connectors/php and
open config.php for editing. Two lines must be changed here. Point UserFilesPath
to your Drupal directory where your images should be stored, e.g. /files/.
(来源www.iocblog.net)
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/files/' ;5. Patch/Change tinymce.module to include a filebrowser callback. Open the module
in an editor and goto line 156 (v 1.77 2006/03/07). Change the content of
$tinymce_invoke = <<<EOD ... EOD; to the following code ...
(patch for tinymce.module is attached to the posting)
tinyMCE.init({
$tinymce_settings,
file_browser_callback : "fileBrowserCallBack"
});(来源www.iocblog.net)
function fileBrowserCallBack(field_name, url, type, win) {
var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
var enableAutoTypeSelection = true;
var cType;
tinyfck_field = field_name;
tinyfck = win;
switch (type) {
case "image":
cType = "Image";
break;
case "flash":
cType = "Flash";
break;
case "file":
cType = "File";
break;
}
if (enableAutoTypeSelection && cType) {
connector += "?Type=" + cType;
}
window.open(connector, "tinyfck", "modal,width=600,height=400");
}That's all you need to do ;) Hope you like it ...
I think FCKEditor's FileManager is a great addition to TinyMCE.
Regards, Thilo
文章整理:iocblog
版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。