From 69029806352c312c07162ec8c3d695d8be3e7c78 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Sun, 4 Oct 2009 00:02:30 +0300 Subject: [PATCH] Feature #306 - The online editor: Fixing text direction (depends on language) for the editing area. This fix is active only when non-full html data is edited. For full html pages (documents) I assume that text direction is coded inside. --- main/inc/lib/fckeditor/fckeditor.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main/inc/lib/fckeditor/fckeditor.php b/main/inc/lib/fckeditor/fckeditor.php index ff5262475a..cce3fabe49 100755 --- a/main/inc/lib/fckeditor/fckeditor.php +++ b/main/inc/lib/fckeditor/fckeditor.php @@ -415,7 +415,7 @@ class FCKeditor return array_merge( self::get_javascript_custom_configuration_file(), self::get_css_configuration(), - self::get_editor_language(), + $this->get_editor_language(), $this->get_repository_configuration(), self::get_media_configuration(), self::get_user_configuration_data(), @@ -453,6 +453,10 @@ class FCKeditor $editor_lang = isset($code_translation_table[$editor_lang]) ? $code_translation_table[$editor_lang] : $editor_lang; $editor_lang = file_exists(api_get_path(SYS_PATH).'main/inc/lib/fckeditor/editor/lang/'.$editor_lang.'.js') ? $editor_lang : 'en'; $config['DefaultLanguage'] = $editor_lang; + $text_direction = trim(get_lang('text_dir', '')); + if (!$this->Config['FullPage'] && !empty($text_direction) && strlen($text_direction) == 3) { + $this->Config['ContentLangDirection'] = $text_direction; + } } return $config; } @@ -568,12 +572,6 @@ class FCKeditor * @return array */ private function & get_media_configuration() { - /* - $config['FlashPlayerAudio'] = Media::get_path(FLASH_PLAYER_AUDIO, REL_PATH); - $config['FlashPlayerVideo'] = Media::get_path(FLASH_PLAYER_VIDEO, REL_PATH); - $config['ScriptSWFObject'] = Media::get_path(SCRIPT_SWFOBJECT, REL_PATH); - $config['ScriptASCIIMathML'] = Media::get_path(SCRIPT_ASCIIMATHML, REL_PATH); - */ $config['FlashPlayerAudio'] = api_get_path(TO_REL, FLASH_PLAYER_AUDIO); $config['FlashPlayerVideo'] = api_get_path(TO_REL, FLASH_PLAYER_VIDEO); $config['ScriptSWFObject'] = api_get_path(TO_REL, SCRIPT_SWFOBJECT);