diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index c1c4dd0b4..bb0850623 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -80,6 +80,61 @@ Globals.bAnimationSupported = !Globals.bMobileDevice && $html.hasClass('csstrans */ Globals.sAnimationType = ''; +/** + * @type {Object} + */ +Globals.oHtmlEditorDefaultConfig = { + 'title': false, + 'stylesSet': false, + 'customConfig': '', + 'toolbarGroups': [ + {name: 'styles'}, + {name: 'basicstyles', groups: ['basicstyles', 'cleanup']}, + {name: 'colors'}, + {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi']}, + {name: 'links'}, + {name: 'insert'} +// {name: 'document', groups: ['mode', 'document', 'doctools']} + ], + 'removeButtons': 'Format,Undo,Redo,Cut,Copy,Paste,Anchor,Strike,Subscript,Superscript,Image,Indent,Outdent', + 'removeDialogTabs': 'link:advanced;link:target;image:advanced', + + 'allowedContent': false, + 'autoParagraph': false, + + 'enterMode': window.CKEDITOR.ENTER_BR, + 'shiftEnterMode': window.CKEDITOR.ENTER_P, +// 'floatSpaceDockedOffsetY': 1, + + 'font_defaultLabel': 'Arial', + 'fontSize_defaultLabel': '12px', + 'fontSize_sizes': '10/10px;12/12px;14/14px;16/16px;18/18px;20/20px;24/24px;28/28px;36/36px;48/48px' +}; + +/** + * @type {Object} + */ +Globals.oHtmlEditorLangsMap = { + 'de': 'de', + 'es': 'es', + 'fr': 'fr', + 'hu': 'hu', + 'is': 'is', + 'it': 'it', + 'ko': 'ko', + 'ko-kr': 'ko', + 'lv': 'lv', + 'nl': 'nl', + 'no': 'no', + 'pl': 'pl', + 'pt': 'pt', + 'pt-pt': 'pt', + 'pt-br': 'pt-br', + 'ru': 'ru', + 'zh': 'zh', + 'zh-cn': 'zh-cn' +}; + if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes) { Globals.bAllowPdfPreview = !!_.find(navigator.mimeTypes, function (oType) { diff --git a/dev/Common/HtmlEditorWrapper.js b/dev/Common/HtmlEditorWrapper.js index 12332d4e5..62d6f0b44 100644 --- a/dev/Common/HtmlEditorWrapper.js +++ b/dev/Common/HtmlEditorWrapper.js @@ -293,7 +293,12 @@ HtmlEditorWrapper.prototype.init = function () { if (this.$element && this.$element[0]) { - var self = this; + var + self = this, + oConfig = Globals.oHtmlEditorDefaultConfig, + sLanguage = RL.settingsGet('Language'), + bSource = !!RL.settingsGet('AllowHtmlEditorSourceButton') + ; self.$toolbar = $('
') .addClass('html-editor-wrapper-toolbar') @@ -338,7 +343,15 @@ HtmlEditorWrapper.prototype.init = function () .append(self.$html) ; - self.editor = window.CKEDITOR.inline(self.$html[0]); + if (bSource && oConfig.toolbarGroups && !oConfig.toolbarGroups.__SourceInited) + { + oConfig.toolbarGroups.__SourceInited = true; + oConfig.toolbarGroups.push({name: 'document', groups: ['mode', 'document', 'doctools']}); + } + + oConfig.language = Globals.oHtmlEditorLangsMap[sLanguage] || 'en'; + self.editor = window.CKEDITOR.inline(self.$html[0], oConfig); + if (self.fOnReady) { self.editor.on('instanceReady', function () { @@ -415,4 +428,6 @@ HtmlEditorWrapper.prototype.modeToggle = function (bFocus) { this.focus(); } + + this.blurTrigger(); }; diff --git a/dev/Styles/HtmlEditorWrapper.less b/dev/Styles/HtmlEditorWrapper.less index b0ee4c409..2cda6ad33 100644 --- a/dev/Styles/HtmlEditorWrapper.less +++ b/dev/Styles/HtmlEditorWrapper.less @@ -151,3 +151,7 @@ html.html-editor-wrapper-fullscreen .html-editor-wrapper-html.styled, html.html- .html-editor-wrapper-html img { vertical-align: bottom; } + +.cke_button__sourcedialog_label { + display: none !important; +} \ No newline at end of file diff --git a/package.json b/package.json index 236ff4998..20cb8970f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "RainLoop", "title": "RainLoop Webmail", "version": "1.6.3", - "release": "701", + "release": "705", "description": "Simple, modern & fast web-based email client", "homepage": "http://rainloop.net", "main": "Gruntfile.js", diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index b8960e055..abb0e9f78 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -909,6 +909,7 @@ class Actions 'OpenPGP' => $oConfig->Get('security', 'openpgp', false), 'InIframe' => (bool) $oConfig->Get('labs', 'in_iframe', false), 'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true), + 'AllowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false), 'CustomLoginLink' => $oConfig->Get('labs', 'custom_login_link', ''), 'CustomLogoutLink' => $oConfig->Get('labs', 'custom_logout_link', ''), 'AllowAdditionalAccounts' => (bool) $oConfig->Get('webmail', 'allow_additional_accounts', true), diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php index 2e7779db1..30f84b387 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -1,252 +1,253 @@ -Set('security', 'admin_password', \md5(APP_SALT.$sPassword.APP_SALT)); - } - - /** - * @param string $sPassword - * - * @return bool - */ - public function ValidatePassword($sPassword) - { - $sPassword = (string) $sPassword; - $sConfigPassword = (string) $this->Get('security', 'admin_password', ''); - - return 0 < \strlen($sPassword) && - ($sPassword === $sConfigPassword || \md5(APP_SALT.$sPassword.APP_SALT) === $sConfigPassword); - } - - /** - * @return bool - */ - public function Save() - { - $this->Set('version', 'current', APP_VERSION); - $this->Set('version', 'saved', \gmdate('r')); - - return parent::Save(); - } - - /** - * @return array - */ - protected function defaultValues() - { - return array( - 'webmail' => array( - - 'title' => array('RainLoop Webmail', 'Text displayed as page title'), - 'loading_description' => array('RainLoop', 'Text displayed on startup'), - - 'theme' => array('Default', 'Theme used by default'), - 'allow_themes' => array(true, 'Allow theme selection on settings screen'), - 'allow_custom_theme' => array(true, ''), - - 'language' => array('en', 'Language used by default'), - 'allow_languages_on_settings' => array(true, 'Allow language selection on settings screen'), - - 'allow_additional_accounts' => array(true, ''), - 'allow_identities' => array(true, ''), - - 'messages_per_page' => array(20, ' Number of messages displayed on page by default'), - - 'editor_default_type' => array('Html', 'Editor mode used by default (Html or Plain)'), - - 'attachment_size_limit' => array(5, - 'File size limit (MB) for file upload on compose screen -0 for unlimited.') - ), - - 'branding' => array( - 'login_logo' => array(''), - 'login_desc' => array(''), - 'login_css' => array(''), - ), - - 'contacts' => array( - 'enable' => array(false, 'Enable contacts'), - 'allow_sharing' => array(true), - 'allow_sync' => array(false), - 'suggestions_limit' => array(30), - 'type' => array('sqlite', ''), - 'pdo_dsn' => array('mysql:host=127.0.0.1;port=3306;dbname=rainloop', ''), - 'pdo_user' => array('root', ''), - 'pdo_password' => array('', ''), - ), - - 'security' => array( - 'csrf_protection' => array(true, - 'Enable CSRF protection (http://en.wikipedia.org/wiki/Cross-site_request_forgery)'), - - 'custom_server_signature' => array('RainLoop'), - 'openpgp' => array(false), - 'admin_login' => array('admin', 'Login and password for web admin panel'), - 'admin_password' => array('12345'), - 'allow_admin_panel' => array(true, 'Access settings'), - 'admin_panel_host' => array(''), - 'core_install_access_domains' => array('') - ), - - 'login' => array( - - 'allow_custom_login' => array(false, - 'Enable additional Login field on webmail login screen'), - - 'default_domain' => array('', ''), - - 'allow_languages_on_login' => array(true, - 'Allow language selection on webmail login screen'), - - 'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAILT_OFF, - 'This option allows webmail to remember the logged in user -once they closed the browser window. - -Values: - "DefaultOff" - can be used, disabled by default; - "DefaultOn" - can be used, enabled by default; - "Unused" - cannot be used') - ), - - 'plugins' => array( - 'enable' => array(false, 'Enable plugin support'), - 'enabled_list' => array('', 'List of enabled plugins'), - ), - - 'logs' => array( - - 'enable' => array(false, 'Enable logging'), - - 'write_on_error_only' => array(false, 'Logs entire request only if error occured'), - - 'filename' => array('log-{date:Y-m-d}.txt', - 'Log filename. -For security reasons, some characters are removed from filename. -Allows for pattern-based folder creation (see examples below). - -Patterns: - {date:Y-m-d} - Replaced by pattern-based date - Detailed info: http://www.php.net/manual/en/function.date.php - {user:email} - Replaced by user\'s email address - If user is not logged in, value is set to "unknown" - {user:login} - Replaced by user\'s login - If user is not logged in, value is set to "unknown" - {user:domain} - Replaced by user\'s domain name - If user is not logged in, value is set to "unknown" - {user:uid} - Replaced by user\'s UID regardless of account currently used - -Examples: - filename = "log-{date:Y-m-d}.txt" - filename = "{date:Y-m-d}/{user:domain}/{user:email}_{user:uid}.log" - filename = "{user:email}-{date:Y-m-d}.txt"') - ), - - 'debug' => array( - 'enable' => array(false, 'Special option required for development purposes'), - ), - - 'version' => array( - 'current' => array(''), - 'saved' => array('') - ), - - 'social' => array( - 'google_enable' => array(false, 'Google'), - 'google_client_id' => array(''), - 'google_client_secret' => array(''), - - 'fb_enable' => array(false, 'Facebook'), - 'fb_app_id' => array(''), - 'fb_app_secret' => array(''), - - 'twitter_enable' => array(false, 'Twitter'), - 'twitter_consumer_key' => array(''), - 'twitter_consumer_secret' => array(''), - - 'dropbox_enable' => array(false, 'Dropbox'), - 'dropbox_api_key' => array(''), - ), - - 'cache' => array( - 'enable' => array(true, - 'The section controls caching of the entire application. - -Enables caching in the system'), - - 'index' => array('v1', 'Additional caching key. If changed, cache is purged'), - - 'fast_cache_driver' => array('files', 'Can be: files, APC, memcache'), - 'fast_cache_index' => array('v1', 'Additional caching key. If changed, fast cache is purged'), - - 'http' => array(true, 'Browser-level cache. If enabled, caching is maintainted without using files'), - 'server_uids' => array(false, 'Caching message UIDs when searching and sorting (threading)') - ), - - 'labs' => array( - 'ignore_folders_subscription' => array(false, - 'Experimental settings. Handle with care. -'), - 'allow_prefetch' => array(true), - 'allow_smart_html_links' => array(true), - 'cache_system_data' => array(true), - 'date_from_headers' => array(false), - 'autocreate_system_folders' => array(true), - 'allow_message_append' => array(false), - 'determine_user_language' => array(true), - 'login_fault_delay' => array(1), - 'log_ajax_response_write_limit' => array(300), - 'sync_dav_digest_auth' => array(true), - 'sync_dav_domain' => array(''), - 'sync_use_dav_browser' => array(true), - 'use_app_debug_js' => array(false), - 'use_app_debug_css' => array(false), - 'use_imap_sort' => array(false), - 'use_imap_force_selection' => array(false), - 'use_imap_list_subscribe' => array(true), - 'use_imap_thread' => array(true), - 'use_imap_move' => array(true), - 'use_imap_auth_plain' => array(false), - 'imap_forwarded_flag' => array('$Forwarded'), - 'imap_read_receipt_flag' => array('$ReadReceipt'), - 'smtp_show_server_errors' => array(false), - 'repo_type' => array('stable'), - 'custom_repo' => array(''), - 'additional_repo' => array(''), - 'cdn_static_domain' => array(''), - 'curl_proxy' => array(''), - 'curl_proxy_auth' => array(''), - 'in_iframe' => array(false), - 'custom_login_link' => array(''), - 'custom_logout_link' => array(''), - 'allow_external_login' => array(false), - 'fast_cache_memcache_host' => array('127.0.0.1'), - 'fast_cache_memcache_port' => array(11211), - 'fast_cache_memcache_expire' => array(43200), - 'dev_email' => array(''), - 'dev_login' => array(''), - 'dev_password' => array('') - ) - ); - } -} +Set('security', 'admin_password', \md5(APP_SALT.$sPassword.APP_SALT)); + } + + /** + * @param string $sPassword + * + * @return bool + */ + public function ValidatePassword($sPassword) + { + $sPassword = (string) $sPassword; + $sConfigPassword = (string) $this->Get('security', 'admin_password', ''); + + return 0 < \strlen($sPassword) && + ($sPassword === $sConfigPassword || \md5(APP_SALT.$sPassword.APP_SALT) === $sConfigPassword); + } + + /** + * @return bool + */ + public function Save() + { + $this->Set('version', 'current', APP_VERSION); + $this->Set('version', 'saved', \gmdate('r')); + + return parent::Save(); + } + + /** + * @return array + */ + protected function defaultValues() + { + return array( + 'webmail' => array( + + 'title' => array('RainLoop Webmail', 'Text displayed as page title'), + 'loading_description' => array('RainLoop', 'Text displayed on startup'), + + 'theme' => array('Default', 'Theme used by default'), + 'allow_themes' => array(true, 'Allow theme selection on settings screen'), + 'allow_custom_theme' => array(true, ''), + + 'language' => array('en', 'Language used by default'), + 'allow_languages_on_settings' => array(true, 'Allow language selection on settings screen'), + + 'allow_additional_accounts' => array(true, ''), + 'allow_identities' => array(true, ''), + + 'messages_per_page' => array(20, ' Number of messages displayed on page by default'), + + 'editor_default_type' => array('Html', 'Editor mode used by default (Html or Plain)'), + + 'attachment_size_limit' => array(5, + 'File size limit (MB) for file upload on compose screen +0 for unlimited.') + ), + + 'branding' => array( + 'login_logo' => array(''), + 'login_desc' => array(''), + 'login_css' => array(''), + ), + + 'contacts' => array( + 'enable' => array(false, 'Enable contacts'), + 'allow_sharing' => array(true), + 'allow_sync' => array(false), + 'suggestions_limit' => array(30), + 'type' => array('sqlite', ''), + 'pdo_dsn' => array('mysql:host=127.0.0.1;port=3306;dbname=rainloop', ''), + 'pdo_user' => array('root', ''), + 'pdo_password' => array('', ''), + ), + + 'security' => array( + 'csrf_protection' => array(true, + 'Enable CSRF protection (http://en.wikipedia.org/wiki/Cross-site_request_forgery)'), + + 'custom_server_signature' => array('RainLoop'), + 'openpgp' => array(false), + 'admin_login' => array('admin', 'Login and password for web admin panel'), + 'admin_password' => array('12345'), + 'allow_admin_panel' => array(true, 'Access settings'), + 'admin_panel_host' => array(''), + 'core_install_access_domains' => array('') + ), + + 'login' => array( + + 'allow_custom_login' => array(false, + 'Enable additional Login field on webmail login screen'), + + 'default_domain' => array('', ''), + + 'allow_languages_on_login' => array(true, + 'Allow language selection on webmail login screen'), + + 'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAILT_OFF, + 'This option allows webmail to remember the logged in user +once they closed the browser window. + +Values: + "DefaultOff" - can be used, disabled by default; + "DefaultOn" - can be used, enabled by default; + "Unused" - cannot be used') + ), + + 'plugins' => array( + 'enable' => array(false, 'Enable plugin support'), + 'enabled_list' => array('', 'List of enabled plugins'), + ), + + 'logs' => array( + + 'enable' => array(false, 'Enable logging'), + + 'write_on_error_only' => array(false, 'Logs entire request only if error occured'), + + 'filename' => array('log-{date:Y-m-d}.txt', + 'Log filename. +For security reasons, some characters are removed from filename. +Allows for pattern-based folder creation (see examples below). + +Patterns: + {date:Y-m-d} - Replaced by pattern-based date + Detailed info: http://www.php.net/manual/en/function.date.php + {user:email} - Replaced by user\'s email address + If user is not logged in, value is set to "unknown" + {user:login} - Replaced by user\'s login + If user is not logged in, value is set to "unknown" + {user:domain} - Replaced by user\'s domain name + If user is not logged in, value is set to "unknown" + {user:uid} - Replaced by user\'s UID regardless of account currently used + +Examples: + filename = "log-{date:Y-m-d}.txt" + filename = "{date:Y-m-d}/{user:domain}/{user:email}_{user:uid}.log" + filename = "{user:email}-{date:Y-m-d}.txt"') + ), + + 'debug' => array( + 'enable' => array(false, 'Special option required for development purposes'), + ), + + 'version' => array( + 'current' => array(''), + 'saved' => array('') + ), + + 'social' => array( + 'google_enable' => array(false, 'Google'), + 'google_client_id' => array(''), + 'google_client_secret' => array(''), + + 'fb_enable' => array(false, 'Facebook'), + 'fb_app_id' => array(''), + 'fb_app_secret' => array(''), + + 'twitter_enable' => array(false, 'Twitter'), + 'twitter_consumer_key' => array(''), + 'twitter_consumer_secret' => array(''), + + 'dropbox_enable' => array(false, 'Dropbox'), + 'dropbox_api_key' => array(''), + ), + + 'cache' => array( + 'enable' => array(true, + 'The section controls caching of the entire application. + +Enables caching in the system'), + + 'index' => array('v1', 'Additional caching key. If changed, cache is purged'), + + 'fast_cache_driver' => array('files', 'Can be: files, APC, memcache'), + 'fast_cache_index' => array('v1', 'Additional caching key. If changed, fast cache is purged'), + + 'http' => array(true, 'Browser-level cache. If enabled, caching is maintainted without using files'), + 'server_uids' => array(false, 'Caching message UIDs when searching and sorting (threading)') + ), + + 'labs' => array( + 'ignore_folders_subscription' => array(false, + 'Experimental settings. Handle with care. +'), + 'allow_prefetch' => array(true), + 'allow_smart_html_links' => array(true), + 'cache_system_data' => array(true), + 'date_from_headers' => array(false), + 'autocreate_system_folders' => array(true), + 'allow_message_append' => array(false), + 'determine_user_language' => array(true), + 'login_fault_delay' => array(1), + 'log_ajax_response_write_limit' => array(300), + 'allow_html_editor_source_button' => array(false), + 'sync_dav_digest_auth' => array(true), + 'sync_dav_domain' => array(''), + 'sync_use_dav_browser' => array(true), + 'use_app_debug_js' => array(false), + 'use_app_debug_css' => array(false), + 'use_imap_sort' => array(false), + 'use_imap_force_selection' => array(false), + 'use_imap_list_subscribe' => array(true), + 'use_imap_thread' => array(true), + 'use_imap_move' => array(true), + 'use_imap_auth_plain' => array(false), + 'imap_forwarded_flag' => array('$Forwarded'), + 'imap_read_receipt_flag' => array('$ReadReceipt'), + 'smtp_show_server_errors' => array(false), + 'repo_type' => array('stable'), + 'custom_repo' => array(''), + 'additional_repo' => array(''), + 'cdn_static_domain' => array(''), + 'curl_proxy' => array(''), + 'curl_proxy_auth' => array(''), + 'in_iframe' => array(false), + 'custom_login_link' => array(''), + 'custom_logout_link' => array(''), + 'allow_external_login' => array(false), + 'fast_cache_memcache_host' => array('127.0.0.1'), + 'fast_cache_memcache_port' => array(11211), + 'fast_cache_memcache_expire' => array(43200), + 'dev_email' => array(''), + 'dev_login' => array(''), + 'dev_password' => array('') + ) + ); + } +} diff --git a/rainloop/v/0.0.0/static/ckeditor/build-config.js b/rainloop/v/0.0.0/static/ckeditor/build-config.js index 2cf8eb45c..951d6f568 100644 --- a/rainloop/v/0.0.0/static/ckeditor/build-config.js +++ b/rainloop/v/0.0.0/static/ckeditor/build-config.js @@ -13,10 +13,10 @@ * (1) http://ckeditor.com/builder * Visit online builder to build CKEditor from scratch. * - * (2) http://ckeditor.com/builder/ecd32dcd1211bb2756f9a2746d8e0ca1 + * (2) http://ckeditor.com/builder/327368eb3879dd55bb1e95e8dd1cd012 * Visit online builder to build CKEditor, starting with the same setup as before. * - * (3) http://ckeditor.com/builder/download/ecd32dcd1211bb2756f9a2746d8e0ca1 + * (3) http://ckeditor.com/builder/download/327368eb3879dd55bb1e95e8dd1cd012 * Straight download link to the latest version of CKEditor (Optimized) with the same setup as before. * * NOTE: @@ -43,15 +43,83 @@ var CKBUILDER_CONFIG = { 'enterkey' : 1, 'entities' : 1, 'floatingspace' : 1, + 'floatpanel' : 1, 'font' : 1, 'image' : 1, + 'indent' : 1, 'link' : 1, 'list' : 1, + 'panelbutton' : 1, 'removeformat' : 1, + 'sourcedialog' : 1, 'toolbar' : 1, 'undo' : 1 }, languages : { - 'en' : 1 + 'af' : 1, + 'ar' : 1, + 'bg' : 1, + 'bn' : 1, + 'bs' : 1, + 'ca' : 1, + 'cs' : 1, + 'cy' : 1, + 'da' : 1, + 'de' : 1, + 'el' : 1, + 'en' : 1, + 'en-au' : 1, + 'en-ca' : 1, + 'en-gb' : 1, + 'eo' : 1, + 'es' : 1, + 'et' : 1, + 'eu' : 1, + 'fa' : 1, + 'fi' : 1, + 'fo' : 1, + 'fr' : 1, + 'fr-ca' : 1, + 'gl' : 1, + 'gu' : 1, + 'he' : 1, + 'hi' : 1, + 'hr' : 1, + 'hu' : 1, + 'id' : 1, + 'is' : 1, + 'it' : 1, + 'ja' : 1, + 'ka' : 1, + 'km' : 1, + 'ko' : 1, + 'ku' : 1, + 'lt' : 1, + 'lv' : 1, + 'mk' : 1, + 'mn' : 1, + 'ms' : 1, + 'nb' : 1, + 'nl' : 1, + 'no' : 1, + 'pl' : 1, + 'pt' : 1, + 'pt-br' : 1, + 'ro' : 1, + 'ru' : 1, + 'si' : 1, + 'sk' : 1, + 'sl' : 1, + 'sq' : 1, + 'sr' : 1, + 'sr-latn' : 1, + 'sv' : 1, + 'th' : 1, + 'tr' : 1, + 'ug' : 1, + 'uk' : 1, + 'vi' : 1, + 'zh' : 1, + 'zh-cn' : 1 } }; \ No newline at end of file diff --git a/rainloop/v/0.0.0/static/ckeditor/ckeditor.js b/rainloop/v/0.0.0/static/ckeditor/ckeditor.js index df9d16068..1c5e13380 100644 --- a/rainloop/v/0.0.0/static/ckeditor/ckeditor.js +++ b/rainloop/v/0.0.0/static/ckeditor/ckeditor.js @@ -461,7 +461,30 @@ return function(g,e){var a=g.uiColor,a={id:"."+g.id,defaultBorder:b(a,-0.1),defa "{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(c){var e=0,d=function(g,d,b,a){if(a){var a=new CKEDITOR.style(a),f=h[b];f.unshift(a);c.attachStyleStateChange(a,function(a){!c.readOnly&&c.getCommand(b).setState(a)});c.addCommand(b,new CKEDITOR.styleCommand(a,{contentForms:f}));c.ui.addButton&&c.ui.addButton(g,{label:d,command:b,toolbar:"basicstyles,"+(e+=10)})}},h={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"== a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},b=c.config,a=c.lang.basicstyles;d("Bold",a.bold,"bold",b.coreStyles_bold);d("Italic",a.italic,"italic",b.coreStyles_italic);d("Underline",a.underline,"underline",b.coreStyles_underline);d("Strike",a.strike,"strike",b.coreStyles_strike);d("Subscript",a.subscript, "subscript",b.coreStyles_subscript);d("Superscript",a.superscript,"superscript",b.coreStyles_superscript);c.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"}; -CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){function l(e,c,b){b=e.config.forceEnterMode||b;"wysiwyg"==e.mode&&(c||(c=e.activeEnterMode),e.elementPath().isContextFor("p")||(c=CKEDITOR.ENTER_BR,b=1),e.fire("saveSnapshot"),c==CKEDITOR.ENTER_BR?o(e,c,null,b):p(e,c,null,b),e.fire("saveSnapshot"))}function q(e){for(var e=e.getSelection().getRanges(!0),c=e.length-1;0'),e=1):e&&(b.push("