diff --git a/main/document/create_document.php b/main/document/create_document.php index ed94a9300b..2fd2bc6408 100644 --- a/main/document/create_document.php +++ b/main/document/create_document.php @@ -1,5 +1,5 @@ '; $oFCKeditor = new FCKeditor('post_full_text') ; $oFCKeditor->BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ; - $oFCKeditor->Height = '400'; + $oFCKeditor->Height = '350'; $oFCKeditor->Width = '98%'; $oFCKeditor->Value = isset($_POST['post_full_text'])?stripslashes($_POST['post_full_text']):''; $oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js"; @@ -1178,7 +1178,7 @@ class Blog '; $oFCKeditor = new FCKeditor('post_full_text') ; $oFCKeditor->BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ; - $oFCKeditor->Height = '400'; + $oFCKeditor->Height = '350'; $oFCKeditor->Width = '98%'; $oFCKeditor->Value = isset($_POST['post_full_text'])?stripslashes($_POST['post_full_text']):$blog_post_text; $oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js"; diff --git a/main/inc/lib/fckeditor/myconfig.js b/main/inc/lib/fckeditor/myconfig.js index 086a564bb4..03e755073d 100644 --- a/main/inc/lib/fckeditor/myconfig.js +++ b/main/inc/lib/fckeditor/myconfig.js @@ -1,6 +1,3 @@ -//FCKConfig.SmileyWindowWidth = 500 ; -//FCKConfig.SmileyWindowHeight = 500 ; -//FCKConfig.ImageUpload = false ; FCKConfig.IMUploadPath = ''; FCKConfig.FlashUploadPath = '' ; FCKConfig.AudioUploadPath = '' ; @@ -36,7 +33,7 @@ FCKConfig.ToolbarSets["Announcements"] = [ ] ; FCKConfig.ToolbarSets["Full"] = [ - ['Templates','PasteWord','Link','-','ImageManager','Flash','Video','MP3','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source'] + ['Templates','PasteWord','Link','-','ImageManager','Flash','MP3','Table','Rule','-','Subscript', 'Superscript','-','OrderedList','UnorderedList','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],'/',['FontName','FontSize','Bold','Italic','Underline','StrikeThrough','TextColor', 'BGColor','-','Source'] ] ; FCKConfig.ToolbarSets["Comment"] = [ @@ -51,6 +48,10 @@ FCKConfig.ToolbarSets["NewTest"] = [ ['Bold','Italic','Underline','StrikeThrough','Link','ImageManager','Flash','MP3','OrderedList','UnorderedList','Table'] ] ; +FCKConfig.ToolbarSets["Survey"] = [ + ['FontSize','Bold','Italic','TextColor','-','OrderedList','UnorderedList','-','Rule','Link','Table','-','ImageManager'] +] ; + var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ; FCKConfig.Plugins.Add("MP3", "en,it", sOtherPluginPath ) ; FCKConfig.Plugins.Add("Video", "en,it", sOtherPluginPath ) ; diff --git a/main/inc/lib/formvalidator/Element/html_editor.php b/main/inc/lib/formvalidator/Element/html_editor.php index e38475f950..065dc0478a 100644 --- a/main/inc/lib/formvalidator/Element/html_editor.php +++ b/main/inc/lib/formvalidator/Element/html_editor.php @@ -1,5 +1,5 @@ BasePath = api_get_path(WEB_PATH).'main/inc/lib/fckeditor/'; - //$fck_editor->Width = '990'; $fck_editor->Width = $fck_attribute['Width'] ? $fck_attribute['Width'] : '990'; $fck_editor->Height = $fck_attribute['Height'] ? $fck_attribute['Height'] : '400'; $fck_editor->Value = $this->getValue(); + //We get the optionnals config parameters in $fck_attribute array $fck_editor->Config = $fck_attribute['Config'] ? $fck_attribute['Config'] : array(); @@ -123,11 +123,12 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea $sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'"; } - + //Else, we get the current session language elseif(isset($_SESSION["_user"]["language"])){ $sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_user"]["language"]."'"; } + //Else we get the default platform language else{ $platform_language=api_get_setting("platformLanguage"); $sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='$platform_language'"; @@ -174,24 +175,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea $result .=$fck_editor->CreateHtml(); - /* - $result .= ''; - $result .= ''; - $result .= ''; - */ + $result .= ''.get_lang('AllowedHTMLTags').''; return $result; }