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.

skala
Ivan Tcholakov 16 years ago
parent 9fba70e0db
commit 6902980635
  1. 12
      main/inc/lib/fckeditor/fckeditor.php

@ -415,7 +415,7 @@ class FCKeditor
return array_merge( return array_merge(
self::get_javascript_custom_configuration_file(), self::get_javascript_custom_configuration_file(),
self::get_css_configuration(), self::get_css_configuration(),
self::get_editor_language(), $this->get_editor_language(),
$this->get_repository_configuration(), $this->get_repository_configuration(),
self::get_media_configuration(), self::get_media_configuration(),
self::get_user_configuration_data(), 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 = 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'; $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; $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; return $config;
} }
@ -568,12 +572,6 @@ class FCKeditor
* @return array * @return array
*/ */
private function & get_media_configuration() { 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['FlashPlayerAudio'] = api_get_path(TO_REL, FLASH_PLAYER_AUDIO);
$config['FlashPlayerVideo'] = api_get_path(TO_REL, FLASH_PLAYER_VIDEO); $config['FlashPlayerVideo'] = api_get_path(TO_REL, FLASH_PLAYER_VIDEO);
$config['ScriptSWFObject'] = api_get_path(TO_REL, SCRIPT_SWFOBJECT); $config['ScriptSWFObject'] = api_get_path(TO_REL, SCRIPT_SWFOBJECT);

Loading…
Cancel
Save