From bbfc0a295510508365bb8ea751f7eb791bba673c Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Mon, 6 Jul 2009 18:46:46 +0200 Subject: [PATCH] [svn r21816] FS#2867 - The FCKEditor: A correction in the the php-initialization script. Starting to move toolbar related data from the js configuration file to the php one. --- main/inc/lib/fckeditor/fckeditor.php | 4 ++ main/inc/lib/fckeditor/myconfig.php | 69 ++++++++++++++++++++++------ 2 files changed, 58 insertions(+), 15 deletions(-) diff --git a/main/inc/lib/fckeditor/fckeditor.php b/main/inc/lib/fckeditor/fckeditor.php index ed4aa6b16c..89033ec40d 100644 --- a/main/inc/lib/fckeditor/fckeditor.php +++ b/main/inc/lib/fckeditor/fckeditor.php @@ -197,6 +197,10 @@ class FCKeditor $config = $this->get_default_configuration(); $this->read_configuration($config); + if ((api_is_allowed_to_edit() || api_is_platform_admin()) && isset($this->Config['BlockCopyPaste'])) { + $this->Config['BlockCopyPaste'] = false; + } + // 4-th level // Configuration settings from myconfig.js. // This file may be modified for customization purposes. diff --git a/main/inc/lib/fckeditor/myconfig.php b/main/inc/lib/fckeditor/myconfig.php index df88bd0d90..569a48dd8f 100644 --- a/main/inc/lib/fckeditor/myconfig.php +++ b/main/inc/lib/fckeditor/myconfig.php @@ -33,21 +33,38 @@ * Editor's toolbar definitions. */ +/* + * Platform administrator's tools + */ + +// Edit platform home page. $config['ToolbarSets']['EditHomePage'] = array( array( - 'FitWindow', 'PasteWord', 'Link', 'Unlink', 'Anchor', '-', - 'Image', 'flvPlayer', 'Flash', 'EmbedMovies', 'MP3', 'YouTube', 'Table', 'Rule', '-', - 'Subscript', 'Superscript', '-', 'OrderedList', 'UnorderedList', 'Outdent', 'Indent', '-', - 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' + 'NewPage', 'Templates', 'Save', 'Print', 'PageBreak', 'FitWindow', '-', 'PasteWord', '-', 'Undo', 'Redo', '-', 'SelectAll', '-', 'Find' + ), + array( + 'Link', 'Unlink', 'Anchor' ), - '/', array( - 'FontFormat', 'Style', 'FontName', 'FontSize', 'Bold', 'Italic', 'Underline', 'StrikeThrough', 'TextColor', 'BGColor', '-', - 'Source', 'mimetex' + 'Image', 'flvPlayer', 'Flash', 'EmbedMovies', 'YouTube', 'MP3' + ), + array( + 'Table', 'Smiley', 'SpecialChar', 'googlemaps' + ), + array( + 'FontFormat', 'FontName', 'FontSize' + ), + array( + 'Bold', 'Italic', 'Underline' + ), + array( + 'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor' + ), + array( + 'Source' ) - ) ; - + ); // These are temporary settings for experimental purposes. $config['ToolbarCanCollapse']['EditHomePage'] = true; // true (default), false $config['ToolbarStartExpanded']['EditHomePage'] = true; // true (default) , false @@ -55,10 +72,32 @@ $config['ToolbarLocation']['EditHomePage'] = 'In'; // 'In' (default) , 'None' , $config['BlockCopyPaste']['EditHomePage'] = false; // true , false (default) +// Insert or Edit a page link in the platform home page. +$config['ToolbarSets']['LinksHomePage'] = + array( + array( + 'NewPage', 'Templates', 'Save', 'Print', 'PageBreak', 'FitWindow', '-', 'PasteWord', '-', 'Undo', 'Redo', '-', 'SelectAll', '-', 'Find' + ), + array( + 'Link', 'Unlink', 'Anchor' + ), + array( + 'Image', 'flvPlayer', 'Flash', 'EmbedMovies', 'YouTube', 'MP3' + ), + array( + 'Table', 'Smiley', 'SpecialChar', 'googlemaps' + ), + array( + 'FontFormat', 'FontName', 'FontSize' + ), + array( + 'Bold', 'Italic', 'Underline' + ), + array( + 'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor' + ), + array( + 'Source' + ) + ); - - - - - -// To be continued ... \ No newline at end of file