diff --git a/example.htaccess b/.htaccess similarity index 81% rename from example.htaccess rename to .htaccess index 53b8ccb..1d930b1 100644 --- a/example.htaccess +++ b/.htaccess @@ -6,12 +6,12 @@ RewriteBase / # Protect hidden files from being viewed - Order Deny,Allow - Deny From All + Order Deny,Allow + Deny From All # Protect application and system files from being viewed -RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L] +RewriteRule ^(?:application|modules|system)\b - [F,L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 87af9ad..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,14 +0,0 @@ -# Kohana License Agreement - -This license is a legal agreement between you and the Kohana Team for the use of Kohana Framework (the "Software"). By obtaining the Software you agree to comply with the terms and conditions of this license. - -Copyright (c) 2007-2010 Kohana Team -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of the Kohana nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md deleted file mode 100644 index e19aba8..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Kohana PHP Framework, version 3.1 (release) - -This is the current release version of [Kohana](http://kohanaframework.org/). diff --git a/application/bootstrap.php b/application/bootstrap.php index d6081cd..456b66d 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -22,7 +22,7 @@ else * @see http://kohanaframework.org/guide/using.configuration * @see http://php.net/timezones */ -date_default_timezone_set('America/Chicago'); +date_default_timezone_set('Asia/Krasnoyarsk'); /** * Set the default locale. @@ -30,7 +30,7 @@ date_default_timezone_set('America/Chicago'); * @see http://kohanaframework.org/guide/using.configuration * @see http://php.net/setlocale */ -setlocale(LC_ALL, 'en_US.utf-8'); +setlocale(LC_ALL, 'ru_RU.utf-8'); /** * Enable the Kohana auto-loader. @@ -53,7 +53,7 @@ ini_set('unserialize_callback_func', 'spl_autoload_call'); /** * Set the default language */ -I18n::lang('en-us'); +I18n::lang('ru'); /** * Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied. @@ -66,6 +66,11 @@ if (isset($_SERVER['KOHANA_ENV'])) Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV'])); } +if ($_SERVER['SERVER_ADDR'] !== '127.0.0.1'){ + Kohana::$environment = Kohana::PRODUCTION; + ini_set('display_errors', TRUE); +} + /** * Initialize Kohana, setting the default options. * @@ -81,6 +86,7 @@ if (isset($_SERVER['KOHANA_ENV'])) */ Kohana::init(array( 'base_url' => '/', + 'index_file' => FALSE, )); /** @@ -97,22 +103,24 @@ Kohana::$config->attach(new Config_File); * Enable modules. Modules are referenced by a relative or absolute path. */ Kohana::modules(array( - // 'auth' => MODPATH.'auth', // Basic authentication - // 'cache' => MODPATH.'cache', // Caching with multiple backends - // 'codebench' => MODPATH.'codebench', // Benchmarking tool - // 'database' => MODPATH.'database', // Database access - // 'image' => MODPATH.'image', // Image manipulation - // 'orm' => MODPATH.'orm', // Object Relationship Mapping - // 'unittest' => MODPATH.'unittest', // Unit testing - // 'userguide' => MODPATH.'userguide', // User guide and API documentation + 'auth' => MODPATH.'auth', // Basic authentication + 'database' => MODPATH.'database', // Database access + 'orm' => MODPATH.'orm', // Object Relationship Mapping + 'editor' => MODPATH.'editor', )); /** * Set the routes. Each route must have a minimum of a name, a URI and a set of * defaults for the URI. */ + +Route::set('admin', 'admin/(/(/))')->defaults(array( + 'directory' => 'admin', + 'controller' => 'pages', + 'action' => 'view' + )); Route::set('default', '((/(/)))') ->defaults(array( - 'controller' => 'welcome', - 'action' => 'index', + 'controller' => 'page', + 'action' => 'view' )); diff --git a/application/cache/.gitignore b/application/cache/.gitignore deleted file mode 100644 index 80e609a..0000000 --- a/application/cache/.gitignore +++ /dev/null @@ -1 +0,0 @@ -[^.]* \ No newline at end of file diff --git a/application/classes/controller/admin.php b/application/classes/controller/admin.php new file mode 100644 index 0000000..86d7e33 --- /dev/null +++ b/application/classes/controller/admin.php @@ -0,0 +1,4 @@ +auth = Auth::instance(); + $this->user = $this->auth->get_user(); + $this->session= Session::instance(); + if ($this->auth->logged_in()){ + if ($this->auth->logged_in(array('admin')) === FALSE) $this->template->error = "Недостаточно прав для внесения изменений."; + } + else{ + $this->template->error = "Вы не зашли в систему."; + $this->request->redirect('admin/users/login'); + } + } + public function action_view(){ + $this->template->pages = ORM::factory('page')->find_all()->as_array('id'); + } + public function action_add() { + $this->template = new View('admin/pages/add'); + $page = new Model_Page; + $message = ""; + $error = ""; + if($_POST){ + $result = $this->_add(Arr::get($_POST, 'name', ''), + Arr::get($_POST, 'content', ''), + Arr::get($_POST, 'order', 0)); + if(isset($result['error'])){ + $error = $result['error']; + } + else{$message = 'Страница сохранена.';} + } + $this->template->error = $error; + $this->template->message = $message; + } + private function _add($name, $content, $order) { + $page = new Model_Page; + if(empty($name)){ + return(array('error' => 'Пожалуйста, введите название страницы.')); + } + elseif(empty($content)){ + return(array('error' => 'Пожалуйста, введите содержимое страницы.')); + } + $page->name = $name; + $page->content = $content; + $page->order = $order; + try{ + $page->save(); + $message = 'Страница сохранена.'; + } + catch(ORM_Validation_Exception $e){ + $error = "Ошибка проверки данных."; + $message = ''; + }; + } + public function action_edit() { + $this->template = new View('admin/pages/edit'); + $page = new Model_Page($this->request->param('id')); + if($_POST){ + $page->name = Arr::get($_POST, 'name', ''); + $page->content = Arr::get($_POST, 'content', ''); + $page->order = Arr::get($_POST, 'order', 0); + try{ + $page->save(); + $this->template->message = 'Страница сохранена.'; + $this->request->redirect('admin/pages'); + } + catch(ORM_Validation_Exception $e){ + $error = "Ошибка проверки данных."; + $message = ''; + } + } + $this->template->name = $page->name; + $this->template->order = $page->order; + $this->template->content = $page->content; + $this->template->id = $page->id; + $message = ""; + $error = ""; + $this->template->error = $error; + $this->template->message = $message; + } + public function action_delete() { + $this->template = new View('admin/pages/delete'); + $page = new Model_Page($this->request->param('id')); + $this->template->name = $page->name; + $this->template->content = $page->content; + $this->template->id = $this->request->param('id'); + if($_POST){ + try{ + if (Arr::get($_POST, 'yes', '') == 'УДАЛИТЬ'){ + $page->delete(); + $this->template->message = "Страница удалена."; + $this->request->redirect('admin/pages'); + } + else{ + $this->template->message = "Подтверждение не получено. Страница не удалена."; + } + } + catch(ORM_Validation_Exception $e){ + $this->template->error = "Ошибка проверки данных."; + } + } + } +} diff --git a/application/classes/controller/admin/users.php b/application/classes/controller/admin/users.php new file mode 100644 index 0000000..8a13e06 --- /dev/null +++ b/application/classes/controller/admin/users.php @@ -0,0 +1,59 @@ +auth = Auth::instance(); + $this->user = $this->auth->get_user(); + $this->session= Session::instance(); + if ($this->auth->logged_in()){ + if ($this->auth->logged_in(array('admin')) === FALSE) $this->template->error = "Недостаточно прав для внесения изменений."; + } + else{ + $this->template->error = "Вы не зашли в систему."; + if ($this->request->action() != 'login') $this->request->redirect('admin/users/login'); + } + } + + public function action_view(){ + $this->template->users = ORM::factory('user')->find_all()->as_array('id'); + } + public function action_login() { + $this->template = new View('admin/users/login'); + + if($this->auth->logged_in()) return $this->request->redirect('admin/pages/view'); + if ($_POST){ + $user = ORM::factory('user'); + $status = $this->auth->login($_POST['login'], $_POST['password']); + if ($status) $this->request->redirect('admin/pages/view'); + else $this->template->error = "Неверный логин или пароль."; + } + } + public function action_logout() { + if ($this->auth->logout()) return $this->request->redirect('admin/users/login'); + else $this->template->error = "Ошибка выхода пользователя."; + } + public function action_register() { + $this->template = new View('admin/users/register'); + if ($_POST){ + $model = ORM::factory('user'); + $model->values(array( + 'username' => $_POST['login'], + 'email' => $_POST['email'], + 'password' => $_POST['password'], + 'password_confirm' => $_POST['password_confirm'], + )); + try { + $model->save(); + $model->add('roles', ORM::factory('role')->where('name', '=', 'login')->find()); + $this->request->redirect('admin/users'); + } + catch (ORM_Validation_Exception $e){ + $this->template->error = "Ошибка проверки данных."; + } + } + } +} diff --git a/application/classes/controller/navigation.php b/application/classes/controller/navigation.php new file mode 100644 index 0000000..0566081 --- /dev/null +++ b/application/classes/controller/navigation.php @@ -0,0 +1,10 @@ +template->pages = ORM::factory('page')->where('id','>','1')->order_by('order','ASC')->find_all()->as_array('id'); + } + public function action_view(){$this->request->redirect('');} +} diff --git a/application/classes/controller/page.php b/application/classes/controller/page.php new file mode 100644 index 0000000..85fcdef --- /dev/null +++ b/application/classes/controller/page.php @@ -0,0 +1,11 @@ +where('id', '=', $id)->find(); + $this->template->title = $page->name; + $this->template->content = $page->content; + $this->template->years = "1996-" . date('Y'); + } +} diff --git a/application/classes/controller/welcome.php b/application/classes/controller/welcome.php deleted file mode 100644 index 0984eff..0000000 --- a/application/classes/controller/welcome.php +++ /dev/null @@ -1,10 +0,0 @@ -response->body('hello, world!'); - } - -} // End Welcome diff --git a/application/classes/kohana/editor.php b/application/classes/kohana/editor.php new file mode 100644 index 0000000..0be1b6d --- /dev/null +++ b/application/classes/kohana/editor.php @@ -0,0 +1,122 @@ + +* @copyright Copyright (c) 2009 Brotkin Ivan +* +*/ + +abstract class Kohana_Editor { + + public static $default_driver = 'ckeditor'; + + public static $language = 'en'; + + public static function factory($name = 'default') + { + $config = Kohana::config('editor')->$name; + + if ( ! isset($config['driver']) ) + { + $config['driver'] = Editor::$default_driver; + } + + $config['name'] = $name; + + $driver = 'Editor_'.ucfirst($config['driver']); + + $editor = new $driver($name, $config); + + return $editor/*->init($config)*/; + } + + protected $_styles = NULL; + + protected $_scripts = NULL; + + protected $_driver = FALSE; + + protected $_name; + + public $width = 500; + + public $height = 200; + + public $fieldname = 'text'; + + public $value = ''; + + /** + * Constructor + * + * @param mixed configuration array or profile name + * @return void + */ + public function __construct($name, $config = array()) + { + + $this->_driver = $driver = $config['driver']; + + $this->_name = $name; + + foreach($config as $field => $value) + { + if ( ! is_array($value)) + { + $this->set($field, $value); + } + } + + $config['params'] = Kohana::config('editor/'.$driver)->get($name, array()); + + if (isset($config['params'])) + { + foreach($config['params'] as $key => $value) + { + $this->set($key, $value); + } + } + + return $this; + } + + public function set($field, $value) + { + if (in_array($field, array('width', 'height', 'fieldname', 'value'))) + { + $this->$field = $value; + } + + return $this; + } + + public function css() + { + // no CSS in use + return array(); + } + + public function js() + { + // no JS in use + return array(); + } + + /** + * Display text redactor or returns redactor code + * + * @param bool outputs code directly if TRUE + * @param bool creates textarea field if TRUE + * @return mixed returns output code if $print==FALSE + */ + abstract public function render($print = TRUE, $create_field = TRUE); + + public function __toString() + { + return $this->render(TRUE); + } + +} diff --git a/application/classes/kohana/editor/ckeditor.php b/application/classes/kohana/editor/ckeditor.php new file mode 100644 index 0000000..b7ffe9d --- /dev/null +++ b/application/classes/kohana/editor/ckeditor.php @@ -0,0 +1,90 @@ + + * @copyright Copyright (c) 2009 Brotkin Ivan + */ + +class Kohana_Editor_Ckeditor extends Editor +{ + + public static $path = 'media/ckeditor'; + public static $scriptname = 'ckeditor.js'; + public static $configfile = 'config.js'; + + public $skin = 'kama'; + public $theme = 'default'; + public $toolbar = 'Full'; + + public function js() + { + return array(self::$path.'/'.self::$scriptname); + } + + public function render($print = TRUE, $create_field = TRUE) + { + + if ( FALSE === self::$language) + { + self::$language = substr(I18n::$lang, 0, 2); + } + + $result = ''; + + if (TRUE == $create_field) + { + // Create textarea with some config values + $result.= form::textarea($this->fieldname, $this->value, array('width'=>$this->width, 'height'=>$this->height, 'id'=>$this->fieldname))."\r\n"; + } + + $result .= ''; + + if ($print===TRUE) + { + // Echo code + echo $result; + } + + // return generated code + return $result; + } + + public function set($field, $value) + { + if (in_array($field, array('skin', 'theme', 'toolbar'))) + { + $this->$field = $value; + } + elseif ($field == 'configfile') + { + self::$$field = $value; + } + else + { + return parent::set($field, $value); + } + + return $this; + } + +} diff --git a/application/classes/model/.gitignore b/application/classes/model/.gitignore deleted file mode 100644 index 8b13789..0000000 --- a/application/classes/model/.gitignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/classes/model/page.php b/application/classes/model/page.php new file mode 100644 index 0000000..bdf315c --- /dev/null +++ b/application/classes/model/page.php @@ -0,0 +1,43 @@ + array('data_type' => 'int', 'is_nullable' => FALSE), + 'name' => array('data_type' => 'string', 'is_nullable' => FALSE), + 'content' => array('data_type' => 'mediumtext', 'is_nullable' => FALSE), + 'order' => array('data_type' => 'int', 'is_nullable' => TRUE), + ); + + public function get_name($id){ + return DB::select('name')->from('pages')->where('id','=',$id)->execute()->current(); + } + public function update_name($id,$name){ + try { + $total_rows = DB::update('pages')->set(array('name' => $name))->where('id','=',$id)->execute(); + return $total_rows; + } + catch ( Database_Exception $e ){ + return $e->getMessage(); + } + } + public function insert_page($name, $contents, $order){ + try { + list($insert_id, $total_rows) = DB::insert('pages', array('name', 'contents', 'order')) + ->values(array($name, $contents, $order)) + ->execute(); + return $total_rows; + } + catch ( Database_Exception $e ){ + return $e->getMessage(); + } + } + public function delete_page($id){ + try { + $total_rows = DB::delete('pages')->where('id','=',$id)->execute(); + return $total_rows; + } + catch( Database_Exception $e ) { + return $e->getMessage(); + } + } +} // End Model_Page diff --git a/application/config/.gitignore b/application/config/.gitignore deleted file mode 100644 index 8b13789..0000000 --- a/application/config/.gitignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/config/auth.php b/application/config/auth.php new file mode 100644 index 0000000..43fb648 --- /dev/null +++ b/application/config/auth.php @@ -0,0 +1,16 @@ + 'ORM', + 'hash_method' => 'sha256', + 'hash_key' => "hello this is molly johnson from Wild Jelly", + 'lifetime' => 1209600, + 'session_key' => 'auth_user', + + // Username/password combinations for the Auth File driver + 'users' => array( + // 'admin' => 'b3154acf3a344170077d11bdb5fff31532f679a1919e716a02', + ), + +); diff --git a/application/config/database.php b/application/config/database.php new file mode 100644 index 0000000..9733055 --- /dev/null +++ b/application/config/database.php @@ -0,0 +1,57 @@ + array + ( + 'type' => 'mysql', + 'connection' => array( + /** + * The following options are available for MySQL: + * + * string hostname server hostname, or socket + * string database database name + * string username database username + * string password database password + * boolean persistent use persistent connections? + * + * Ports and sockets may be appended to the hostname. + */ + 'hostname' => 'localhost', + 'database' => 'web-site', + 'username' => 'root', + 'password' => 'absaka1', + 'persistent' => FALSE, + ), + 'table_prefix' => '', + 'charset' => 'utf8', + 'caching' => FALSE, + 'profiling' => TRUE, + ), + 'alternate' => array( + 'type' => 'pdo', + 'connection' => array( + /** + * The following options are available for PDO: + * + * string dsn Data Source Name + * string username database username + * string password database password + * boolean persistent use persistent connections? + */ + 'dsn' => 'mysql:host=localhost;dbname=kohana', + 'username' => 'root', + 'password' => 'r00tdb', + 'persistent' => FALSE, + ), + /** + * The following extra options are available for PDO: + * + * string identifier set the escaping identifier + */ + 'table_prefix' => '', + 'charset' => 'utf8', + 'caching' => FALSE, + 'profiling' => TRUE, + ), +); diff --git a/application/config/editor.php b/application/config/editor.php new file mode 100644 index 0000000..f77233f --- /dev/null +++ b/application/config/editor.php @@ -0,0 +1,48 @@ + array + ( + 'width' => 300, + 'height' => 1000, + 'fieldname' => 'content' + ), + + 'tinymce' => array + ( + 'driver' => 'tinymce', + 'width' => 500, + 'height' => 300, + 'fieldname' => 'text', +/* 'params' => array + ( + + ),*/ + ), + + 'ckeditor' => array + ( + 'driver' => 'ckeditor', + 'width' => 400, + 'height' => 600, + 'params' => array + ( + 'skin' => 'kama', + 'extraPlugins' => 'autogrow', + ), + ), +); diff --git a/application/i18n/.gitignore b/application/i18n/.gitignore deleted file mode 100644 index 8b13789..0000000 --- a/application/i18n/.gitignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/logs/.gitignore b/application/logs/.gitignore deleted file mode 100644 index 80e609a..0000000 --- a/application/logs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -[^.]* \ No newline at end of file diff --git a/application/messages/.gitignore b/application/messages/.gitignore deleted file mode 100644 index 8b13789..0000000 --- a/application/messages/.gitignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/views/.gitignore b/application/views/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/application/views/admin/pages/add.php b/application/views/admin/pages/add.php new file mode 100644 index 0000000..ef7e561 --- /dev/null +++ b/application/views/admin/pages/add.php @@ -0,0 +1,29 @@ + + + +Добавление страницы + + +set('width', '')->set('height', 300); +if ($editor->css() != NULL) foreach($editor->css() as $css) echo html::style($css); +if ($editor->js() != NULL) foreach($editor->js() as $js) echo html::script($js); +?> + + +
+
+

Существующие страницы:

+execute() ?> +
+

Добавление страницы

+ +

+

+ +

+

+ render(TRUE, FALSE); ?> +

+ + + diff --git a/application/views/admin/pages/delete.php b/application/views/admin/pages/delete.php new file mode 100644 index 0000000..38ccc36 --- /dev/null +++ b/application/views/admin/pages/delete.php @@ -0,0 +1,19 @@ + + + +Удаление страницы + + + + +
+
+

Удаление страницы

+ + +

+

+

+ + + diff --git a/application/views/admin/pages/edit.php b/application/views/admin/pages/edit.php new file mode 100644 index 0000000..9fe6fc8 --- /dev/null +++ b/application/views/admin/pages/edit.php @@ -0,0 +1,26 @@ + + + +Редактирование страницы + + +set('width', '')->set('height', 300); +if ($editor->css() != NULL) foreach($editor->css() as $css) echo html::style($css); +if ($editor->js() != NULL) foreach($editor->js() as $js) echo html::script($js); +?> + + +
+
+

Редактирование страницы

+ +

+

+ +

+

+ render(TRUE, FALSE); ?> +

+ + + diff --git a/application/views/admin/pages/view.php b/application/views/admin/pages/view.php new file mode 100644 index 0000000..9da51f7 --- /dev/null +++ b/application/views/admin/pages/view.php @@ -0,0 +1,30 @@ + + + +Обзор страниц + + + + +
+
+

Существующие страницы:

+ + + + +$page):?> + + + + + + + +
IDКороткое имяПорядок
id;?>name;?>order;?>id, '');?>id, '');?>
+ +

Добавить страницу

+

Разлогиниться

+ + + diff --git a/application/views/admin/users/login.php b/application/views/admin/users/login.php new file mode 100644 index 0000000..442331c --- /dev/null +++ b/application/views/admin/users/login.php @@ -0,0 +1,20 @@ + + + +Аутентификация пользователя + + + + +
+
+

Введите логин и пароль для получения доступа к разделу.

+
+ +

+

+

+ +
+ + diff --git a/application/views/admin/users/register.php b/application/views/admin/users/register.php new file mode 100644 index 0000000..8a999e4 --- /dev/null +++ b/application/views/admin/users/register.php @@ -0,0 +1,20 @@ + + + +Регистрация пользователя + + + + +
+
+ +

+

+

+

+

+

+ + + diff --git a/application/views/admin/users/view.php b/application/views/admin/users/view.php new file mode 100644 index 0000000..2bcbcac --- /dev/null +++ b/application/views/admin/users/view.php @@ -0,0 +1,27 @@ + + + +Обзор пользователей + + + + +
+
+ + + + +$user):?> + + + + + +
IDЛогин
id;?>username;?>
+ +

Зарегистрировать пользователя

+

Разлогиниться

+ + + diff --git a/application/views/navigation.php b/application/views/navigation.php new file mode 100644 index 0000000..6357178 --- /dev/null +++ b/application/views/navigation.php @@ -0,0 +1,5 @@ + diff --git a/application/views/page.php b/application/views/page.php new file mode 100644 index 0000000..a38eb04 --- /dev/null +++ b/application/views/page.php @@ -0,0 +1,25 @@ + + + + +<?php echo $title; ?> + + + + +
+
+ +
+ +
+ +
+ + + diff --git a/assets/ckeditor/.htaccess b/assets/ckeditor/.htaccess new file mode 100644 index 0000000..94d69cd --- /dev/null +++ b/assets/ckeditor/.htaccess @@ -0,0 +1,24 @@ +# +# Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +# For licensing, see LICENSE.html or http://ckeditor.com/license +# + +# +# On some specific Linux installations you could face problems with Firefox. +# It could give you errors when loading the editor saying that some illegal +# characters were found (three strange chars in the beginning of the file). +# This could happen if you map the .js or .css files to PHP, for example. +# +# Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. +# All FCKeditor files are Unicode encoded. +# + +AddType application/x-javascript .js +AddType text/css .css + +# +# If PHP is mapped to handle XML files, you could have some issues. The +# following will disable it. +# + +AddType text/xml .xml diff --git a/assets/ckeditor/CHANGES.html b/assets/ckeditor/CHANGES.html new file mode 100644 index 0000000..900c169 --- /dev/null +++ b/assets/ckeditor/CHANGES.html @@ -0,0 +1,1239 @@ + + + + + Changelog — CKEditor + + + + +

+ CKEditor Changelog +

+

+ CKEditor 3.5.3

+

+ New features:

+
    +
  • #4890 : Added the possibility to edit the rel attribute for links.
  • +
  • #7004 : Allow loading plugin translations even if they are not present in the plugin definition.
  • +
  • #7315 : Firing the resize event on dialog window instances is now possible.
  • +
  • #7259 : Dialog window definition allows to specify initial width and height values.
  • +
  • #7131 : List item numbering is now supported on pasting from Microsoft Word.
  • +
+

+ Fixed issues:

+
    +
  • #1272 : [WebKit] It is now possible to apply styles to collapsed selections in Safari and Chrome.
  • +
  • #7054 : The tooltips for special characters are now lowercased, making them more readable.
  • +
  • #7102 : "Replace DIV" sample did not work when double-clicking inside the formatted text.
  • +
  • #7088 : Loading of plugins failed on new instances of the editor after the Insert Special Character dialog window was used.
  • +
  • #6215 : Removal of inline styles now also removes overrides.
  • +
  • #6144 : Rich text drop-down lists have wrong height when toolbar is wrapped.
  • +
  • #6387 : AutoGrow may cause an error when editor instance is destroyed too quickly after a height change.
  • +
  • #6901 : Mixed direction content was not properly respected in a shared toolbar setting.
  • +
  • #4809 : Table-related tags are output in wrong order.
  • +
  • #7092 : Corrupted toolbar button state for inline style after switching to Source.
  • +
  • #6921 : Pasted text marked by SCAYT in one language is not re-checked if another spellchecking language is selected in the editor.
  • +
  • #6614 : Enhancement of the resize handle in RTL.
  • +
  • #5924 : Flash plugin now recognizes Flash content without an embed tag.
  • +
  • #4475 : Protected source in attributes and inline CSS text is not handled correctly.
  • +
  • #6984 : [FF] Trailing line breaks are lost in ENTER_BR.
  • +
  • #6987 : [IE] Text selection lost when calling editor::insertHtml from a dialog window in some situations.
  • +
  • #6865 : BiDi mirroring does not work when a text direction change is done through a dialog window.
  • +
  • #6966 : [IE] Unintended paragraph is created in an empty document in enterMode set for BR and DIV.
  • +
  • #7084 : SCAYT dialog window is now working properly with more than one editor instance in a page.
  • +
  • #6662 : [FF] List structure pasting error caused by a regression from FF3.5.x is now fixed.
  • +
  • #7300 : Link dialog window now loads numeric values correctly.
  • +
  • #7330 : New list items no longer inherit the value attribute from their sibling.
  • +
  • #7293 : The "Automatic" color button is now presented correctly without focus inside the editor.
  • +
  • #7018 : [IE] Toolbar drop-down lists did not have a border around them.
  • +
  • #7073 : Image dialog window no longer allows zero height and width value to be entered.
  • +
  • #7316 : [FF] Clicking on "Paste" button incorrectly breaks the line at the cursor position.
  • +
  • #6751 : Inline whitespaces are incorrectly stripped when pasting from Word.
  • +
  • #6236 : [IE] Fixing malformed nested list structure which was introduced by the Backspace key.
  • +
  • #6649 : [IE] Selection of the full table sometimes does not work.
  • +
  • #6946 : HTML parser is now able to fix orphan list items.
  • +
  • #6861 : Indenting a list item should retain the text direction.
  • +
  • #6938 : Outdenting a list item should retain the text direction.
  • +
  • #6849 : Correct Enter key behavior on list item.
  • +
  • #7113 : [WebKit] Undesired document scroll on click after scrolling.
  • +
  • #6491 : Undesired Image dialog window dimension lock reset on URL change.
  • +
  • #7284 : [FF Quirks] Maximize now works correctly.
  • +
  • #6609 : [IE9] Browser in high contrast mode is not properly detected.
  • +
  • #7222 : [WebKit] Impossible to apply a single style to a collapsed selection without giving the editor focus.
  • +
  • #7180 : [IE9] When using Kama skin and RTL layout dialog window buttons were not being displayed correctly.
  • +
  • #7182 : [IE9] When using Office2003/v2 skin and RTL layout dialog window shadows were corrupted.
  • +
  • #6913 : Invalid escape sequence (\b) was used in the PHP integration.
  • +
  • #5757 : [IE6] Text was not wrapping in the accessibility instructions dialog window.
  • +
  • [6604] : Xml.js and Ajax.js are now available as plugins ('xml' and 'ajax').
  • +
  • #7304 : Microsoft Word cleanup function is not always invoked when clicking on the "Paste From Word" button.
  • +
  • #6658 : [IE] Pasting text from Microsoft Word with one or more tabs between list items was failing.
  • +
  • #7433 : [IE9] ENTER_BR at the end of a block breaks due to an IE9 regression.
  • +
  • #7432 : [WebKit] Unable to create a new list in an empty document.
  • +
  • #4880 : CKEditor changes tag style inside HTML comment with cke_protected.
  • +
  • #7023 : [IE] JavaScript error when a Selection Field is inserted into a page.
  • +
  • #7034 : Inserting special characters into styled text.
  • +
  • #7132 : Paste toolbar buttons are becoming disabled.
  • +
  • #7138 : The api.html sample in Opera does not work as expected.
  • +
  • #7160 : Cannot paste the form element on top of the page.
  • +
  • #7171 : Double-clicking an image in non-editable content opens the editing dialog window.
  • +
  • #7455 : Extra line break is added automatically to the preformatted element.
  • +
  • #7467 : [Firefox] Extra br element is added in a nested list.
  • +
  • Updated the following language files:
      +
    • #7124 : Czech;
    • +
    • #7126 : French;
    • +
    • #7140 : Catalan;
    • +
    • #7215 : Faroese;
    • +
    • #7177 : Finnish;
    • +
    • #7163 : Norwegian (no and nb);
    • +
    • #7219 : Swedish;
    • +
    • #7183 : Afrikaans;
    • +
    • Hebrew;
    • +
    • Spanish;
    • +
    • Polish;
    • +
    • German;
    • +
  • +
+

+ CKEditor 3.5.2

+

+ Fixed issues:

+
    +
  • #7168 : [IE9] Destroying an editor instance throws an error.
  • +
  • #7169 : [IE9] Menu item has incorrect height.
  • +
  • #7178 : [IE9] Read-only attributes do not work in IE9.
  • +
  • #7181 : [IE9] Toolbar items are not aligned in v2 and Office2003 skins.
  • +
  • #7174 : [IE9] Elements path does not load correctly when the editor is switched back from Source to WYSIWYG.
  • +
+

+ CKEditor 3.5.1

+

+ New features:

+
    +
  • #6107 : It is now possible to remove block styles using Styles and Paragraph Format drop-down lists.
  • +
  • #5590 : Remove Format command works in collapsed selections.
  • +
  • #5755 : The dialog_buttonsOrder option now works in Internet Explorer.
  • +
  • #6869 : The data-cke-nostyle attribute (which was introduced for escaping the element from been influenced by the style system since 3.5) is deprecated in favor of the new data-nostyle attribute.
  • +
  • Revised sample pages with code examples and clarifications.
  • +
+

+ Fixed issues:

+
    +
  • #5855 : Updating a link multiple times generates wrong href attribute.
  • +
  • #6166 : Error on Maximize command, when the toolbar button is not shown.
  • +
  • #6607 : Table cell "merge down" and "merge right" commands work only once.
  • +
  • #6228 : Merge down does not work, throwing a JavasSript error.
  • +
  • #6625 : BIDI: Mixed LTR/RTL direction causes incorrect behavior.
  • +
  • #6881 : IFrame capitalization is now consistent throughout labels.
  • +
  • #6686 : BIDI: [FF] When we apply explicit language direction to a numbered/bulleted list, the corresponding language direction toolbar icon is not highlighted.
  • +
  • #6566 : It is now possible to exit a blockquote using ENTER_BR.
  • +
  • #6868 : Partial (invalid) list structure crashes the editor on load.
  • +
  • #6804 : Buggy behavior when editing the legend element inside a fieldset.
  • +
  • #6724 : [IE7] Nested list display bug on empty list item.
  • +
  • #6715 : List items do not create paragraphs after the list placed in a table cell is removed.
  • +
  • #6695 : [Webkit] Display bug after the editor is restored from the full screen mode.
  • +
  • #6661 : [IE] Pre-formatted style does not preserve applied text direction.
  • +
  • #6655 : Using the editor resize grip causes small visual offsets.
  • +
  • #6604 : The div element should be used as a formatting block in ENTER_BR.
  • +
  • #6249 : BIDI: List item bullets are off viewport with RTL text direction.
  • +
  • #6610 : BIDI: ENTER_BR change direction in one line out of multiple.
  • +
  • #6872 : [IE] Link target field is not populated properly when no target is set.
  • +
  • #6880 : Samples: Added a user-friendly message for users on servers without PHP support.
  • +
  • #6628 : Setting config.enterMode from PHP fails.
  • +
  • #6278 : Comments were moved above the br tags.
  • +
  • #6687 : Empty tag should be removed in inline-style format.
  • +
  • #6645 : Allow to configure whether " (double quotes) characters should be encoded in the contents.
  • +
  • #6336 : IE: (double)clicking an input type="submit" button submitted the form.
  • +
  • #6646 : Context menu was not working for text inputs present in the initial content.
  • +
  • #6641 : Copying and pasting links inside the editor was not working.
  • +
  • #4208 : The disableObjectResizing setting now works in IE.
  • +
  • #6242 : [IE] Editing existing links with href of a relative path mangles containing text.
  • +
  • #5930 : [IE] Style definitions are no longer lowercased.
  • +
  • #5361 : Preview window's title should reflect the title tag in full page mode.
  • +
  • #5522 : [IE] In versions < 8 or compatibility mode, type="text" was missing in text fields.
  • +
  • #6126 : [IE] Avoid problems if there are two buttons named "submit".
  • +
  • #6791 : [IE7] Editor did not show up when the name of a replaced textarea matched the name of a meta tag in the page.
  • +
  • #5684 : [FF] When forcePasteAsPlainText is used, the cursor disappears after paste.
  • +
  • #6390 : Prevent toolbar dialog window buttons from being clicked twice.
  • +
  • #6684 : [Webkit] Toolbar buttons are not wrapping correctly when the editor is displayed inside a table.
  • +
  • #6703 : [IE] editor focus event not fired in an instance, when a dialog window closes.
  • +
  • #6873 : Difficult to drag the resize grip of the spell checker dialog window.
  • +
  • #6896 : [Webkit] Unable to paste into source area when the editor is maximized.
  • +
  • #6020 : The state of the Cut, Copy, and Paste toolbar now matches the state of the context menu buttons.
  • +
  • #5256 : JavaScript error thrown when percent (%) sign is used in image URL.
  • +
  • #6577 : [FF] Selection error when an element containing the editor instance is hidden.
  • +
  • #5500 : [IE] value attribute of text input dialog window field was missing.
  • +
  • #6665 : [IE] name field of Link dialog window was missing.
  • +
  • #6639 : Line-breaks inside pasted list item from Microsoft Word break the list structure.
  • +
  • #6909 : [IE] GIF icons of toolbar button from custom plugins are not diplayed in zoom level 100%.
  • +
  • #6860 : [FF] Double-clicking the placeholder element in order to open a Placeholder dialog window throws a JavaScript error.
  • +
  • #6630 : Empty pre elements are output differently in various browsers.
  • +
  • #6568 : Insert table row/column does not work with spanning.
  • +
  • #6735 : Inaccurate read-only selection detection.
  • +
  • #6728 : BIDI: Change direction does not work with list nested inside a blockquote.
  • +
  • #6432 : Inserting a table in place of a fully selected list results in a JavaScript error.
  • +
  • #6438 : [IE] Performance enhancement when typing inside an element with many child nodes.
  • +
  • #6970 : [IE] Dialog window shadows were presented inaccurately.
  • +
  • #6672 : [IE] Unnecessary br element is no longer inserted after a form.
  • +
  • #7087 : [FF] Sometimes it was not possible to move cursor out of link at the end of block.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.5

+

+ New features:

+
    +
  • #4090 : Full Adobe AIR support.
  • +
  • #5084 : Dialog windows are now resizable with a grip located in the footer.
  • +
  • #5755 : Introduced the dialog_buttonsOrder setting, making it possible to control the buttons order.
  • +
  • #4648 : Added the new iFrame plugin.
  • +
  • #6010 : The Automatic option of the font/background color panel now represents the real color.
  • +
  • #5654 : New "placeholder" plugin.
  • +
  • #6334 : CKEditor now uses HTML5's data-* attributes for its internal attributes.
  • +
  • #6103 : It's now possible to control the styling of inline read-only elements with the disableReadonlyStyling setting. It's also possible to avoid inline-styling any element by setting its "data-cke-nostyle" attribute to "1".
  • +
  • #5404 : fillEmptyBlocks configuration option of v2 is now available.
  • +
  • #5367 : New CKEDITOR.editor#insertText method (check api.html sample page for usages) is now provided to insert plain text into editor.
  • +
  • #5915 : New removeDialogTabs configuration option to hide certain dialog tabs.
  • +
+

+ Fixed issues:

+
    +
  • #4821 : Icons in the toolbar were distorted with IE and zoom != 100%.
  • +
  • #5587 : Visual improvements in dialogs, reinforce field label on separate line.
  • +
  • #4652 : Now it's able to disable editor context menu by simply removing the "contextmenu" plugin.
  • +
  • #5599 : Labels of "specialchar" dialog are now translated.
  • +
  • #6419 : [IE] List creation by merging problem.
  • +
  • #6502 : Removed IE6 image preloading, which was used to defect the duplicate request of background images.
  • +
  • #6822 : Added labels to fake objects.
  • +
  • #6898 : [IE6] Toolbar icons becomes invisible in RTL.
  • +
  • Updated the following language files:
      +
    • Hebrew
    • +
  • +
+

+ CKEditor 3.4.3

+

+ Fixed issues:

+
    +
  • #6554 : [Webkit] cannot type after inserting Page Break.
  • +
  • #6569 : Indentation now complies with text direction of the only item.
  • +
  • #6579 : The jQuery adapter was not working properly and was turned on in incompatible environments.
  • +
  • #6644 : Restrict onmousedown handler to the toolbar area.
  • +
  • #6656 : Panelbutton's buttons became active when clicking on Source.
  • +
  • #6248 : Whitespaces (nbsp elements) were incorrectly added into empty table cells and list items.
  • +
  • #6575 : Tabs disappearing in Link dialog window after a specific sequence of actions.
  • +
  • #6510 : Margin mirroring does not respect style configuration.
  • +
  • #6471 : BIDI: Pressing Decrease Indent in an RTL bulleted list causes incorrect behaviour.
  • +
  • #6479 : BIDI: Language direction is not being preserved when pressing Enter after a Paragraph Format was applied.
  • +
  • #6670 : BIDI: Indent & List icons are not reversed when we apply RTL direction to a paragraph with any of Paragraph Formatting options.
  • +
  • #6640 : Floating panels are now being closed when switching modes.
  • +
  • #4790 : Remove list with multiple items in enterBr doesnot preserve line breaks.
  • +
  • #6297 : Floated inline elements are not taking part in behavior of blocks anymore.
  • +
  • #6171 : [Firefox] Opening rich content drop-down list scrolls host page to the top when editor has a vertical scrollbar.
  • +
  • #6330 : List markers from MS Word with Roman numbering are not preserved.
  • +
  • #6720 : Attribute protection might detect wrong elements.
  • +
  • #6580 : [IE9] Flash dialog window does not get filled up.
  • +
  • #6447 : Decreasing indentation of a list with indentClasses config does not work.
  • +
  • #5894 : Adding custom buttons at the bottom of a dialog window does not cause it to expand to include its contents.
  • +
  • #6513 : Wrong ARIA attributes created on list options of Styles drop-down list.
  • +
  • #6150 : [Safari] Color dialog window was broken.
  • +
  • #6747 : Full screen layout issue caused by page element focus outside editor.
  • +
  • #6779 : Clicking the body element on elements path turns the selection on and off immediately.
  • +
  • #6781 : [IE7] Dialog windows are broken with RTL, Office 2003 and v2 skins.
  • +
  • #6798 : [IE7] Dialog window buttons disappearing in RTL after dragging.
  • +
  • #6806 : [IE7] Dialog window buttons invisible on focus.
  • +
  • #6588 : Copy and paste adds <span> if SCAYT is enabled.
  • +
  • #6673 : IE Target combo for Image Link shown as blank even when we select <not set> as an option.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.4.2

+

+ New features:

+
    +
  • #5024 : Added a sample that shows how to output HTML that is valid for Flash.
  • +
+

+ Fixed issues:

+
    +
  • #5237 : English text in dialogs' title was flipped when using RTL language (office2003 and v2 skins).
  • +
  • #6289 : Deleting nested table removed the parent cell.
  • +
  • #6341 : The editor contents now have the text cursor.
  • +
  • #6153 : Chrome: tab focus is wrong.
  • +
  • #6261 : Focus and infinite loop between multiple editors.
  • +
  • #6170 : Dedicated class names are removed from floating panels when opening another panel.
  • +
  • #6339 : Autogrow plugin now doesn't work on maximized editors.
  • +
  • #6237 : BIDI: Applying same language direction to all paragraphs not working.
  • +
  • #6353 : [IE] Resize was broken with office2003 and v2 skins.
  • +
  • #6375 : Avoiding errors when hiding the editor after the blur event.
  • +
  • #6133 : Styled paragraphs result on buggy list creation.
  • +
  • #5074 : Link target is not removed when changing to popup.
  • +
  • #6408 : [IE] Autogrow now works correctly on Quirks.
  • +
  • #6420 : [IE] The table properties dialog now correctly retrieves the caption text.
  • +
  • #6141 : It was impossible to outdent a list when indentOffset was set to 0.
  • +
  • #6377 : FF width and height are not shown for smiley in Image properties dialog.
  • +
  • #5399 : Lists pasted from Word do not maintain their nesting.
  • +
  • #6225 : [FF] Cannot transform several lines to list with enterMode BR.
  • +
  • #6467 : [FF] It is now possible to disable the plugin command on "mode" event.
  • +
  • #6461 : Attributes are now being kept when changing block formatting.
  • +
  • #6226 : BIDI: Language direction applied to a Paragraph is removed when we apply one of Paragraph formatting options.
  • +
  • #5395 : [Opera] Native context menu incorrectly opened after Opera 10.2.
  • +
  • #6444 : [Opera] Close panels and dialogs don't return focus to wysiwyg frame.
  • +
  • #6332 : IE: V2 skin bottom dialog's border broken.
  • +
  • #5646 : Parser incorrectly removes inline element when there's only one comment node enclosed.
  • +
  • #6189 : Minor code size reduction.
  • +
  • #5045 : uiColor behaved wrong if multiple editors were used with period in their names.
  • +
  • #5766 : Config entry "ignoreEmptyParagraph" should only remove one single empty paragraph in document.
  • +
  • #5931 : Unable to apply inline style because of nested elements with same style name.
  • +
  • #6083 : Dialog close sometimes cause collapsed editor selection before the insertion.
  • +
  • #6253 : BIDI: creating a Numbered/Bulleted list causing improper behavior on bidi.
  • +
  • #4023 : [Opera] Maximize plugin.
  • +
  • #6403 : [Opera] Font name options are not correctly marked in dropdown list.
  • +
  • #4534 : [Opera] Arrow key to navigate through combo list has side effects of window scrolling.
  • +
  • #6534 : [Opera] Menu key brings up both CKEditor and browser context menu.
  • +
  • #6534 : [Opera] Menu key brings up both CKEditor and browser context menu.
  • +
  • #6416 : [IE9] Unable to make text selection with mouse in source area.
  • +
  • #6417 : [IE9] Context menu opens at the upper-left corner always.
  • +
  • #6501 : [IE9] Context menu item layout is broken.
  • +
  • #6099 : BIDI: when we apply explicit language direction to Numbered/Bulleted List the corresponding BIDI Tool bar icon is not highlighted in the Toolbar.
  • +
  • #6100 : BIDI: when we change Table language direction indentation of text in Table cells is not applied correctly.
  • +
  • #6376 : BIDI: buttons should not toggle the base language direction.
  • +
  • #6235 : BIDI: Applying direction to multi-paragraph selection within a div.
  • +
  • #6187 : [IE6] Multi-instance loading produces 404s on background images.
  • +
  • #5446 : Setting config.filebrowserImageBrowseUrl results in displaying also Browser Server on links.
  • +
  • #5626 : CKeditor 3.2.1 : html content attached makes ckeditor crash the browser FF/IE.
  • +
  • #6508 : BiDi: Margin mirroring logic doesn't honor CSS direction.
  • +
  • #6043 : BIDI: When we apply RTL direction to a right aligned Paragraph, Paragraph is not moved to the left & Alignment of Paragraph is not changed.
  • +
  • #6485 : BIDI: When direction is applied on partial selected list, the style is been incorrectly applied to the entire list.
  • +
  • #6087 : Cursor of input fields in dialog isn't visible in RTL.
  • +
  • #5595 : Extra leading spaces added in preformatted block.
  • +
  • #6094 : Match full word option doesn't stop on block boundaries.
  • +
  • #5730 : [Safari] Continual pastes (holding paste key) breaks document contents.
  • +
  • #5850 : [IE] Inline style misbehaviors at the beginning of numbered/bulleted list.
  • +
  • Updated the following language files:
      +
    • #6427 : Ukrainian;
    • +
    • #6464 : Finnish;
    • +
    • Hebrew;
    • +
  • +
+

+ CKEditor 3.4.1

+

+ New features:

+ +

+ Fixed issues:

+
    +
  • #6027 : Modifying Table Properties by selecting more than one cell caused issues.
  • +
  • #6146 : IE: Floating panels were being opened in the wrong place in RTL pages with horizontal scrollbars.
  • +
  • #6055 : The timestamp is now added only once to each loaded file.
  • +
  • #6097 : The bookmarks now use the right name.
  • +
  • #5717 : Removed the scayt_contextMenuOntop setting and the SCAYT context menu options are always on top.
  • +
  • #5956 : [FF] It was impossible to create an editor inside an hidden container.
  • +
  • #5753 : It was impossible to have a default value for the name field in the select dialog.
  • +
  • #6041 : BIDI: Direction of Increase Indent & Decrease Indent icons are not reversed after changing Lang direction to RTL.
  • +
  • #6138 : List indentation is not working.
  • +
  • #5649 : Image dialog too wide when many styles are set.
  • +
  • #5715 : Cell color picker dialog returns focus to document.
  • +
  • #6108 : Fixed div style.
  • +
  • #5336 : Remove object style.
  • +
  • #6155 : [[FF]] Modifying Table Header Properties by selecting first Row, causing several issues.
  • +
  • #6163 : Focus not going to Tabs in Image dialog when we went to Edit the Image.
  • +
  • #6177 : IE we can't start Numbered/Bulleted list on a Empty page.
  • +
  • #5413 : Browser error after pasting html table in CKEditor.
  • +
  • #6034 : Horizontal Alignment applied to Table cell is not updated correctly in the Toolbar.
  • +
  • #6112 : BIDI: Alignment set to text in Table cell is not shown in the Tool bar when we press Enter to start a new Paragraph.
  • +
  • #6117 : BIDI: Language direction is changing when we come out of Numbered/Bulleted list.
  • +
  • #6182 : Language Direction field on the Advanced tab of Table Properties dialog has a fixed pixel width.
  • +
  • #5487 : Fullpage writer problem with line-break.
  • +
  • #6197 : The CKEDITOR.loader base path auto-detection was not working with the _source folder.
  • +
  • #6240 : Font Names & Font Sizes should be shown Left Align even for RTL Languages.
  • +
  • #5975 : Page-break should have proper Alt Text instead of Unknown object. so that JAWS reads it properly.
  • +
  • #6255 : Inserting a page break as the first node triggered an error.
  • +
  • #6188 : [IE7] Automatic color button had the wrong cursor.
  • +
  • #6129 : The show blocks' labels are now shown in the right for RTL languages.
  • +
  • #5421 : &shy; entity not converted when config.entities=false.
  • +
  • #5769 : xhtml code generation problem &nbsp; instead of &#160; (htmlentities, entities,entities_additional,..., configuration).
  • +
  • #4472 : [FF3] Browser window scrolls to loaded CKEditor.
  • +
  • #6230 : Fixed invalid parameter count for setTimeout function call.
  • +
  • #5335 : Several lines' formatted data will be merged to one line when we apply Numbers/Bullets.
  • +
  • #5353 : wrong width of editor after resize() called in Firefox 3.6.
  • +
  • #5778 : [IE] Unwanted scroll on first mouse right-click.
  • +
  • #5218 : [FF] Copy/paste of an image from same domain changed URL to relative URL.
  • +
  • #6265 : Popup window properties were visible in the link dialog's target tab when nothing was selected.
  • +
  • #6075 : [FF] Newly created links didn't fill in information on edit.
  • +
  • #6183 : The toolbar panels options sometimes had the contents' link color.
  • +
  • #6192 : [WebKit] Inserting smileys was not working because of editor focus issues.
  • +
  • #6178 : [WebKit] Inserting elements by code was failing if the editor didn't receive the focus first.
  • +
  • #6179 : [WebKit] The Image dialog was not working if the editor didn't receive the focus first.
  • +
  • #4657 : [Opera] Styles where not working with collapsed selections.
  • +
  • #5839 : "Insert row after" was removing the ids of the elements from the clicked row.
  • +
  • #6315 : DIV plugin TT #2885 regression.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.4

+

+ Fixed issues:

+
    +
  • #6118 : Initial focus is now set to the tabs in the table properties dialog.
  • +
  • #6135 : The dialogadvtab plugin now uses the correct label.
  • +
  • #6125 : Focus was lost after applying commands in Opera.
  • +
  • #6137 : The table dialog was missing the default width value on second opening.
  • +
+

+ CKEditor 3.4 Beta

+

+ New features:

+
    +
  • #5909 : New BiDi feature, making it possible to switch the base language direction of block elements.
  • +
  • #5268 : Introducing the "tableresize" plugin, which makes it possible to resize tables columns by mouse drag. It's not enabled by default, so it must be enabled in the configurations file.
  • +
  • #979 : New enableTabKeyTools configuration to allow using the TAB key to navigate through table cells.
  • +
  • #4606 : Introduce the "autogrow" plugin, which makes the editor resize automatically, based on the contents size.
  • +
  • #5737 : Added support for the HTML5 contenteditable attribute, making it possible to define read only regions into the editor contents.
  • +
  • #5418 : New "Advanced" tab introduced on the Table Properties dialog. It's based on the new dialogadvtab plugin.
  • +
  • #6082 : Introduced the useComputedState setting, making it possible to control whether toolbar features, like alignment and direction, should reflect the "computed" selection states, even when the effective feature value is not applied.
  • +
+

+ Fixed issues:

+
    +
  • #5911 : BiDi: List items should support and retain correct base language direction
  • +
  • #5689 : Make it possible to run CKEditor inside of Firefox chrome.
  • +
  • #6042 : It wasn't possible to align a paragraph with the dir attribute to the opposite direction.
  • +
  • #6058 : Fixed a small style glitch with file upload fields in IE+Quirks.
  • +
+

+ CKEditor 3.3.2

+

+ New features:

+
    +
  • #5882 : Introduce the dialog#selectPage event, replicating the OnDialogTabChange feature available in FCKeditor 2.
  • +
  • #5927 : The native controls in ui.dialog.elements can be styled with the controlStyle definition.
  • +
+

+ Fixed issues:

+
    +
  • #1644 : Removed references to cursor:hand in the stylesheets.
  • +
  • #5411 : Anchor, hidden fields and Page-Break objects can no longer be resized.
  • +
  • #5456 : Initial focus incorect in api_dialog sample page.
  • +
  • #5628 : Incorrect <pre> siblings merging.
  • +
  • #5829 : Adding validation for start number field in list style dialog.
  • +
  • #5845 : Context menu on empty list item loses selection.
  • +
  • #5860 : [IE] > in attribute values are incorrectly escaped.
  • +
  • #5905 : SCAYT is not any more enabled by default.
  • +
  • #5736 : Improved the text generated for mailto: links if no text was selected.
  • +
  • #4779 : Adjust resize_minWidth and resize_minHeight if smaller than actual dimensions.
  • +
  • #5687 : Navigation through colors is now compatible with RTL.
  • +
  • #4615 : [IE] Text fields are no longer disrupted in dialog with RTL.
  • +
  • #5887 : The number of columns in the smileys table is now configurable via the smiley_columns setting.
  • +
  • #5100 : It was possible to drag&drop some elements like context menu items or dropdown entries.
  • +
  • #5933 : Text color and background color panels don't have scrollbars anymore under office2003 and v2 skins.
  • +
  • #5943 : An error is no longer generated when using percent or pixel values in the image dialog.
  • +
  • #5951 : Avoid problems with security systems due to the usage of UniversalXPConnect.
  • +
  • #5441 : Avoid errors if the editor instance is removed from the DOM before calling its destroy() method.
  • +
  • #4997 : Provide better access to the native input in the ui.dialog.file element.
  • +
  • #5914 : Modified the Smileys dialog to make active only the images and not their borders.
  • +
  • #5565 : The scrollbar does not behaves erratically when opening a rich combo in RTL page.
  • +
  • #5843 : In CKEditor 3.3: When we set the focus in the 'instanceReady' event, FF3.6 is giving js error.
  • +
  • #5902 : paste and pastetext dialogs cannot be skinned easily.
  • +
  • #5959 : Dialog auto focus does not check for hidden tabs.
  • +
  • #5415 : Undo not working when we change the Table Properties for the table on a saved page.
  • +
  • #5435 : IE: we can't start Numbered/Bulleted list in Tables by Clicking on Insert/Remove Numbers/Bullets Icon.
  • +
  • #5832 : The JQuery adapter sample is not working properly with SSL.
  • +
  • #5728 : Text field & Upload Button in Upload Tab of Image Properties dialog are not shown Properly in Arabic.
  • +
  • #5436 : IE: Cursor goes to next Table Cell after we insert a Smiley in the Table Cell.
  • +
  • #5580 : Maximize does not work properly in the Office 2003 and V2 skins.
  • +
  • #5495 : The link dialog was breaking the undo system on some situations.
  • +
  • #5775 : Required field's label to contain a CSS class to allow it to be styled differently.
  • +
  • #5999 : Table dialog rows and columns fields are now marked as required.
  • +
  • #5693 : baseHref detection in the flash dialog now works correctly.
  • +
  • #5690 : Table cell's width attribute is now respected properly.
  • +
  • #5819 : Introducing the new removeFormatCleanup event and making sure remove format doesn't break the showborder plugin.
  • +
  • #5558 : After pasting on WebKit based browsers the editor now scrolls to the end of the pasted content.
  • +
  • #5799 : Correct plugin dependencies for the liststyle plugin with contextMenu and dialog.
  • +
  • #5436 : IE: The cursor was moving to the wrong position when inserting inline elements at the end of cells on tables.
  • +
  • #5984 : Firefox: CTRL+HOME was creating an unwanted empty paragraph at the start of the document.
  • +
  • #5634 : IE: It was needed to click twice in the editor to make it editable on some situations.
  • +
  • #5338 : Pasting from Open Office could lead on error.
  • +
  • #5224 : Some invalid markup could break the editor.
  • +
  • #5455 : It was not possible to remove formatting from pasted content on specific cases.
  • +
  • #5735 : IE: The editor was having focus issues when the previous selection got hidden by scroll operations.
  • +
  • #5563 : Firefox: The disableObjectResizing and disableNativeTableHandles settings stopped working.
  • +
  • #5781 : Firefox: Editing was not possible in an empty document.
  • +
  • #5293 : Firefox: Unwanted BR tags were being left in the editor output when it should be empty.
  • +
  • #5280 : IE: Scrollbars where reacting improperly when clicking in the bar space.
  • +
  • #5840 : Some dialog access keys are conflicting with "Ctrl + A", select all text behavior on text input.
  • +
  • #6059 : Changing list type didn't preserve the list's attributes.
  • +
  • #5193 : In Firefox, the element path options had the text cursor instead of the arrow.
  • +
  • #6073 : The list context menu was showing the wrong option when in a mixed list hierarchy.
  • +
  • #6074 : The Insert Table Column command was duplicating the selected column cells ids.
  • +
  • #6066 : The toolbar combos had the text cursor instead of the arrow.
  • +
  • #6062 : The toolbar buttons had the text cursor instead of the arrow.
  • +
  • #6068 : [IE7] A few labels were hidden in a RTL language.
  • +
  • #6000 : Safari and Chrome where scrolling the contents to the top when moving the focus to the editor.
  • +
  • #6090 : IE: Textarea with selection inside causes Link dialog issues.
  • +
  • #5079 : Page break in lists move to above the list when you switch from WYSIWYG to HTML mode and back.
  • +
  • Updated the following language files:
      +
    • Chinese Simplified;
    • +
    • Hebrew;
    • +
    • #5962 : German;
    • +
    • #5645 : Portuguese;
    • +
    • #5797 : Turkish;
    • +
  • +
+

+ CKEditor 3.3.1

+

+ Fixed issues:

+
    +
  • #5780 : Text selection lost when opening some of the dialogs.
  • +
  • #5787 : Liststyle plugin wasn't packaged into the core (CKEDITOR.resourceManager.load exception).
  • +
  • #5637 : Fix wrong nesting that generated "<head> must be a child of <html>" warning in Webkit.
  • +
  • #5790 : Internal only attributes output on fullpage <html> tag.
  • +
  • #5761 : [IE] Color dialog matrix buttons are barely clickable in quirks mode.
  • +
  • #5759 : [IE] Clicking on the scrollbar and then on the host page causes error.
  • +
  • #5772 : List style dialog is missing tab page ids.
  • +
  • #5782 : [FF] Wysiwyg mode is broken by 'display' style changes on editor's parent DOM tree.
  • +
  • #5801 : [IE] contentEditable="false" doesn't apply in effect on inline-elements.
  • +
  • #5794 : Empty find matching twice results in JavaScript error.
  • +
  • #5732 : If it isn't possible to connect to the SCAYT servers the dialogs might hang in Firefox. Fix for Firefox>=3.6.
  • +
  • #5807 : [FF2] New page command results in uneditable document.
  • +
  • #5807 : [FF2] SCAYT plugin is disabled in Firefox2 due to selection interference.
  • +
  • #5772 : [IE] Some numbered list style types are not supported by IE6/7 and causes JavaScript error.
  • +
+

+ CKEditor 3.3

+

+ New features:

+
    +
  • #635 : The properties dialog will now open when double clicking on objects.
  • +
  • #3893 : It's now possible to indent/outdent lists when selecting the first list item.
  • +
  • #4968 : The contentsLangDirection setting now has a default value 'ui' which inherit language direction from the editor UI language.
  • +
  • #4649 : The color picker dialog is now accessible.
  • +
  • #3593 : The editing area is now enabled by contentEditable="true" instead of designMode="on" to allow creating uneditable content elements in all browsers.
  • +
  • #4056 : Hidden fields will now be displayed as fake element just like in FCKeditor 2.
  • +
+

+ CKEditor 3.2.2

+

+ New features:

+
    +
  • The SCAYT spell checker is now enabled by default through the autoStartup setting.
  • +
  • #5631 : The SCAYT context menu options can now be reorganized through the scayt_contextMenuItemsOrder setting.
  • +
  • #4231 : Introducing the resize_dir setting, to be able to restrict manual resizing of the editor to only one direction (horizontal/vertical).
  • +
  • #5479 : Introducing the classic ASP integration files and samples.
  • +
  • #5024 : Added samples (HTML and XHTML) to show how to output HTML using fonts and other attributes instead of styles.
  • +
  • #4358 : Introduced the List Properties dialog.
  • +
  • #5485 : Adding the contentsLanguage configuration option to be able to set the language for the editor contents.
  • +
+

+ Fixed issues:

+
    +
  • #5330 : Corrected detection of CTRL and META keys in Macs for the context menu.
  • +
  • #5434 : Fixed access denied issues with IE when accessing web sites through IPv6 IP addresses.
  • +
  • #4476 : [IE] Inaccessible empty list item contains sub list.
  • +
  • #4881 : [IE] Selection range broken because of cutting a single control type element from it.
  • +
  • #5505 : Image dialog throw JavaScript error when click close dialog before preview area is loading.
  • +
  • #5144 : [Chrome] Paste in Webkit sometimes leaves extra 'div' element.
  • +
  • #5021 : [Firefox] Typing in empty document start from second line when enterMode = CKEDITOR.ENTER_BR.
  • +
  • #5416 : [IE] Delete table throws a error when enterMode = CKEDITOR.ENTER_BR.
  • +
  • #4459 : [IE] Select element is penetrating the maximized editor in IE6.
  • +
  • #5559 : [IE] The first call to setData is affected by iframe cache when loading the wysiwyg mode.
  • +
  • #5567 : [IE] Remove inline styles in some case doesn't join identical siblings.
  • +
  • #5450 : [FireFox] Press ENTER on 'replace' button result wrong.
  • +
  • #5121 : Recognizes the <br /> tag as a separator when apply block styles and enterMode = CKEDITOR.ENTER_BR.
  • +
  • #5575 : CKEDITOR.replaceAll should consider all kind of white spaces between class names.
  • +
  • #5582 : Prevent the default behavior when click the 'x' button to close dialog box.
  • +
  • #5584 : ENTER key with forceEnterMode turns on doesn't inherit current block attributes.
  • +
  • #4797 : [Opera] Press ENTER key in dialog fields to close throws JavaScript error.
  • +
  • #5578 : Add flash fake element align property when switch mode (source to wysiwyg).
  • +
  • #5577 : Update delete column behavior when choose multiple cells in the same column.
  • +
  • #5512 : Open context menu with SHIFT+F10 doesn't get correct editor selection.
  • +
  • #5433 : English protocol text directions in Link dialog are not incorrect in 'rtl' UI languages.
  • +
  • #5553 : Paste dialog clipboard area text direction is incorrect for 'rtl' content languages.
  • +
  • #4734 : Font size resets when font name is changed in an empty numbered list.
  • +
  • #5237 : English text in dialogs' title is flipped when using RTL language.
  • +
  • #3257 : Create list doesn't keep blocks as headings.
  • +
  • #5111 : [Firefox] JAWS doesn't respect PC cursor mode (application role) on toolbar.
  • +
  • #5530 : Page break for printing can't be removed with undo.
  • +
  • #5381 : Unable to place cursor between two paragraphs in body.
  • +
  • #5568 : [IE6/7] Selecting a entire table cell changes the original range.
  • +
  • #5623 : [Firefox] Apply style that edges another inline style result incorrect.
  • +
  • #5586 : [Firefox] Maximize the second editor ruins full screen mode.
  • +
  • #5617 : HTML filter system does not allow two 'text' filter rules.
  • +
  • #5663 : General memory clean up after destroying last instance.
  • +
  • #5461 : [IE] Fix Paste from Word dialog doesn't accept imput problem.
  • +
  • #5676 : Make color buttons use RRGGBB instead of RGB for better compatibility with IE.
  • +
  • #4948 : [Safari] Select the first/last cell of table to open context menu may lead to undetected table.
  • +
  • #5591 : [Firefox] Select a list item makes selected element broken.
  • +
  • #5667 : Pasting in a RTL page content causes shows up the horizontal scrollbar.
  • +
  • #5688 : Duplicate ids are used in dialog definition.
  • +
  • #5719 : [IE] 'change' dialog event should not be triggered when dialog is already closed.
  • +
  • #5747 : [IE] Error thrown when IE input field editing mode is turned on.
  • +
  • #5516 : IE8: Toolbar buttons have higher bottom padding.
  • +
  • #5402 : SHIFT-ENTER could now be used to exit from preformat block.
  • +
  • SCAYT plugin related:
      +
    • #4836 : Using SCAYT result in fragile elements when applying inline styles.
    • +
    • #5425 : [Opera] Disable SCAYT plugin for Opera browser.
    • +
    • #5632 : SCAYT word marker is not visible on text with background-color set.
    • +
    • #4125 : Remove Format command incorrectly removes SCAYT word markers.
    • +
    • #5671 : SCAYT bootstrap script could be added multiple times unnecessarily.
    • +
    • #5573 : SCAYT move cursor position after insert element into marked word text.
    • +
    • #5546 : SCAYT interferes with undo/redo commands.
    • +
    • #5570 : [IE] First enabling SCAYT blind cursor in editor.
    • +
    • #5741 : Enable SCAYT cause error in multiple editor instances.
    • +
    • #5744 : Remove editor with SCAYT enabled in source mode throws error.
    • +
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.2.1

+

+ New features:

+
    +
  • #4478 : Enable the SelectAll command in source mode.
  • +
  • #5150 : Allow names in the CKEDITOR.config.colorButton_colors setting.
  • +
  • #4810 : Adding configuration option for image dialog preview area filling text.
  • +
  • #536 : Object style now could be applied on any parent element of current selection.
  • +
  • #5290 : Unified stylesSet loading removing dependencies from the styles combo. + Now the configuration entry is named 'config.stylesSet' instead of config.stylesCombo_stylesSet and the default location + is under the 'styles' plugin instead of 'stylescombo'.
  • +
  • #5352 : Allow to define the stylesSet array in the config object for the editor.
  • +
  • #5302 : Adding config option "forceEnterMode".
  • +
  • #5216 : Extend CKEDITOR.appendTo to allow a data parameter for the initial value.
  • +
  • #5024 : Added sample to show how to output XHTML and avoid deprecated tags.
  • +
+

+ Fixed issues:

+
    +
  • #5152 : Indentation using class attribute doesn't work properly.
  • +
  • #4682 : It wasn't possible to edit block elements in IE that had styles like width, height or float.
  • +
  • #4750 : Correcting default order of buttons layout in dialogs on Mac.
  • +
  • #4932 : Fixed collapse button not clickable on simple toolbar.
  • +
  • #5228 : Link dialog is automatically changes protocol when URLs that starts with '?'.
  • +
  • #4877 : Fixed CKEditor displays source code in one long line (IE quirks mode + office2003 skin).
  • +
  • #5132 : Apply inline style leaks into sibling words which are seperated spaces.
  • +
  • #3599 : Background color style on sized text displayed as narrow band behind.
  • +
  • #4661 : Translation missing in link dialog.
  • +
  • #5240 : Flash alignment property is not presented visually on fake element.
  • +
  • #4910 : Pasting in IE scrolls document to the end.
  • +
  • #5041 : Table summary attribute can't be removed with dialog.
  • +
  • #5124 : All inline styles cannot be applied on empty spaces.
  • +
  • #3570 : SCAYT marker shouldn't appear inside elements path bar.
  • +
  • #4553 : Dirty check result incorrect when editor document is empty.
  • +
  • #4555 : Unreleased memory when editor is created and destroyed.
  • +
  • #5118 : Arrow keys navigation in RTL languages is incorrect.
  • +
  • #4721 : Remove attribute 'value' of checkbox in IE.
  • +
  • #5278 : IE: Add validation to check for bad window names of popup window.
  • +
  • #5171 : Dialogs contains lists don't have proper voice labels.
  • +
  • #4791 : Can't place cursor inside a form that end with a checkbox/radio.
  • +
  • #4479 : StylesCombo doesn't reflect the selection state until it's first opened.
  • +
  • #4717 : 'Unlink' and 'Outdent' command buttons should be disabled on editor startup.
  • +
  • #5119 : Disabled command buttons are not being properly styled when focused.
  • +
  • #5307 : Hide dialog page cause problem when there's two tab pages remain.
  • +
  • #5343 : Active list item ARIA role is wrongly placed.
  • +
  • #3599 : Background color style applying to text with font size style has been narrowly rendered.
  • +
  • #4711 : Line break character inside preformatted text makes it unable to type text at the end of previous line.
  • +
  • #4829 : [IE] Apply style from combo has wrong result on manually created selection.
  • +
  • #4830 : Retrieving selected element isn't always right, especially selecting using keyboard (SHIFT+ARROW).
  • +
  • #5128 : Element attribute inside preformatted text is corrupted when converting to other blocks.
  • +
  • #5190 : Template list entry shouldn't gain initial focus open templates list dialog opens.
  • +
  • #5238 : Menu button doesn't display arrow icon in high-contrast mode.
  • +
  • #3576 : Non-attributed element of the same name with the applied style is incorrectly removed.
  • +
  • #5221 : Insert table into empty document cause JavaScript error thrown.
  • +
  • #5242 : Apply 'automatic' color option of text color incorrectly removes background-color style.
  • +
  • #4719 : IE does not escape attribute values properly.
  • +
  • #5170 : Firefox does not insert text into styled element properly.
  • +
  • #4026 : Office2003 skin has no toolbar button borders in High Contrast in IE7.
  • +
  • #4348 : There should have exception thrown when 'CKEDITOR_BASEPATH' couldn't be figured out automatically.
  • +
  • #5364 : Focus may not be put into dialog correctly when dialog skin file is loading slow.
  • +
  • #4016 : Justify the layout of forms select dialog in Chrome and IE7.
  • +
  • #5373 : Variable 'pathBlockElements' defines wrong items in CKEDITOR.dom.elementPath.
  • +
  • #5082 : Ctrl key should be described as Cmd key on Mac.
  • +
  • #5182 : Context menu is not been announced correctly by ATs.
  • +
  • #4898 : Can't navigate outside table under the last paragraph of document.
  • +
  • #4950 : List commands could compromise list item attribute and styles.
  • +
  • #5018 : Find result highlighting remove normal font color styles unintentionally.
  • +
  • #5376 : Unable to exit list from within a empty block under list item.
  • +
  • #5145 : Various SCAYT fixes.
  • +
  • #5319 : Match whole word doesn't work anymore after replacement has happened.
  • +
  • #5363 : 'title' attribute now presents on all editor iframes.
  • +
  • #5374 : Unable to toggle inline style when the selection starts at the linefeed of the previous paragraph.
  • +
  • #4513 : Selected link element is not always correctly detected when using keyboard arrows to perform such selection.
  • +
  • #5372 : Newly created sub list should inherit nothing from the original (parent) list, except the list type.
  • +
  • #5274 : [IE6] Templates preview image is displayed in wrong size.
  • +
  • #5292 : Preview in font size and family doesn't work with custom styles.
  • +
  • #5396 : Selection is lost when use cell properties dialog to change cell type to header.
  • +
  • #4082 : [IE+Quirks] Preview text in the image dialog is not wrapping.
  • +
  • #4197 : Fixing format combo don't hide when editor blur on Safari.
  • +
  • #5401 : The context menu break layout with Office2003 and V2 skin on IE quirks mode.
  • +
  • #4825 : Fixing browser context menu is opened when clicking right mouse button twice.
  • +
  • #5356 : The SCAYT dialog had issues with Prototype enabled pages.
  • +
  • #5266 : SCAYT was disturbing the rendering of TH elements.
  • +
  • #4688 : SCAYT was interfering on checkDirty.
  • +
  • #5429 : High Contrast mode was being mistakenly detected when loading the editor through Dojo's xhrGet.
  • +
  • #5221 : Range is mangled when making collapsed selection in an empty paragraph.
  • +
  • #5261 : Config option 'scayt_autoStartup' slow down editor loading.
  • +
  • #3846 : Google Chrome - No Img properties after inserting.
  • +
  • #5465 : ShiftEnter=DIV doesn't respect list item when pressing ENTER at end of list item.
  • +
  • #5454 : After replaced success, the popup window couldn't be closed and a js error occured.
  • +
  • #4784 : Incorrect cursor position after delete table cells.
  • +
  • #5149 : [FF] Cursor disappears after maximize when the editor has focus.
  • +
  • #5220 : DTD now shows tolerance to <style> appear inside content.
  • +
  • #5440 : Mobile browsers (iPhone, Android...) are marked as incompatible as they don't support editing features.
  • +
  • #5504 : [IE6/7] 'Paste' dialog will always get opened even when user allows the clipboard access dialog when using 'Paste' button.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.2

+

+ New features:

+
    +
  • Several accessibility enhancements:
      +
    • #4502 : The editor accessibility is now totally based on WAI-ARIA.
    • +
    • #5015 : Adding accessibility help dialog plugin.
    • +
    • #5014 : Keyboard navigation compliance with screen reader suggested keys.
    • +
    • #4595 : Better accessibility in the Templates dialog.
    • +
    • #3389 : Esc/Arrow Key now works for closing sub menu.
    • +
  • +
  • #4973 : The Style field in the Div Container dialog is now loading the styles defined in the default styleset used by the Styles toolbar combo.
  • +
+

+ Fixed issues:

+
    +
  • #5049 : Form Field list command in JAWS incorrectly lists extra fields.
  • +
  • #5008 : Lock/Unlock ratio buttons in the Image dialog was poorly designed in High Contrast mode.
  • +
  • #3980 : All labels in dialogs now use <label> instead of <div>.
  • +
  • #5213 : Reorganization of some entries in the language files to make it more consistent.
  • +
  • #5199 : In IE, single row toolbars didn't have the bottom padding.
  • +
+

+ CKEditor 3.1.1

+

+ New features:

+
    +
  • #4399 : Improved support for external file browsers by allowing executing a callback function.
  • +
  • #4612 : The text of links is now updated if it matches the URL to which it points to.
  • +
  • #4936 : New localization support for the Welsh language.
  • +
+

+ Fixed issues:

+
    +
  • #4272 : Kama skin toolbar was broken in IE+Quirks+RTL.
  • +
  • #4987 : Changed the url which is called by the Browser Server button in the Link tab of Image Properties dialog.
  • +
  • #5030 : The CKEDITOR.timestamp wasn't been appended to the skin.js file.
  • +
  • #4993 : Removed the float style from images when the user selects 'not set' for alignment.
  • +
  • #4944 : Fixed a bug where nested list structures with inconsequent levels were not being pasted correctly from MS Word.
  • +
  • #4637 : Table cells' 'nowrap' attribute was not being loaded by the cell property dialog. Thanks to pomu0325.
  • +
  • #4724 : Using the mouse to insert a link in IE might create incorrect results.
  • +
  • #4640 : Small optimizations for the fileBrowser plugin.
  • +
  • #4583 : The "Target Frame Name" field is now visible when target is set to 'frame' only.
  • +
  • #4863 : Fixing iframedialog's height doesn't stretch to 100% (except IE Quirks).
  • +
  • #4964 : The BACKSPACE key positioning was not correct in some cases with Firefox.
  • +
  • #4980 : Setting border, vspace and hspace of images to zero was not working.
  • +
  • #4773 : The fileBrowser plugin was overwriting onClick functions eventually defined on fileButton elements.
  • +
  • #4731 : The clipboard plugin was missing a reference to the dialog plugin.
  • +
  • #5051 : The about plugin was missing a reference to the dialog plugin.
  • +
  • #5146 : The wsc plugin was missing a reference to the dialog plugin.
  • +
  • #4632 : The print command will now properly break on the insertion point of page break for printing.
  • +
  • #4862 : The English (United Kingdom) language file has been renamed to en-gb.js.
  • +
  • #4618 : Selecting an emoticon or the lock and reset buttons in the image dialog fired the onBeforeUnload event in IE.
  • +
  • #4678 : It was not possible to set tables' width to empty value.
  • +
  • #5012 : Fixed dependency issues with the menu plugin.
  • +
  • #5040 : The editor will not properly ignore font related settings that have extra item separators (semi-colons).
  • +
  • #4046 : Justify should respect config.enterMode = CKEDITOR.ENTER_BR.
  • +
  • #4622 : Inserting tables multiple times was corrupting the undo system.
  • +
  • #4647 : [IE] Selection on an element within positioned container is lost after open context-menu then click one menu item.
  • +
  • #4683 : Double-quote character in attribute values was not escaped in the editor output.
  • +
  • #4762 : [IE] Unexpected vertical-scrolling behavior happens whenever focus is moving out of editor in source mode.
  • +
  • #4772 : Text color was not being applied properly on links.
  • +
  • #4795 : [IE] Press 'Del' key on horizontal line or table result in error.
  • +
  • #4824 : [IE] <br/> at the very first table cell breaks the editor selection.
  • +
  • #4851 : [IE] Delete table rows with context-menu may cause error.
  • +
  • #4951 : Replacing text with empty string was throwing errors.
  • +
  • #4963 : Link dialog was not opening properly for e-mail type links.
  • +
  • #5043 : Removed the possibility of having an unwanted script tag being outputted with the editor contents.
  • +
  • #3678 : There were issues when editing links inside floating divs with IE.
  • +
  • #4763 : Pressing ENTER key with text selected was not deleting the text in some situations.
  • +
  • #5096 : Simple ampersand attribute value doesn't work for more than one occurrence.
  • +
  • #3494 : Context menu is too narrow in some translations.
  • +
  • #5005 : Fixed HTML errors in PHP samples.
  • +
  • #5123 : Fixed broken XHTML in User Interface Languages sample.
  • +
  • #4893 : Editor now understands table cell inline styles.
  • +
  • #4611 : Selection around <select> in editor doesn't cause error anymore.
  • +
  • #4886 : Extra BR tags were being created in the output HTML.
  • +
  • #4933 : Empty tags with BR were being left in the DOM.
  • +
  • #5127 : There were errors when removing dialog definition pages through code.
  • +
  • #4767 : CKEditor was not working when ckeditor_source.js is loaded in the <body> .
  • +
  • #5062 : Avoided security warning message when loading the wysiwyg area in IE6 under HTTPS.
  • +
  • #5135 : The TAB key will now behave properly when in Source mode.
  • +
  • #4988 : It wasn't possible to use forcePasteAsPlainText with Safari on Mac.
  • +
  • #5095 : Safari on Mac deleted the current selection in the editor when Edit menu was clicked.
  • +
  • #5140 : In High Contrast mode, arrows were now been displayed for menus with submenus.
  • +
  • #5163 : The undo system was not working on some specific cases.
  • +
  • #5162 : The ajax sample was throwing errors when loading data.
  • +
  • #4999 : The Template dialog was not generating an undo snapshot.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.1

+

+ New features:

+
    +
  • #4067 : Introduced the full page editing support (from <html> to </html>).
  • +
  • #4228 : Introduced the Shared Spaces feature.
  • +
  • #4379 : Introduced the new powerful pasting system and word cleanup procedure, including enhancements to the paste as plain text feature.
  • +
  • #2872 : Introduced the new native PHP API, the first standardized server side support.
  • +
  • #4210 : Added CKEditor plugin for jQuery.
  • +
  • #2885 : Added 'div' dialog and corresponding context menu options.
  • +
  • #4574 : Added the table merging tools and corresponding context menu options.
  • +
  • #4340 : Added the email protection option for link dialog.
  • +
  • #4463 : Added inline CSS support in all places where custom stylesheet could apply.
  • +
  • #3881 : Added color dialog for 'more color' option in color buttons.
  • +
  • #4341 : Added the 'showborder' plugin.
  • +
  • #4549 : Make the anti-cache query string configurable.
  • +
  • #4708 : Added the 'htmlEncodeOutput' config option.
  • +
  • #4342 : Introduced the bodyId and bodyClass settings to specify the id and class. to be used in the editing area at runtime.
  • +
  • #3401 : Introduced the baseHref setting so it's possible to set the URL to be used to resolve absolute and relative URLs in the contents.
  • +
  • #4729 : Added support to fake elements for comments.
  • +
+

+ Fixed issues:

+
    +
  • #4707 : Fixed invalid link is requested in image preview.
  • +
  • #4461 : Fixed toolbar separator line along side combo enlarging the toolbar height.
  • +
  • #4596 : Fixed image re-size lock buttons aren't accessible in high-contrast mode.
  • +
  • #4676 : Fixed editing tables using table properties dialog overwrites original style values.
  • +
  • #4714 : Fixed IE6 JavaScript error when editing flash by commit 'Flash' dialog.
  • +
  • #3905 : Fixed 'wysiwyg' mode causes unauthenticated content warnings over SSL in FF 3.5.
  • +
  • #4768 : Fixed open context menu in IE throws js error when focus is not inside document.
  • +
  • #4822 : Fixed applying 'Headers' to existing table does not work in IE.
  • +
  • #4855 : Fixed toolbar doesn't wrap well for 'v2' skin in all browsers.
  • +
  • #4882 : Fixed auto detect paste from MS-Word is not working for Safari.
  • +
  • #4882 : Fixed unexpected margin style left behind on content cleaning up from MS-Word.
  • +
  • #4896 : Fixed paste nested list from MS-Word with measurement units set to cm is broken.
  • +
  • #4899 : Fixed unable to undo pre-formatted style.
  • +
  • #4900 : Fixed ratio-lock inconsistent between browsers.
  • +
  • #4901 : Fixed unable to edit any link with popup window's features in Firefox.
  • +
  • #4904 : Fixed when paste happen from dialog, it always throw JavaScript error.
  • +
  • #4905 : Fixed paste plain text result incorrect when content from dialog.
  • +
  • #4889 : Fixed unable to undo 'New Page' command after typing inside editor.
  • +
  • #4892 : Fixed table alignment style is not properly represented by the wrapping div.
  • +
  • #4918 : Fixed switching mode when maximized is showing background page contents.
  • +
+

+ CKEditor 3.0.2

+

+ New features:

+
    +
  • #4343 : Added the configuration option 'browserContextMenuOnCtrl' so it's possible to enable the default browser context menu by holding the CTRL key.
  • +
+

+ Fixed issues:

+
    +
  • #4552 : Fixed float panel doesn't show up since editor instanced been destroyed once.
  • +
  • #3918 : Fixed fake object is editable with Image dialog.
  • +
  • #4053 : Fixed 'Form Properties' missing from context menu when selection collapsed inside form.
  • +
  • #4401 : Fixed customized by removing 'upload' tab page from 'Link dialog' cause JavaScript error.
  • +
  • #4477 : Adding missing tag names in object style elements.
  • +
  • #4567 : Fixed IE throw error when pressing BACKSPACE in source mode.
  • +
  • #4573 : Fixed 'IgnoreEmptyPargraph' config doesn't work with the config 'entities' is set to 'false'.
  • +
  • #4614 : Fixed attribute protection fails because of line-break.
  • +
  • #4546 : Fixed UIColor plugin doesn't work when editor id contains CSS selector preserved keywords.
  • +
  • #4609 : Fixed flash object is lost when loading data from outside editor.
  • +
  • #4625 : Fixed editor stays visible in a div with style 'visibility:hidden'.
  • +
  • #4621 : Fixed clicking below table caused an empty table been generated.
  • +
  • #3373 : Fixed empty context menu when there's no menu item at all.
  • +
  • #4473 : Fixed setting rules on the same element tag name throws error.
  • +
  • #4514 : Fixed press 'Back' button breaks wysiwyg editing mode is Firefox.
  • +
  • #4542 : Fixed unable to access buttons using tab key in Safari and Opera.
  • +
  • #4577 : Fixed relative link url is broken after opening 'Link' dialog.
  • +
  • #4597 : Fixed custom style with same attribute name but different attribute value doesn't work.
  • +
  • #4651 : Fixed 'Deleted' and 'Inserted' text style is not rendering in wysiwyg mode and is wrong is source mode.
  • +
  • #4654 : Fixed 'CKEDITOR.config.font_defaultLabel(fontSize_defaultLabel)' is not working.
  • +
  • #3950 : Fixed table column insertion incorrect when selecting empty cell area.
  • +
  • #3912 : Fixed UIColor not working in IE when page has more than 30+ editors.
  • +
  • #4031 : Fixed mouse cursor on toolbar combo has more than 3 shapes.
  • +
  • #4041 : Fixed open context menu on multiple cells to remove them result in only one removed.
  • +
  • #4185 : Fixed resize handler effect doesn't affect flash object on output.
  • +
  • #4196 : Fixed 'Remove Numbered/Bulleted List' on nested list doesn't work well on nested list.
  • +
  • #4200 : Fixed unable to insert 'password' type filed with attributes.
  • +
  • #4530 : Fixed context menu couldn't open in Opera.
  • +
  • #4536 : Fixed keyboard navigation doesn't work at all in IE quirks mode.
  • +
  • #4584 : Fixed updated link Target field is not updating when updating to certain values.
  • +
  • #4603 : Fixed unable to disable submenu items in contextmenu.
  • +
  • #4672 : Fixed unable to redo the insertion of horizontal line.
  • +
  • #4677 : Fixed 'Tab' key is trapped by hidden dialog elements.
  • +
  • #4073 : Fixed insert template with replace option could result in empty document.
  • +
  • #4455 : Fixed unable to start editing when image inside document not loaded.
  • +
  • #4517 : Fixed 'dialog_backgroundCoverColor' doesn't work on IE6.
  • +
  • #3165 : Fixed enter key in empty list item before nested one result in collapsed line.
  • +
  • #4527 : Fixed checkbox generate invalid 'checked' attribute.
  • +
  • #1659 : Fixed unable to click below content to start editing in IE with 'config.docType' setting to standard compliant.
  • +
  • #3933 : Fixed extra <br> left at the end of document when the last element is a table.
  • +
  • #4736 : Fixed PAGE UP and PAGE DOWN keys in standards mode are not working.
  • +
  • #4725 : Fixed hitting 'enter' before html comment node produces a JavaScript error.
  • +
  • #4522 : Fixed unable to redo when typing after insert an image with relative url.
  • +
  • #4594 : Fixed context menu goes off-screen when mouse is at right had side of screen.
  • +
  • #4673 : Fixed undo not available straight away if shift key is used to enter first character.
  • +
  • #4690 : Fixed the parsing of nested inline elements.
  • +
  • #4450 : Fixed selecting multiple table cells before apply justify commands generates spurious paragraph in Firefox.
  • +
  • #4733 : Fixed dialog opening sometimes hang up Firefox and Safari.
  • +
  • #4498 : Fixed toolbar collapse button missing tooltip.
  • +
  • #4738 : Fixed inserting table inside bold/italic/underline generates error on ENTER_BR mode.
  • +
  • #4246 : Fixed avoid XHTML deprecated attributes for image styling.
  • +
  • #4543 : Fixed unable to move cursor between table and hr.
  • +
  • #4764 : Fixed wrong exception message when CKEDITOR.editor.append() to non-existing elements.
  • +
  • #4521 : Fixed dialog layout in IE6/7 may have scroll-bar and other weird effects.
  • +
  • #4709 : Fixed inconsistent scroll-bar behavior on IE.
  • +
  • #4776 : Fixed preview page failed to open when relative URl contains in document.
  • +
  • #4812 : Fixed 'Esc' key not working on dialogs in Opera.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.0.1

+

+ New features:

+
    +
  • #4219 : Added fallback mechanism for config.language.
  • +
  • #4194 : Added support for using multiple css style sheets within the editor.
  • +
+

+ Fixed issues:

+
    +
  • #3898 : Added validation for URL value in Image dialog.
  • +
  • #3528 : Fixed Context Menu issue when triggered using Shift+F10.
  • +
  • #4028 : Maximize control's tool tip was wrong once it is maximized.
  • +
  • #4237 : Toolbar is chopped off in Safari browser 3.x.
  • +
  • #4241 : Float panels are left on screen while editor is destroyed.
  • +
  • #4274 : Double click event is incorrect handled in 'divreplace' sample.
  • +
  • #4354 : Fixed TAB key on toolbar to not focus disabled buttons.
  • +
  • #3856 : Fixed focus and blur events in source view mode.
  • +
  • #3438 : Floating panels are off by (-1px, 0px) in RTL mode.
  • +
  • #3370 : Refactored use of CKEDITOR.env.isCustomDomain().
  • +
  • #4230 : HC detection caused js error.
  • +
  • #3978 : Fixed setStyle float on IE7 strict.
  • +
  • #4262 : Tab and Shift+Tab was not working to cycle through CTRL+SHIFT+F10 context menu in IE.
  • +
  • #3633 : Default context menu isn't disabled in toolbar, status bar, panels...
  • +
  • #3897 : Now there is no image previews when the URL is empty in image dialog.
  • +
  • #4048 : Context submenu was lacking uiColor.
  • +
  • #3568 : Dialogs now select all text when tabbing to text inputs.
  • +
  • #3727 : Cell Properties dialog was missing color selection option.
  • +
  • #3517 : Fixed "Match cyclic" field in Find & Replace dialog.
  • +
  • #4368 : borderColor table cell attribute haven't worked for none-IE
  • +
  • #4203 : In IE quirks mode + toolbar collapsed + source mode editing block height was incorrect.
  • +
  • #4387 : Fixed: right clicking in Kama skin can lead to a javascript error.
  • +
  • #4397 : Wysiwyg mode caused the host page scroll.
  • +
  • #4385 : Fixed editor's auto adjusting on DOM structure were confusing the dirty checking mechanism.
  • +
  • #4397 : Fixed regression of [3816] where turn on design mode was causing Firefox3 to scroll the host page.
  • +
  • #4254 : Added basic API sample.
  • +
  • #4107 : Normalize css font-family style text for correct comparision.
  • +
  • #3664 : Insert block element in empty editor document should not create new paragraph.
  • +
  • #4037 : 'id' attribute is missing with Flash dialog advanced page.
  • +
  • #4047 : Delete selected control type element when 'Backspace' is pressed on it.
  • +
  • #4191 : Fixed: dialog changes confirmation on image dialog appeared even when no changes have been made.
  • +
  • #4351 : Dash and dot could appear in attribute names.
  • +
  • #4355 : 'maximize' and 'showblock' commands shouldn't take editor focus.
  • +
  • #4504 : Fixed 'Enter'/'Esc' key is not working on dialog button.
  • +
  • #4245 : 'Strange Template' now come with a style attribute for width.
  • +
  • #4512 : Fixed styles plugin incorrectly adding semicolons to style text.
  • +
  • #3855 : Fixed loading unminified _source files when ckeditor_source.js is used.
  • +
  • #3717 : Dialog settings defaults can now be overridden in-page through the CKEDITOR.config object.
  • +
  • #4481 : The 'stylesCombo_stylesSet' configuration entry didn't work for full URLs.
  • +
  • #4480 : Fixed scope attribute in th.
  • +
  • #4467 : Fixed bug to use custom icon in context menus. Thanks to george.
  • +
  • #4190 : Fixed select field dialog layout in Safari.
  • +
  • #4518 : Fixed unable to open dialog without editor focus in IE.
  • +
  • #4519 : Fixed maximize without editor focus throw error in IE.
  • +
  • Updated the following language files:
  • +
+

+ CKEditor 3.0

+

+ New features:

+
    +
  • #3188 : Introduce + <pre> formatting feature when converting from other blocks.
  • +
  • #4445 : editor::setData now support an optional callback parameter.
  • +
+

+ Fixed issues:

+
    +
  • #2856 : Fixed problem with inches in Paste From Word plugin.
  • +
  • #3929 : Using Paste dialog, + the text is pasted into current selection
  • +
  • #3920 : Mouse cursor over characters in + Special Character dialog now is correct
  • +
  • #3882 : Fixed an issue + with PasteFromWord dialog in which default values was ignored
  • +
  • #3859 : Fixed Flash dialog layout in Webkit
  • +
  • #3852 : Disabled textarea resizing in dialogs
  • +
  • #3831 : The attempt to remove the contextmenu plugin + will not anymore break the editor
  • +
  • #3781 : Colorbutton is now disabled in 'source' mode
  • +
  • #3848 : Fixed an issue with Webkit in witch + elements in the Image and Link dialogs had wrong dimensions.
  • +
  • #3808 : Fixed UI Color Picker dialog size in example page.
  • +
  • #3658 : Editor had horizontal scrollbar in IE6.
  • +
  • #3819 : The cursor was not visible + when applying style to collapsed selections in Firefox 2.
  • +
  • #3809 : Fixed beam cursor + when mouse cursor is over text-only buttons in IE.
  • +
  • #3815 : Fixed an issue + with the form dialog in which the "enctype" attribute is outputted as "encoding".
  • +
  • #3785 : Fixed an issue + in CKEDITOR.tools.htmlEncode() which incorrectly outputs &nbsp; in IE8.
  • +
  • #3820 : Fixed an issue in + bullet list command in which a list created at the bottom of another gets merged to the top. +
  • +
  • #3830 : Table cell properties dialog + doesn't apply to all selected cells.
  • +
  • #3835 : Element path is not refreshed + after click on 'newpage'; and safari is not putting focus on document also. +
  • +
  • #3821 : Fixed an issue with JAWS in which + toolbar items are read inconsistently between virtual cursor modes.
  • +
  • #3789 : The "src" attribute + was getting duplicated in some situations.
  • +
  • #3591 : Protecting flash related elements + including '<object>', '<embed>' and '<param>'. +
  • +
  • #3759 : Fixed CKEDITOR.dom.element::scrollIntoView + logic bug which scroll even element is inside viewport. +
  • +
  • #3773 : Fixed remove list will merge lines. +
  • +
  • #3829 : Fixed remove empty link on output data.
  • +
  • #3730 : Indent is performing on the whole + block instead of selected lines in enterMode = BR.
  • +
  • #3844 : Fixed UndoManager register keydown on obsoleted document
  • +
  • #3805 : Enabled SCAYT plugin for IE.
  • +
  • #3834 : Context menu on table caption was incorrect.
  • +
  • #3812 : Fixed an issue in which the editor + may show up empty or uneditable in IE7, 8 and Firefox 3.
  • +
  • #3825 : Fixed JS error when opening spellingcheck.
  • +
  • #3862 : Fixed html parser infinite loop on certain malformed + source code.
  • +
  • #3639 : Button size was inconsistent.
  • +
  • #3874 : Paste as plain text in Safari loosing lines.
  • +
  • #3849 : Fixed IE8 crashes when applying lists and indenting.
  • +
  • #3876 : Changed dialog checkbox and radio labels to explicit labels.
  • +
  • #3843 : Fixed context submenu position in IE 6 & 7 RTL.
  • +
  • #3864 : [FF]Document is not editable after inserting element on a fresh page.
  • +
  • #3883 : Fixed removing inline style logic incorrect on Firefox2.
  • +
  • #3884 : Empty "href" attribute was duplicated on output data.
  • +
  • #3858 : Fixed the issue where toolbars + break up in IE6 and IE7 after the browser is resized.
  • +
  • #3868 : [chrome] SCAYT toolbar options was in reversed order.
  • +
  • #3875 : Fixed an issue in Safari where + table row/column/cell menus are not useable when table cells are selected.
  • +
  • #3896 : The editing area was + flashing when switching forth and back to source view.
  • +
  • #3894 : Fixed an issue where editor failed to initialize when using the on-demand loading way.
  • +
  • #3903 : Color button plugin doesn't read config entry from editor instance correctly.
  • +
  • #3801 : Comments at the start of the document was lost in IE.
  • +
  • #3871 : Unable to redo when undos to the front of snapshots stack.
  • +
  • #3909 : Move focus from editor into a text input control is broken.
  • +
  • #3870 : The empty paragraph + desappears when hitting ENTER after "New Page".
  • +
  • #3887 : Fixed an issue in which the create + list command may leak outside of a selected table cell and into the rest of document.
  • +
  • #3916 : Fixed maximize does not enlarge editor width when width is set.
  • +
  • #3879 : [webkit] Color button panel had incorrect size on first open.
  • +
  • #3839 : Update Scayt plugin to reflect the latest change from SpellChecker.net.
  • +
  • #3742 : Fixed wrong dialog layout for dialogs without tab bar in IE RTL mode .
  • +
  • #3671 : Fixed body fixing should be applied to the real type under fake elements.
  • +
  • #3836 : Fixed remove list in enterMode=BR will merge sibling text to one line.
  • +
  • #3949 : Fixed enterKey within pre-formatted text introduce wrong line-break.
  • +
  • #3878 : Whenever possible, + dialogs will not present scrollbars if the content is too big for its standard + size.
  • +
  • #3782 : Remove empty list in table cell result in collapsed cell.
  • +
  • Updated the following language files:
  • +
  • #3984 : [IE]The pre-formatted style is generating error.
  • +
  • #3946 : Fixed unable to hide contextmenu.
  • +
  • #3956 : Fixed About dialog in Source Mode for IE.
  • +
  • #3953 : Fixed keystroke for close Paste dialog.
  • +
  • #3951 : Reset size and lock ratio options were not accessible in Image dialog.
  • +
  • #3921 : Fixed Container scroll issue on IE7.
  • +
  • #3940 : Fixed list operation doesn't stop at table.
  • +
  • #3891 : [IE] Fixed 'automatic' font color doesn't work.
  • +
  • #3972 : Fixed unable to remove a single empty list in document in Firefox with enterMode=BR.
  • +
  • #3973 : Fixed list creation error at the end of document.
  • +
  • #3959 : Pasting styled text from word result in content lost.
  • +
  • #3793 : Combined images into sprites.
  • +
  • #3783 : Fixed indenting command in table cells create collapsed paragraph.
  • +
  • #3968 : About dialog layout was broken with IE+Standards+RTL.
  • +
  • #3991 : In IE quirks, text was not visible in v2 and office2003 skins.
  • +
  • #3983 : In IE, we'll now + silently ignore wrong toolbar definition settings which have extra commas being + left around.
  • +
  • Fixed the following test cases:
      +
    • #3992 : core/ckeditor2.html
    • +
    • #4138 : core/plugins.html
    • +
    • #3801 : plugins/htmldataprocessor/htmldataprocessor.html
    • +
  • +
  • #3989 : Host page horizontal scrolling a lot when on having righ-to-left direction.
  • +
  • #4001 : Create link around existing image result incorrect.
  • +
  • #3988 : Destroy editor on form submit event cause error.
  • +
  • #3994 : Insert horizontal line at end of document cause error.
  • +
  • #4074 : Indent error with 'indentClasses' config specified.
  • +
  • #4057 : Fixed anchor is lost after switch between editing modes.
  • +
  • #3644 : Image dialog was missin radio lock.
  • +
  • #4014 : Firefox2 had no dialog button backgrounds.
  • +
  • #4018 : Firefox2 had no richcombo text visible.
  • +
  • #4035 : [IE6] Paste dialog size was too small.
  • +
  • #4049 : Kama skin was too wide with config.width.
  • +
  • The following released files now doesn't require the _source folder
      +
    • #4086 : _samples/ui_languages.html
    • +
    • #4093 : _tests/core/dom/document.html
    • +
    • #4094 : Smiley plugin file
    • +
    • #4097 : No undo/redo support for fontColor and backgroundColor buttons.
    • +
  • +
  • #4085 : Paste and Paste from Word dialogs were not well styled in IE+RTL.
  • +
  • #3982 : Fixed enterKey on empty list item result in weird dom structure.
  • +
  • #4101 : Now it is possible to close dialog before gets focus.
  • +
  • #4075 : [IE6/7]Fixed apply custom inline style with "class" attribute failed.
  • +
  • #4087 : [Firefox]Fixed extra blocks created on create list when full document selected.
  • +
  • #4097 : No undo/redo support for fontColor and backgroundColor buttons.
  • +
  • #4111 : Fixed apply block style after inline style applied on full document error.
  • +
  • #3622 : Fixed shift enter with selection not deleting highlighted text.
  • +
  • #4092 : [IE6] Close button was missing for dialog without multiple tabs.
  • +
  • #4003 : Markup on the image dialog was disrupted when removing the border input.
  • +
  • #4096 : Editor content area was pushed down in IE RTL quirks.
  • +
  • #4112 : [FF] Paste dialog had scrollbars in quirks.
  • +
  • #4118 : Dialog dragging was + occasionally behaving strangely .
  • +
  • #4077 : The toolbar combos + were rendering incorrectly in some languages, like Chinese.
  • +
  • #3622 : The toolbar in the v2 + skin was wrapping improperly in some languages.
  • +
  • #4119 : Unable to edit image link with image dialog.
  • +
  • #4117 : Fixed dialog error when transforming image into button.
  • +
  • #4058 : [FF] wysiwyg mode is sometimes not been activated.
  • +
  • #4114 : [IE] RTE + IE6/IE7 Quirks = dialog mispositoned.
  • +
  • #4123 : Some dialog buttons were broken in IE7 quirks.
  • +
  • #4122 : [IE] The image dialog + was being rendered improperly when loading an image with long URL.
  • +
  • #4144 : Fixed the white-spaces at the end of <pre> is incorrectly removed.
  • +
  • #4143 : Fixed element id is lost when extracting contents from the range.
  • +
  • #4007 : [IE] Source area overflow from editor chrome.
  • +
  • #4145 : Fixed the on demand + ("basic") loading model of the editor.
  • +
  • #4139 : Fixed list plugin regression of [3903].
  • +
  • #4147 : Unify style text normalization logic when comparing styles.
  • +
  • #4150 : Fixed enlarge list result incorrect at the inner boundary of block.
  • +
  • #4164 : Now it is possible to paste text + in Source mode even if forcePasteAsPlainText = true.
  • +
  • #4129 : [FF]Unable to remove list with Ctrl-A.
  • +
  • #4172 : [Safari] The trailing + <br> was not been always added to blank lines ending with &nbsp;.
  • +
  • #4178 : It's now possible to + copy and paste Flash content among different editor instances.
  • +
  • #4193 : Automatic font color produced empty span on Firefox 3.5.
  • +
  • #4186 : [FF] Fixed First open float panel cause host page scrollbar blinking.
  • +
  • #4227 : Fixed destroy editor instance created on textarea which is not within form cause error.
  • +
  • #4240 : Fixed editor name containing hyphen break editor completely.
  • +
  • #3828 : Malformed nested list is now corrected by the parser.
  • +
+

+ CKEditor 3.0 RC

+

+ Changelog starts at this release.

+ + + diff --git a/assets/ckeditor/INSTALL.html b/assets/ckeditor/INSTALL.html new file mode 100644 index 0000000..fd2440e --- /dev/null +++ b/assets/ckeditor/INSTALL.html @@ -0,0 +1,92 @@ + + + + + Installation Guide - CKEditor + + + + +

+ CKEditor Installation Guide

+

+ What's CKEditor?

+

+ CKEditor is a text editor to be used inside web pages. It's not a replacement + for desktop text editors like Word or OpenOffice, but a component to be used as + part of web applications and web sites.

+

+ Installation

+

+ Installing CKEditor is an easy task. Just follow these simple steps:

+
    +
  1. Download the latest version of the editor from our web site: http://ckeditor.com. You should have already completed + this step, but be sure you have the very latest version.
  2. +
  3. Extract (decompress) the downloaded file into the root of your + web site.
  4. +
+

+ Note: CKEditor is by default installed in the "ckeditor" + folder. You can place the files in whichever you want though.

+

+ Checking Your Installation +

+

+ The editor comes with a few sample pages that can be used to verify that installation + proceeded properly. Take a look at the _samples directory.

+

+ To test your installation, just call the following page at your web site:

+
+http://<your site>/<CKEditor installation path>/_samples/index.html
+
+For example:
+http://www.example.com/ckeditor/_samples/index.html
+

+ Documentation

+

+ The full editor documentation is available online at the following address:
+ http://docs.cksource.com/ckeditor

+ + + diff --git a/assets/ckeditor/LICENSE.html b/assets/ckeditor/LICENSE.html new file mode 100644 index 0000000..b049b25 --- /dev/null +++ b/assets/ckeditor/LICENSE.html @@ -0,0 +1,1334 @@ + + + + + License - CKEditor + + +

+ Software License Agreement +

+

+ CKEditor™ - The text editor for Internet™ - + http://ckeditor.com
+ Copyright © 2003-2011, CKSource - Frederico Knabben. All rights reserved. +

+

+ Licensed under the terms of any of the following licenses at your choice: +

+ +

+ You are not required to, but if you want to explicitly declare the license you have + chosen to be bound to when using, reproducing, modifying and distributing this software, + just include a text file titled "LEGAL" in your version of this software, indicating + your license choice. In any case, your choice will not restrict any recipient of + your version of this software to use, reproduce, modify and distribute this software + under any of the above licenses. +

+

+ Sources of Intellectual Property Included in CKEditor +

+

+ Where not otherwise indicated, all CKEditor content is authored by CKSource engineers + and consists of CKSource-owned intellectual property. In some specific instances, + CKEditor will incorporate work done by developers outside of CKSource with their + express permission. +

+

+ YUI Test: At _source/tests/yuitest.js + can be found part of the source code of YUI, which is licensed under the terms of + the BSD License. YUI is + Copyright © 2008, Yahoo! Inc. +

+

+ Trademarks +

+

+ CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product + names are trademarks, registered trademarks or service marks of their respective + holders. +

+ + diff --git a/assets/ckeditor/adapters/jquery.js b/assets/ckeditor/adapters/jquery.js new file mode 100644 index 0000000..289de41 --- /dev/null +++ b/assets/ckeditor/adapters/jquery.js @@ -0,0 +1,6 @@ +/* +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function(){CKEDITOR.config.jqueryOverrideVal=typeof CKEDITOR.config.jqueryOverrideVal=='undefined'?true:CKEDITOR.config.jqueryOverrideVal;var a=window.jQuery;if(typeof a=='undefined')return;a.extend(a.fn,{ckeditorGet:function(){var b=this.eq(0).data('ckeditorInstance');if(!b)throw 'CKEditor not yet initialized, use ckeditor() with callback.';return b;},ckeditor:function(b,c){if(!CKEDITOR.env.isCompatible)return this;if(!a.isFunction(b)){var d=c;c=b;b=d;}c=c||{};this.filter('textarea, div, p').each(function(){var e=a(this),f=e.data('ckeditorInstance'),g=e.data('_ckeditorInstanceLock'),h=this;if(f&&!g){if(b)b.apply(f,[this]);}else if(!g){if(c.autoUpdateElement||typeof c.autoUpdateElement=='undefined'&&CKEDITOR.config.autoUpdateElement)c.autoUpdateElementJquery=true;c.autoUpdateElement=false;e.data('_ckeditorInstanceLock',true);f=CKEDITOR.replace(h,c);e.data('ckeditorInstance',f);f.on('instanceReady',function(i){var j=i.editor;setTimeout(function(){if(!j.element){setTimeout(arguments.callee,100);return;}i.removeListener('instanceReady',this.callee);j.on('dataReady',function(){e.trigger('setData.ckeditor',[j]);});j.on('getData',function(l){e.trigger('getData.ckeditor',[j,l.data]);},999);j.on('destroy',function(){e.trigger('destroy.ckeditor',[j]);});if(j.config.autoUpdateElementJquery&&e.is('textarea')&&e.parents('form').length){var k=function(){e.ckeditor(function(){j.updateElement();});};e.parents('form').submit(k);e.parents('form').bind('form-pre-serialize',k);e.bind('destroy.ckeditor',function(){e.parents('form').unbind('submit',k);e.parents('form').unbind('form-pre-serialize',k);});}j.on('destroy',function(){e.data('ckeditorInstance',null);});e.data('_ckeditorInstanceLock',null);e.trigger('instanceReady.ckeditor',[j]);if(b)b.apply(j,[h]);},0);},null,null,9999);}else CKEDITOR.on('instanceReady',function(i){var j=i.editor;setTimeout(function(){if(!j.element){setTimeout(arguments.callee,100);return;}if(j.element.$==h)if(b)b.apply(j,[h]);},0);},null,null,9999);});return this;}});if(CKEDITOR.config.jqueryOverrideVal)a.fn.val=CKEDITOR.tools.override(a.fn.val,function(b){return function(c,d){var e=typeof c!='undefined',f;this.each(function(){var g=a(this),h=g.data('ckeditorInstance');if(!d&&g.is('textarea')&&h){if(e)h.setData(c);else{f=h.getData();return null;}}else if(e)b.call(g,c);else{f=b.call(g);return null;}return true;});return e?this:f;};});})(); diff --git a/assets/ckeditor/ckeditor.asp b/assets/ckeditor/ckeditor.asp new file mode 100644 index 0000000..206a4ae --- /dev/null +++ b/assets/ckeditor/ckeditor.asp @@ -0,0 +1,955 @@ +<% + ' + ' Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. + ' For licensing, see LICENSE.html or http://ckeditor.com/license + +' Shared variable for all instances ("static") +dim CKEDITOR_initComplete +dim CKEDITOR_returnedEvents + + '' + ' \brief CKEditor class that can be used to create editor + ' instances in ASP pages on server side. + ' @see http://ckeditor.com + ' + ' Sample usage: + ' @code + ' editor = new CKEditor + ' editor.editor "editor1", "

Initial value.

", empty, empty + ' @endcode + +Class CKEditor + + '' + ' The version of %CKEditor. + private version + + '' + ' A constant string unique for each release of %CKEditor. + private mTimeStamp + + '' + ' URL to the %CKEditor installation directory (absolute or relative to document root). + ' If not set, CKEditor will try to guess it's path. + ' + ' Example usage: + ' @code + ' editor.basePath = "/ckeditor/" + ' @endcode + Public basePath + + '' + ' A boolean variable indicating whether CKEditor has been initialized. + ' Set it to true only if you have already included + ' <script> tag loading ckeditor.js in your website. + Public initialized + + '' + ' Boolean variable indicating whether created code should be printed out or returned by a function. + ' + ' Example 1: get the code creating %CKEditor instance and print it on a page with the "echo" function. + ' @code + ' editor = new CKEditor + ' editor.returnOutput = true + ' code = editor.editor("editor1", "

Initial value.

", empty, empty) + ' response.write "

Editor 1:

" + ' response.write code + ' @endcode + Public returnOutput + + '' + ' A Dictionary with textarea attributes. + ' + ' When %CKEditor is created with the editor() method, a HTML <textarea> element is created, + ' it will be displayed to anyone with JavaScript disabled or with incompatible browser. + public textareaAttributes + + '' + ' A string indicating the creation date of %CKEditor. + ' Do not change it unless you want to force browsers to not use previously cached version of %CKEditor. + public timestamp + + '' + ' A dictionary that holds the instance configuration. + private oInstanceConfig + + '' + ' A dictionary that holds the configuration for all the instances. + private oAllInstancesConfig + + '' + ' A dictionary that holds event listeners for the instance. + private oInstanceEvents + + '' + ' A dictionary that holds event listeners for all the instances. + private oAllInstancesEvents + + '' + ' A Dictionary that holds global event listeners (CKEDITOR object) + private oGlobalEvents + + + Private Sub Class_Initialize() + version = "3.5.3" + timeStamp = "B37D54V" + mTimeStamp = "B37D54V" + + Set oInstanceConfig = CreateObject("Scripting.Dictionary") + Set oAllInstancesConfig = CreateObject("Scripting.Dictionary") + + Set oInstanceEvents = CreateObject("Scripting.Dictionary") + Set oAllInstancesEvents = CreateObject("Scripting.Dictionary") + Set oGlobalEvents = CreateObject("Scripting.Dictionary") + + Set textareaAttributes = CreateObject("Scripting.Dictionary") + textareaAttributes.Add "rows", 8 + textareaAttributes.Add "cols", 60 + End Sub + + '' + ' Creates a %CKEditor instance. + ' In incompatible browsers %CKEditor will downgrade to plain HTML <textarea> element. + ' + ' @param name (string) Name of the %CKEditor instance (this will be also the "name" attribute of textarea element). + ' @param value (string) Initial value. + ' + ' Example usage: + ' @code + ' set editor = New CKEditor + ' editor.editor "field1", "

Initial value.

" + ' @endcode + ' + ' Advanced example: + ' @code + ' set editor = new CKEditor + ' set config = CreateObject("Scripting.Dictionary") + ' config.Add "toolbar", Array( _ + ' Array( "Source", "-", "Bold", "Italic", "Underline", "Strike" ), _ + ' Array( "Image", "Link", "Unlink", "Anchor" ) _ + ' ) + ' set events = CreateObject("Scripting.Dictionary") + ' events.Add "instanceReady", "function (evt) { alert('Loaded second editor: ' + evt.editor.name );}" + + ' editor.editor "field1", "

Initial value.

", config, events + ' @endcode + ' + public function editor(name, value) + dim attr, out, js, customConfig, extraConfig + dim attribute + + attr = "" + + for each attribute in textareaAttributes + attr = attr & " " & attribute & "=""" & replace( textareaAttributes( attribute ), """", """ ) & """" + next + + out = "" & vbcrlf + + if not(initialized) then + out = out & init() + end if + + set customConfig = configSettings() + js = returnGlobalEvents() + + extraConfig = (new JSON)( empty, customConfig, false ) + if extraConfig<>"" then extraConfig = ", " & extraConfig + js = js & "CKEDITOR.replace('" & name & "'" & extraConfig & ");" + + out = out & script(js) + + if not(returnOutput) then + response.write out + out = "" + end if + + editor = out + + oInstanceConfig.RemoveAll + oInstanceEvents.RemoveAll + end function + + '' + ' Replaces a <textarea> with a %CKEditor instance. + ' + ' @param id (string) The id or name of textarea element. + ' + ' Example 1: adding %CKEditor to <textarea name="article"></textarea> element: + ' @code + ' set editor = New CKEditor + ' editor.replace "article" + ' @endcode + ' + public function replaceInstance(id) + dim out, js, customConfig, extraConfig + + out = "" + if not(initialized) then + out = out & init() + end if + + set customConfig = configSettings() + js = returnGlobalEvents() + + extraConfig = (new JSON)( empty, customConfig, false ) + if extraConfig<>"" then extraConfig = ", " & extraConfig + js = js & "CKEDITOR.replace('" & id & "'" & extraConfig & ");" + + out = out & script(js) + + if not(returnOutput) then + response.write out + out = "" + end if + + replaceInstance = out + + oInstanceConfig.RemoveAll + oInstanceEvents.RemoveAll + end function + + '' + ' Replace all <textarea> elements available in the document with editor instances. + ' + ' @param className (string) If set, replace all textareas with class className in the page. + ' + ' Example 1: replace all <textarea> elements in the page. + ' @code + ' editor = new CKEditor + ' editor.replaceAll empty + ' @endcode + ' + ' Example 2: replace all <textarea class="myClassName"> elements in the page. + ' @code + ' editor = new CKEditor + ' editor.replaceAll 'myClassName' + ' @endcode + ' + function replaceAll(className) + dim out, js, customConfig + + out = "" + if not(initialized) then + out = out & init() + end if + + set customConfig = configSettings() + js = returnGlobalEvents() + + if (customConfig.Count=0) then + if (isEmpty(className)) then + js = js & "CKEDITOR.replaceAll();" + else + js = js & "CKEDITOR.replaceAll('" & className & "');" + end if + else + js = js & "CKEDITOR.replaceAll( function(textarea, config) {\n" + if not(isEmpty(className)) then + js = js & " var classRegex = new RegExp('(?:^| )' + '" & className & "' + '(?:$| )');\n" + js = js & " if (!classRegex.test(textarea.className))\n" + js = js & " return false;\n" + end if + js = js & " CKEDITOR.tools.extend(config, " & (new JSON)( empty, customConfig, false ) & ", true);" + js = js & "} );" + end if + + out = out & script(js) + + if not(returnOutput) then + response.write out + out = "" + end if + + replaceAll = out + + oInstanceConfig.RemoveAll + oInstanceEvents.RemoveAll + end function + + + '' + ' A Dictionary that holds the %CKEditor configuration for all instances + ' For the list of available options, see http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html + ' + ' Example usage: + ' @code + ' editor.config("height") = 400 + ' // Use @@ at the beggining of a string to ouput it without surrounding quotes. + ' editor.config("width") = "@@screen.width * 0.8" + ' @endcode + Public Property Let Config( configKey, configValue ) + oAllInstancesConfig.Add configKey, configValue + End Property + + '' + ' Configuration options for the next instance + ' + Public Property Let instanceConfig( configKey, configValue ) + oInstanceConfig.Add configKey, configValue + End Property + + '' + ' Adds event listener. + ' Events are fired by %CKEditor in various situations. + ' + ' @param eventName (string) Event name. + ' @param javascriptCode (string) Javascript anonymous function or function name. + ' + ' Example usage: + ' @code + ' editor.addEventHandler "instanceReady", "function (ev) { " & _ + ' " alert('Loaded: ' + ev.editor.name); " & _ + ' "}" + ' @endcode + ' + public sub addEventHandler(eventName, javascriptCode) + if not(oAllInstancesEvents.Exists( eventName ) ) then + oAllInstancesEvents.Add eventName, Array() + end if + + dim listeners, size + listeners = oAllInstancesEvents( eventName ) + size = ubound(listeners) + 1 + redim preserve listeners(size) + listeners(size) = javascriptCode + + oAllInstancesEvents( eventName ) = listeners +' '' Avoid duplicates. fixme... +' if (!in_array($javascriptCode, $this->_events[$event])) { +' $this->_events[$event][] = $javascriptCode; +' } + end sub + + '' + ' Clear registered event handlers. + ' Note: this function will have no effect on already created editor instances. + ' + ' @param eventName (string) Event name, if set to 'empty' all event handlers will be removed. + ' + public sub clearEventHandlers( eventName ) + if not(isEmpty( eventName )) then + oAllInstancesEvents.Remove eventName + else + oAllInstancesEvents.RemoveAll + end if + end sub + + + '' + ' Adds event listener only for the next instance. + ' Events are fired by %CKEditor in various situations. + ' + ' @param eventName (string) Event name. + ' @param javascriptCode (string) Javascript anonymous function or function name. + ' + ' Example usage: + ' @code + ' editor.addInstanceEventHandler "instanceReady", "function (ev) { " & _ + ' " alert('Loaded: ' + ev.editor.name); " & _ + ' "}" + ' @endcode + ' + public sub addInstanceEventHandler(eventName, javascriptCode) + if not(oInstanceEvents.Exists( eventName ) ) then + oInstanceEvents.Add eventName, Array() + end if + + dim listeners, size + listeners = oInstanceEvents( eventName ) + size = ubound(listeners) + 1 + redim preserve listeners(size) + listeners(size) = javascriptCode + + oInstanceEvents( eventName ) = listeners +' '' Avoid duplicates. fixme... +' if (!in_array($javascriptCode, $this->_events[$event])) { +' $this->_events[$event][] = $javascriptCode; +' } + end sub + + '' + ' Clear registered event handlers. + ' Note: this function will have no effect on already created editor instances. + ' + ' @param eventName (string) Event name, if set to 'empty' all event handlers will be removed. + ' + public sub clearInstanceEventHandlers( eventName ) + if not(isEmpty( eventName )) then + oInstanceEvents.Remove eventName + else + oInstanceEvents.RemoveAll + end if + end sub + + '' + ' Adds global event listener. + ' + ' @param event (string) Event name. + ' @param javascriptCode (string) Javascript anonymous function or function name. + ' + ' Example usage: + ' @code + ' editor.addGlobalEventHandler "dialogDefinition", "function (ev) { " & _ + ' " alert('Loading dialog: ' + ev.data.name); " & _ + ' "}" + ' @endcode + ' + public sub addGlobalEventHandler( eventName, javascriptCode) + if not(oGlobalEvents.Exists( eventName ) ) then + oGlobalEvents.Add eventName, Array() + end if + + dim listeners, size + listeners = oGlobalEvents( eventName ) + size = ubound(listeners) + 1 + redim preserve listeners(size) + listeners(size) = javascriptCode + + oGlobalEvents( eventName ) = listeners + +' // Avoid duplicates. +' if (!in_array($javascriptCode, $this->_globalEvents[$event])) { +' $this->_globalEvents[$event][] = $javascriptCode; +' } + end sub + + '' + ' Clear registered global event handlers. + ' Note: this function will have no effect if the event handler has been already printed/returned. + ' + ' @param eventName (string) Event name, if set to 'empty' all event handlers will be removed . + ' + public sub clearGlobalEventHandlers( eventName ) + if not(isEmpty( eventName )) then + oGlobalEvents.Remove eventName + else + oGlobalEvents.RemoveAll + end if + end sub + + '' + ' Prints javascript code. + ' + ' @param string js + ' + private function script(js) + script = "" & vbcrlf + end function + + '' + ' Returns the configuration array (global and instance specific settings are merged into one array). + ' + ' @param instanceConfig (Dictionary) The specific configurations to apply to editor instance. + ' @param instanceEvents (Dictionary) Event listeners for editor instance. + ' + private function configSettings() + dim mergedConfig, mergedEvents + set mergedConfig = cloneDictionary(oAllInstancesConfig) + set mergedEvents = cloneDictionary(oAllInstancesEvents) + + if not(isEmpty(oInstanceConfig)) then + set mergedConfig = mergeDictionary(mergedConfig, oInstanceConfig) + end if + + if not(isEmpty(oInstanceEvents)) then + for each eventName in oInstanceEvents + code = oInstanceEvents( eventName ) + + if not(mergedEvents.Exists( eventName)) then + mergedEvents.Add eventName, code + else + + dim listeners, size + listeners = mergedEvents( eventName ) + size = ubound(listeners) + if isArray( code ) then + addedCount = ubound(code) + redim preserve listeners( size + addedCount + 1 ) + for i = 0 to addedCount + listeners(size + i + 1) = code (i) + next + else + size = size + 1 + redim preserve listeners(size) + listeners(size) = code + end if + + mergedEvents( eventName ) = listeners + end if + next + + end if + + dim i, eventName, handlers, configON, ub, code + + if mergedEvents.Count>0 then + if mergedConfig.Exists( "on" ) then + set configON = mergedConfig.items( "on" ) + else + set configON = CreateObject("Scripting.Dictionary") + mergedConfig.Add "on", configOn + end if + + for each eventName in mergedEvents + handlers = mergedEvents( eventName ) + code = "" + + if isArray(handlers) then + uB = ubound(handlers) + if (uB = 0) then + code = handlers(0) + else + code = "function (ev) {" + for i=0 to uB + code = code & "(" & handlers(i) & ")(ev);" + next + code = code & "}" + end if + else + code = handlers + end if + ' Using @@ at the beggining to signal JSON that we don't want this quoted. + configON.Add eventName, "@@" & code + next + +' set mergedConfig.Item("on") = configOn + end if + + set configSettings = mergedConfig + end function + + '' + ' Returns a copy of a scripting.dictionary object + ' + private function cloneDictionary( base ) + dim newOne, tmpKey + + Set newOne = CreateObject("Scripting.Dictionary") + for each tmpKey in base + newOne.Add tmpKey , base( tmpKey ) + next + + set cloneDictionary = newOne + end function + + '' + ' Combines two scripting.dictionary objects + ' The base object isn't modified, and extra gets all the properties in base + ' + private function mergeDictionary(base, extra) + dim newOne, tmpKey + + for each tmpKey in base + if not(extra.Exists( tmpKey )) then + extra.Add tmpKey, base( tmpKey ) + end if + next + + set mergeDictionary = extra + end function + + '' + ' Return global event handlers. + ' + private function returnGlobalEvents() + dim out, eventName, handlers + dim handlersForEvent, handler, code, i + out = "" + + if (isempty(CKEDITOR_returnedEvents)) then + set CKEDITOR_returnedEvents = CreateObject("Scripting.Dictionary") + end if + + for each eventName in oGlobalEvents + handlers = oGlobalEvents( eventName ) + + if not(CKEDITOR_returnedEvents.Exists(eventName)) then + CKEDITOR_returnedEvents.Add eventName, CreateObject("Scripting.Dictionary") + end if + + set handlersForEvent = CKEDITOR_returnedEvents.Item( eventName ) + + ' handlersForEvent is another dictionary + ' and handlers is an array + + for i = 0 to ubound(handlers) + code = handlers( i ) + + ' Return only new events + if not(handlersForEvent.Exists( code )) then + if (out <> "") then out = out & vbcrlf + out = out & "CKEDITOR.on('" & eventName & "', " & code & ");" + handlersForEvent.Add code, code + end if + next + next + + returnGlobalEvents = out + end function + + '' + ' Initializes CKEditor (executed only once). + ' + private function init() + dim out, args, path, extraCode, file + out = "" + + if (CKEDITOR_initComplete) then + init = "" + exit function + end if + + if (initialized) then + CKEDITOR_initComplete = true + init = "" + exit function + end if + + args = "" + path = ckeditorPath() + + if (timestamp <> "") and (timestamp <> "%" & "TIMESTAMP%") then + args = "?t=" & timestamp + end if + + ' Skip relative paths... + if (instr(path, "..") <> 0) then + out = out & script("window.CKEDITOR_BASEPATH='" & path & "';") + end if + + out = out & "" & vbcrlf + + extraCode = "" + if (timestamp <> mTimeStamp) then + extraCode = extraCode & "CKEDITOR.timestamp = '" & timestamp & "';" + end if + if (extraCode <> "") then + out = out & script(extraCode) + end if + + CKEDITOR_initComplete = true + initialized = true + + init = out + end function + + private function ckeditorFileName() + ckeditorFileName = "ckeditor.js" + end function + + '' + ' Return path to ckeditor.js. + ' + private function ckeditorPath() + if (basePath <> "") then + ckeditorPath = basePath + else + ' In classic ASP we can't get the location of this included script + ckeditorPath = "/ckeditor/" + end if + + ' Try to check if that folder contains the CKEditor files: + ' If it's a full URL avoid checking it as it might point to an external server. + if (instr(ckeditorPath, "://") <> 0) then exit function + + dim filename, oFSO, exists + filename = server.mapPath(basePath & ckeditorFileName()) + set oFSO = Server.CreateObject("Scripting.FileSystemObject") + exists = oFSO.FileExists(filename) + set oFSO = nothing + + if not(exists) then + response.clear + response.write "

CKEditor path validation failed

" + response.write "

The path "" & ckeditorPath & "" doesn't include the CKEditor main file (" & ckeditorFileName() & ")

" + response.write "

Please, verify that you have set it correctly and/or adjust the 'basePath' property

" + response.write "

Checked for physical file: "" & filename & ""

" + response.end + end if + end function + +End Class + + + +' URL: http://www.webdevbros.net/2007/04/26/generate-json-from-asp-datatypes/ +'************************************************************************************************************** +'' @CLASSTITLE: JSON +'' @CREATOR: Michal Gabrukiewicz (gabru at grafix.at), Michael Rebec +'' @CONTRIBUTORS: - Cliff Pruitt (opensource at crayoncowboy.com) +'' - Sylvain Lafontaine +'' - Jef Housein +'' - Jeremy Brown +'' @CREATEDON: 2007-04-26 12:46 +'' @CDESCRIPTION: Comes up with functionality for JSON (http://json.org) to use within ASP. +'' Correct escaping of characters, generating JSON Grammer out of ASP datatypes and structures +'' Some examples (all use the toJSON() method but as it is the class' default method it can be left out): +'' +'' <% +'' 'simple number +'' output = (new JSON)("myNum", 2, false) +'' 'generates {"myNum": 2} +'' +'' 'array with different datatypes +'' output = (new JSON)("anArray", array(2, "x", null), true) +'' 'generates "anArray": [2, "x", null] +'' '(note: the last parameter was true, thus no surrounding brackets in the result) +'' % > +'' +'' @REQUIRES: - +'' @OPTIONEXPLICIT: yes +'' @VERSION: 1.5.1 + +'************************************************************************************************************** +class JSON + + 'private members + private output, innerCall + + '********************************************************************************************************** + '* constructor + '********************************************************************************************************** + public sub class_initialize() + newGeneration() + end sub + + '****************************************************************************************** + '' @SDESCRIPTION: STATIC! takes a given string and makes it JSON valid + '' @DESCRIPTION: all characters which needs to be escaped are beeing replaced by their + '' unicode representation according to the + '' RFC4627#2.5 - http://www.ietf.org/rfc/rfc4627.txt?number=4627 + '' @PARAM: val [string]: value which should be escaped + '' @RETURN: [string] JSON valid string + '****************************************************************************************** + public function escape(val) + dim cDoubleQuote, cRevSolidus, cSolidus + cDoubleQuote = &h22 + cRevSolidus = &h5C + cSolidus = &h2F + dim i, currentDigit + for i = 1 to (len(val)) + currentDigit = mid(val, i, 1) + if ascw(currentDigit) > &h00 and ascw(currentDigit) < &h1F then + currentDigit = escapequence(currentDigit) + elseif ascw(currentDigit) >= &hC280 and ascw(currentDigit) <= &hC2BF then + currentDigit = "\u00" + right(padLeft(hex(ascw(currentDigit) - &hC200), 2, 0), 2) + elseif ascw(currentDigit) >= &hC380 and ascw(currentDigit) <= &hC3BF then + currentDigit = "\u00" + right(padLeft(hex(ascw(currentDigit) - &hC2C0), 2, 0), 2) + else + select case ascw(currentDigit) + case cDoubleQuote: currentDigit = escapequence(currentDigit) + case cRevSolidus: currentDigit = escapequence(currentDigit) + case cSolidus: currentDigit = escapequence(currentDigit) + end select + end if + escape = escape & currentDigit + next + end function + + '****************************************************************************************************************** + '' @SDESCRIPTION: generates a representation of a name value pair in JSON grammer + '' @DESCRIPTION: It generates a name value pair which is represented as {"name": value} in JSON. + '' the generation is fully recursive. Thus the value can also be a complex datatype (array in dictionary, etc.) e.g. + '' + '' <% + '' set j = new JSON + '' j.toJSON "n", array(RS, dict, false), false + '' j.toJSON "n", array(array(), 2, true), false + '' % > + '' + '' @PARAM: name [string]: name of the value (accessible with javascript afterwards). leave empty to get just the value + '' @PARAM: val [variant], [int], [float], [array], [object], [dictionary]: value which needs + '' to be generated. Conversation of the data types is as follows:
+ '' - ASP datatype -> JavaScript datatype + '' - NOTHING, NULL -> null + '' - INT, DOUBLE -> number + '' - STRING -> string + '' - BOOLEAN -> bool + '' - ARRAY -> array + '' - DICTIONARY -> Represents it as name value pairs. Each key is accessible as property afterwards. json will look like "name": {"key1": "some value", "key2": "other value"} + '' - multidimensional array -> Generates a 1-dimensional array (flat) with all values of the multidimensional array + '' - request object -> every property and collection (cookies, form, querystring, etc) of the asp request object is exposed as an item of a dictionary. Property names are lowercase. e.g. servervariables. + '' - OBJECT -> name of the type (if unknown type) or all its properties (if class implements reflect() method) + '' Implement a reflect() function if you want your custom classes to be recognized. The function must return + '' a dictionary where the key holds the property name and the value its value. Example of a reflect function within a User class which has firstname and lastname properties + '' + '' <% + '' function reflect() + '' . set reflect = server.createObject("scripting.dictionary") + '' . reflect.add "firstname", firstname + '' . reflect.add "lastname", lastname + '' end function + '' % > + '' + '' Example of how to generate a JSON representation of the asp request object and access the HTTP_HOST server variable in JavaScript: + '' + '' + '' + '' @PARAM: nested [bool]: indicates if the name value pair is already nested within another? if yes then the {} are left out. + '' @RETURN: [string] returns a JSON representation of the given name value pair + '****************************************************************************************************************** + public default function toJSON(name, val, nested) + if not nested and not isEmpty(name) then write("{") + if not isEmpty(name) then write("""" & escape(name) & """: ") + generateValue(val) + if not nested and not isEmpty(name) then write("}") + toJSON = output + + if innerCall = 0 then newGeneration() + end function + + '****************************************************************************************************************** + '* generate + '****************************************************************************************************************** + private function generateValue(val) + if isNull(val) then + write("null") + elseif isArray(val) then + generateArray(val) + elseif isObject(val) then + dim tName : tName = typename(val) + if val is nothing then + write("null") + elseif tName = "Dictionary" or tName = "IRequestDictionary" then + generateDictionary(val) + elseif tName = "IRequest" then + set req = server.createObject("scripting.dictionary") + req.add "clientcertificate", val.ClientCertificate + req.add "cookies", val.cookies + req.add "form", val.form + req.add "querystring", val.queryString + req.add "servervariables", val.serverVariables + req.add "totalbytes", val.totalBytes + generateDictionary(req) + elseif tName = "IStringList" then + if val.count = 1 then + toJSON empty, val(1), true + else + generateArray(val) + end if + else + generateObject(val) + end if + else + 'bool + dim varTyp + varTyp = varType(val) + if varTyp = 11 then + if val then write("true") else write("false") + 'int, long, byte + elseif varTyp = 2 or varTyp = 3 or varTyp = 17 or varTyp = 19 then + write(cLng(val)) + 'single, double, currency + elseif varTyp = 4 or varTyp = 5 or varTyp = 6 or varTyp = 14 then + write(replace(cDbl(val), ",", ".")) + else + ' Using @@ at the beggining to signal JSON that we don't want this quoted. + if left(val, 2) = "@@" then + write( mid( val, 3 ) ) + else + write("""" & escape(val & "") & """") + end if + end if + end if + generateValue = output + end function + + '****************************************************************************************************************** + '* generateArray + '****************************************************************************************************************** + private sub generateArray(val) + dim item, i + write("[") + i = 0 + 'the for each allows us to support also multi dimensional arrays + for each item in val + if i > 0 then write(",") + generateValue(item) + i = i + 1 + next + write("]") + end sub + + '****************************************************************************************************************** + '* generateDictionary + '****************************************************************************************************************** + private sub generateDictionary(val) + innerCall = innerCall + 1 + if val.count = 0 then + toJSON empty, null, true + exit sub + end if + dim key, i + write("{") + i = 0 + for each key in val + if i > 0 then write(",") + toJSON key, val(key), true + i = i + 1 + next + write("}") + innerCall = innerCall - 1 + end sub + + '****************************************************************************************************************** + '* generateObject + '****************************************************************************************************************** + private sub generateObject(val) + dim props + on error resume next + set props = val.reflect() + if err = 0 then + on error goto 0 + innerCall = innerCall + 1 + toJSON empty, props, true + innerCall = innerCall - 1 + else + on error goto 0 + write("""" & escape(typename(val)) & """") + end if + end sub + + '****************************************************************************************************************** + '* newGeneration + '****************************************************************************************************************** + private sub newGeneration() + output = empty + innerCall = 0 + end sub + + '****************************************************************************************** + '* JsonEscapeSquence + '****************************************************************************************** + private function escapequence(digit) + escapequence = "\u00" + right(padLeft(hex(ascw(digit)), 2, 0), 2) + end function + + '****************************************************************************************** + '* padLeft + '****************************************************************************************** + private function padLeft(value, totalLength, paddingChar) + padLeft = right(clone(paddingChar, totalLength) & value, totalLength) + end function + + '****************************************************************************************** + '* clone + '****************************************************************************************** + private function clone(byVal str, n) + dim i + for i = 1 to n : clone = clone & str : next + end function + + '****************************************************************************************** + '* write + '****************************************************************************************** + private sub write(val) + output = output & val + end sub + +end class +%> diff --git a/assets/ckeditor/ckeditor.js b/assets/ckeditor/ckeditor.js new file mode 100644 index 0000000..6e3090b --- /dev/null +++ b/assets/ckeditor/ckeditor.js @@ -0,0 +1,143 @@ +/* +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'B37D54V',version:'3.5.3',revision:'6655',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c){if(b[d]==undefined)b[d]=c[d];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d]; +return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(d&&d.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})d=null;if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){if(!this.ie)return false;var g=document.domain,h=window.location.hostname;return g!=h&&g!='['+h+']';}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie9Compat=document.documentMode==9;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?document.documentMode:'7'); +if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';if(d.air)d.cssClass+=' cke_browser_air';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=1;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=1;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f'+g+'');else h.push('');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='
'?function(k){return g(k).replace(/
/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'>');}:h,j=g(' ')=='  '?function(k){return i(k).replace(/ /g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'"').replace(//g,'>');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h8))&&i)h=i+':'+h;return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];if(!h)h=this.getDocumentElement().append(new d.element('head'),true);else h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h; +})();},write:function(h){var i=this;i.$.open('text/html','replace');b.isCustomDomain()&&(i.$.domain=document.domain);i.$.write(h);i.$.close();}});d.node=function(h){if(h){switch(h.nodeType){case 9:return new g(h);case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);}return this;};d.node.prototype=new d.domObject();a.NODE_ELEMENT=1;a.NODE_DOCUMENT=9;a.NODE_TEXT=3;a.NODE_COMMENT=8;a.NODE_DOCUMENT_FRAGMENT=11;a.POSITION_IDENTICAL=0;a.POSITION_DISCONNECTED=1;a.POSITION_FOLLOWING=2;a.POSITION_PRECEDING=4;a.POSITION_IS_CONTAINED=8;a.POSITION_CONTAINS=16;e.extend(d.node.prototype,{appendTo:function(h,i){h.append(this,i);return h;},clone:function(h,i){var j=this.$.cloneNode(h),k=function(l){if(l.nodeType!=1)return;if(!i)l.removeAttribute('id',false);l.removeAttribute('data-cke-expando',false);if(h){var m=l.childNodes;for(var n=0;n]*>/g,''):i;},getOuterHtml:function(){var j=this;if(j.$.outerHTML)return j.$.outerHTML.replace(/<\?[^>]*>/,'');var i=j.$.ownerDocument.createElement('div');i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var n=this;switch(j){case 'class':j='className';break;case 'tabindex':var k=i.call(n,j);if(k!==0&&n.$.tabIndex===0)k=null;return k;break;case 'checked':var l=n.$.attributes.getNamedItem(j),m=l.specified?l.nodeValue:n.$.checked;return m?'checked':null;case 'hspace':case 'value':return n.$[j];case 'style':return n.$.style.cssText;}return i.call(n,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c&&!(document.documentMode>8)){var j=this.$.scopeName;if(j!='HTML')i=j.toLowerCase()+':'+i;}return(this.getName=function(){return i;})();},getValue:function(){return this.$.value; +},getFirst:function(i){var j=this.$.firstChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getNext(i);return k;},getLast:function(i){var j=this.$.lastChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getPrevious(i);return k;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j0&&(j>2||!k[i[0].nodeName]||j==2&&!k[i[1].nodeName]);},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},mergeSiblings:(function(){function i(j,k,l){if(k&&k.type==1){var m=[];while(k.data('cke-bookmark')||k.isEmptyInlineRemoveable()){m.push(k);k=l?k.getNext():k.getPrevious();if(!k||k.type!=1)return;}if(j.isIdentical(k)){var n=l?j.getLast():j.getFirst(); +while(m.length)m.shift().move(j,!l);k.moveChildren(j,!l);k.remove();if(n&&n.type==1)n.mergeSiblings();}}};return function(j){var k=this;if(!(j===false||f.$removeEmpty[k.getName()]||k.is('a')))return;i(k,k.getNext(),true);i(k,k.getPrevious());};})(),show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true; +if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||lwindow.setTimeout(function(){window.close();},50);")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length; +},disableContextMenu:function(){this.on('contextmenu',function(i){if(!i.data.getTarget().hasClass('cke_enable_context_menu'))i.data.preventDefault();});},getDirection:function(i){return i?this.getComputedStyle('direction'):this.getStyle('direction')||this.getAttribute('dir');},data:function(i,j){i='data-'+i;if(j===undefined)return this.getAttribute(i);else if(j===false)this.removeAttribute(i);else this.setAttribute(i,j);return null;}});(function(){var i={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']};function j(k){var l=0;for(var m=0,n=i[k].length;m',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000}; +var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getChild(1).addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0){o&&a.document.getDocumentElement().removeStyle('cursor');t(z);}},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};o&&a.document.getDocumentElement().setStyle('cursor','wait');for(var x=0;x1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var B=0;B=0?x.langCode:J[0];if(!I.langEntries||!I.langEntries[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.langEntries[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^\"'>]+)|(?:\"[^\"]*\")|(?:'[^']*'))*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();if(/="/.test(p))continue;var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false}; +};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writeHtml(l,m);return;}}l.comment(n);}};(function(){var l=/[\t\r\n ]{2,}|[\t\r\n]/g;a.htmlParser.text=function(m){this.value=m;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(m,n){var o=this.value;if(n&&!(o=n.onText(o,this)))return;m.text(o);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),m={ol:1,ul:1},n=e.extend({},{html:1},f.html,f.body,f.head,{style:1,script:1});a.htmlParser.fragment.fromHtml=function(o,p,q){var r=new a.htmlParser(),s=q||new a.htmlParser.fragment(),t=[],u=[],v=s,w=false;function x(A){var B;if(t.length>0)for(var C=0;C=0;B--){if(A==t[B].name){t.splice(B,1);return;}}var C=[],D=[],E=v;while(E!=s&&E.name!=A){if(!E._.isBlockLike)D.unshift(E);C.push(E);E=E.returnPoint||E.parent;}if(E!=s){for(B=0;B0&&r.children[p-1]||null;if(q){if(o._.isBlockLike&&q.type==3){q.value=e.rtrim(q.value);if(q.value.length===0){r.children.pop();r.add(o);return;}}q.next=o;}o.previous=q;o.parent=r;r.children.push(o);r._.hasInlineStarted=o.type==3||o.type==1&&!o._.isBlockLike;},writeHtml:function(o,p){var q;this.filterChildren=function(){var r=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,r,p,true);var s=r.getHtml();this.children=new a.htmlParser.fragment.fromHtml(s).children;q=1;};!this.name&&p&&p.onFragment(this);this.writeChildrenHtml(o,q?null:p);},writeChildrenHtml:function(o,p){for(var q=0;qn?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterChildren=function(){if(!u){var z=new a.htmlParser.basicWriter();a.htmlParser.fragment.prototype.writeChildrenHtml.call(p,z,n);p.children=new a.htmlParser.fragment.fromHtml(z.getHtml(),0,p.clone()).children; +u=1;}};if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writeHtml(m,n);return;}q=p.name;if(!q){this.writeChildrenHtml.call(p,m,u?null:n);return;}}o=p.attributes;}m.openTag(q,o);var v=[];for(var w=0;w<2;w++)for(r in o){s=r;t=o[r];if(w==1)v.push([r,t]);else if(n){for(;;){if(!(s=n.onAttributeName(r))){delete o[r];break;}else if(s!=r){delete o[r];r=s;continue;}else break;}if(s)if((t=n.onAttribute(p,s,t))===false)delete o[s];else o[s]=t;}}if(m.sortAttributes)v.sort(l);var x=v.length;for(w=0;w=0;u--){var x=r[u]; +if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=q.type||q instanceof a.htmlParser.fragment;for(var s=0;s');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.on('instanceDestroyed',function(){if(e.isEmpty(this.instances))a.fire('reset');});a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1,fieldset:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0&&C.getChild(v.startOffset-1);this._.guardRTL=function(F,G){return(!G||!C.equals(F))&&(!D||!F.equals(D))&&(F.type!=1||!G||F.getName()!='body');};}var E=s?this._.guardRTL:this._.guardLTR;if(x)w=function(F,G){if(E(F,G)===false)return false;return x(F,G);};else w=E;if(this.current)u=this.current[z](false,y,w);else if(s){u=v.endContainer;if(v.endOffset>0){u=u.getChild(v.endOffset-1);if(w(u)===false)u=null;}else u=w(u,true)===false?null:u.getPreviousSourceNode(true,y,w);}else{u=v.startContainer; +u=u.getChild(v.startOffset);if(u){if(w(u)===false)u=null;}else u=w(v.startContainer,true)===false?null:v.startContainer.getNextSourceNode(true,y,w);}while(u&&!this._.end){this.current=u;if(!this.evaluator||this.evaluator(u)!==false){if(!t)return u;}else if(t&&this.evaluator)return false;u=u[z](false,y,w);}this.end();return this.current=null;};function m(s){var t,u=null;while(t=l.call(this,s))u=t;return u;};d.walker=e.createClass({$:function(s){this.range=s;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,1);},checkForward:function(){return l.call(this,0,1)!==false;},checkBackward:function(){return l.call(this,1,1)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,1);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1};h.prototype.isBlockBoundary=function(s){var t=e.extend({},f.$block,s||{});return this.getComputedStyle('float')=='none'&&n[this.getComputedStyle('display')]||t[this.getName()];};d.walker.blockBoundary=function(s){return function(t,u){return!(t.type==1&&t.isBlockBoundary(s));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmark=function(s,t){function u(v){return v&&v.getName&&v.getName()=='span'&&v.data('cke-bookmark');};return function(v){var w,x;w=v&&!v.getName&&(x=v.getParent())&&u(x);w=s?w:w||u(v);return!!(t^w);};};d.walker.whitespaces=function(s){return function(t){var u=t&&t.type==3&&!e.trim(t.getText());return!!(s^u);};};d.walker.invisible=function(s){var t=d.walker.whitespaces();return function(u){var v=t(u)||u.is&&!u.$.offsetHeight;return!!(s^v);};};d.walker.nodeType=function(s,t){return function(u){return!!(t^u.type==s);};};var o=/^[\t\r\n ]*(?: |\xa0)$/,p=d.walker.whitespaces(),q=d.walker.bookmark(),r=function(s){return q(s)||p(s)||s.type==1&&s.getName() in f.$inline&&!(s.getName() in f.$empty);};h.prototype.getBogus=function(){var s=this;do s=s.getPreviousSourceNode();while(r(s));if(s&&(!c?s.is&&s.is('br'):s.getText&&o.test(s.getText())))return s;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset; +},m=function(t,u,v,w){t.optimizeBookmark();var x=t.startContainer,y=t.endContainer,z=t.startOffset,A=t.endOffset,B,C;if(y.type==3)y=y.split(A);else if(y.getChildCount()>0)if(A>=y.getChildCount()){y=y.append(t.document.createText(''));C=true;}else y=y.getChild(A);if(x.type==3){x.split(z);if(x.equals(y))y=x.getNext();}else if(!z){x=x.getFirst().insertBeforeMe(t.document.createText(''));B=true;}else if(z>=x.getChildCount()){x=x.append(t.document.createText(''));B=true;}else x=x.getChild(z).getPrevious();var D=x.getParents(),E=y.getParents(),F,G,H;for(F=0;F0&&!J.equals(y))K=I.append(J.clone());if(!D[O]||J.$.parentNode!=D[O].$.parentNode){L=J.getPrevious();while(L){if(L.equals(D[O])||L.equals(x))break;M=L.getPrevious();if(u==2)I.$.insertBefore(L.$.cloneNode(true),I.$.firstChild);else{L.remove();if(u==1)I.$.insertBefore(L.$,I.$.firstChild);}L=M;}}if(I)I=K;}if(u==2){var P=t.startContainer;if(P.type==3){P.$.data+=P.$.nextSibling.data;P.$.parentNode.removeChild(P.$.nextSibling);}var Q=t.endContainer;if(Q.type==3&&Q.$.nextSibling){Q.$.data+=Q.$.nextSibling.data;Q.$.parentNode.removeChild(Q.$.nextSibling);}}else{if(G&&H&&(x.$.parentNode!=G.$.parentNode||y.$.parentNode!=H.$.parentNode)){var R=H.getIndex();if(B&&H.$.parentNode==x.$.parentNode)R--;if(w&&G.type==1){var S=h.createFromHtml(' ',t.document);S.insertAfter(G);G.mergeSiblings(false);t.moveToBookmark({startNode:S});}else t.setStart(H.getParent(),R);}t.collapse(true);}if(B)x.remove();if(C&&y.$.parentNode)y.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(t){var u=false,v=d.walker.bookmark(true);return function(w){if(v(w))return true;if(w.type==3){if(e.trim(w.getText()).length)return false;}else if(w.type==1)if(!n[w.getName()])if(!t&&!c&&w.getName()=='br'&&!u)u=true;else return false;return true;};};function p(t){return t.type!=3&&t.getName() in f.$removeEmpty||!e.trim(t.getText())||!!t.getParent().data('cke-bookmark');};var q=new d.walker.whitespaces(),r=new d.walker.bookmark(); +function s(t){return!q(t)&&!r(t);};d.range.prototype={clone:function(){var u=this;var t=new d.range(u.document);t.startContainer=u.startContainer;t.startOffset=u.startOffset;t.endContainer=u.endContainer;t.endOffset=u.endOffset;t.collapsed=u.collapsed;return t;},collapse:function(t){var u=this;if(t){u.endContainer=u.startContainer;u.endOffset=u.startOffset;}else{u.startContainer=u.endContainer;u.startOffset=u.endOffset;}u.collapsed=true;},cloneContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,t);return t;},deleteContents:function(t){if(this.collapsed)return;m(this,0,null,t);},extractContents:function(t){var u=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,u,t);return u;},createBookmark:function(t){var z=this;var u,v,w,x,y=z.collapsed;u=z.document.createElement('span');u.data('cke-bookmark',1);u.setStyle('display','none');u.setHtml(' ');if(t){w='cke_bm_'+e.getNextNumber();u.setAttribute('id',w+'S');}if(!y){v=u.clone();v.setHtml(' ');if(t)v.setAttribute('id',w+'E');x=z.clone();x.collapse();x.insertNode(v);}x=z.clone();x.collapse(true);x.insertNode(u);if(v){z.setStartAfter(u);z.setEndBefore(v);}else z.moveToPosition(u,4);return{startNode:t?w+'S':u,endNode:t?w+'E':v,serializable:t,collapsed:y};},createBookmark2:function(t){var B=this;var u=B.startContainer,v=B.endContainer,w=B.startOffset,x=B.endOffset,y=B.collapsed,z,A;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){z=u.getChild(w);if(z&&z.type==3&&w>0&&z.getPrevious().type==3){u=z;w=0;}if(z&&z.type==1)w=z.getIndex(1);}while(u.type==3&&(A=u.getPrevious())&&A.type==3){u=A;w+=A.getLength();}if(!y){if(v.type==1){z=v.getChild(x);if(z&&z.type==3&&x>0&&z.getPrevious().type==3){v=z;x=0;}if(z&&z.type==1)x=z.getIndex(1);}while(v.type==3&&(A=v.getPrevious())&&A.type==3){v=A;x+=A.getLength();}}}return{start:u.getAddress(t),end:y?null:v.getAddress(t),startOffset:w,endOffset:x,normalized:t,collapsed:y,is2:true};},moveToBookmark:function(t){var B=this;if(t.is2){var u=B.document.getByAddress(t.start,t.normalized),v=t.startOffset,w=t.end&&B.document.getByAddress(t.end,t.normalized),x=t.endOffset;B.setStart(u,v);if(w)B.setEnd(w,x);else B.collapse(true);}else{var y=t.serializable,z=y?B.document.getById(t.startNode):t.startNode,A=y?B.document.getById(t.endNode):t.endNode;B.setStartBefore(z);z.remove();if(A){B.setEndBefore(A);A.remove();}else B.collapse(true);}},getBoundaryNodes:function(){var y=this;var t=y.startContainer,u=y.endContainer,v=y.startOffset,w=y.endOffset,x; +if(t.type==1){x=t.getChildCount();if(x>v)t=t.getChild(v);else if(x<1)t=t.getPreviousSourceNode();else{t=t.$;while(t.lastChild)t=t.lastChild;t=new d.node(t);t=t.getNextSourceNode()||t;}}if(u.type==1){x=u.getChildCount();if(x>w)u=u.getChild(w).getPreviousSourceNode(true);else if(x<1)u=u.getPreviousSourceNode();else{u=u.$;while(u.lastChild)u=u.lastChild;u=new d.node(u);}}if(t.getPosition(u)&2)t=u;return{startNode:t,endNode:u};},getCommonAncestor:function(t,u){var y=this;var v=y.startContainer,w=y.endContainer,x;if(v.equals(w)){if(t&&v.type==1&&y.startOffset==y.endOffset-1)x=v.getChild(y.startOffset);else x=v;}else x=v.getCommonAncestor(w);return u&&!x.is?x.getParent():x;},optimize:function(){var v=this;var t=v.startContainer,u=v.startOffset;if(t.type!=1)if(!u)v.setStartBefore(t);else if(u>=t.getLength())v.setStartAfter(t);t=v.endContainer;u=v.endOffset;if(t.type!=1)if(!u)v.setEndBefore(t);else if(u>=t.getLength())v.setEndAfter(t);},optimizeBookmark:function(){var v=this;var t=v.startContainer,u=v.endContainer;if(t.is&&t.is('span')&&t.data('cke-bookmark'))v.setStartAt(t,3);if(u&&u.is&&u.is('span')&&u.data('cke-bookmark'))v.setEndAt(u,4);},trim:function(t,u){var B=this;var v=B.startContainer,w=B.startOffset,x=B.collapsed;if((!t||x)&&v&&v.type==3){if(!w){w=v.getIndex();v=v.getParent();}else if(w>=v.getLength()){w=v.getIndex()+1;v=v.getParent();}else{var y=v.split(w);w=v.getIndex()+1;v=v.getParent();if(B.startContainer.equals(B.endContainer))B.setEnd(y,B.endOffset-B.startOffset);else if(v.equals(B.endContainer))B.endOffset+=1;}B.setStart(v,w);if(x){B.collapse(true);return;}}var z=B.endContainer,A=B.endOffset;if(!(u||x)&&z&&z.type==3){if(!A){A=z.getIndex();z=z.getParent();}else if(A>=z.getLength()){A=z.getIndex()+1;z=z.getParent();}else{z.split(A);A=z.getIndex()+1;z=z.getParent();}B.setEnd(z,A);}},enlarge:function(t,u){switch(t){case 1:if(this.collapsed)return;var v=this.getCommonAncestor(),w=this.document.getBody(),x,y,z,A,B,C=false,D,E,F=this.startContainer,G=this.startOffset;if(F.type==3){if(G){F=!e.trim(F.substring(0,G)).length&&F;C=!!F;}if(F)if(!(A=F.getPrevious()))z=F.getParent();}else{if(G)A=F.getChild(G-1)||F.getLast();if(!A)z=F;}while(z||A){if(z&&!A){if(!B&&z.equals(v))B=true;if(!w.contains(z))break;if(!C||z.getComputedStyle('display')!='inline'){C=false;if(B)x=z;else this.setStartBefore(z);}A=z.getPrevious();}while(A){D=false;if(A.type==3){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;D=/[\s\ufeff]$/.test(E);}else if((A.$.offsetWidth>0||u&&A.is('br'))&&!A.data('cke-bookmark'))if(C&&f.$removeEmpty[A.getName()]){E=A.getText(); +if(/[^\s\ufeff]/.test(E))A=null;else{var H=A.$.all||A.$.getElementsByTagName('*');for(var I=0,J;J=H[I++];){if(!f.$removeEmpty[J.nodeName.toLowerCase()]){A=null;break;}}}if(A)D=!!E.length;}else A=null;if(D)if(C){if(B)x=z;else if(z)this.setStartBefore(z);}else C=true;if(A){var K=A.getPrevious();if(!z&&!K){z=A;A=null;break;}A=K;}else z=null;}if(z)z=z.getParent();}F=this.endContainer;G=this.endOffset;z=A=null;B=C=false;if(F.type==3){F=!e.trim(F.substring(G)).length&&F;C=!(F&&F.getLength());if(F)if(!(A=F.getNext()))z=F.getParent();}else{A=F.getChild(G);if(!A)z=F;}while(z||A){if(z&&!A){if(!B&&z.equals(v))B=true;if(!w.contains(z))break;if(!C||z.getComputedStyle('display')!='inline'){C=false;if(B)y=z;else if(z)this.setEndAfter(z);}A=z.getNext();}while(A){D=false;if(A.type==3){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;D=/^[\s\ufeff]/.test(E);}else if((A.$.offsetWidth>0||u&&A.is('br'))&&!A.data('cke-bookmark'))if(C&&f.$removeEmpty[A.getName()]){E=A.getText();if(/[^\s\ufeff]/.test(E))A=null;else{H=A.$.all||A.$.getElementsByTagName('*');for(I=0;J=H[I++];){if(!f.$removeEmpty[J.nodeName.toLowerCase()]){A=null;break;}}}if(A)D=!!E.length;}else A=null;if(D)if(C)if(B)y=z;else this.setEndAfter(z);if(A){K=A.getNext();if(!z&&!K){z=A;A=null;break;}A=K;}else z=null;}if(z)z=z.getParent();}if(x&&y){v=x.contains(y)?y:x;this.setStartBefore(v);this.setEndAfter(v);}break;case 2:case 3:var L=new d.range(this.document);w=this.document.getBody();L.setStartAt(w,1);L.setEnd(this.startContainer,this.startOffset);var M=new d.walker(L),N,O,P=d.walker.blockBoundary(t==3?{br:1}:null),Q=function(S){var T=P(S);if(!T)N=S;return T;},R=function(S){var T=Q(S);if(!T&&S.is&&S.is('br'))O=S;return T;};M.guard=Q;z=M.lastBackward();N=N||w;this.setStartAt(N,!N.is('br')&&(!z&&this.checkStartOfBlock()||z&&N.contains(z))?1:4);L=this.clone();L.collapse();L.setEndAt(w,2);M=new d.walker(L);M.guard=t==3?R:Q;N=null;z=M.lastForward();N=N||w;this.setEndAt(N,!z&&this.checkEndOfBlock()||z&&N.contains(z)?2:3);if(O)this.setEndAfter(O);}},shrink:function(t,u){if(!this.collapsed){t=t||2;var v=this.clone(),w=this.startContainer,x=this.endContainer,y=this.startOffset,z=this.endOffset,A=this.collapsed,B=1,C=1;if(w&&w.type==3)if(!y)v.setStartBefore(w);else if(y>=w.getLength())v.setStartAfter(w);else{v.setStartBefore(w);B=0;}if(x&&x.type==3)if(!z)v.setEndBefore(x);else if(z>=x.getLength())v.setEndAfter(x);else{v.setEndAfter(x);C=0;}var D=new d.walker(v),E=d.walker.bookmark();D.evaluator=function(I){return I.type==(t==1?1:3); +};var F;D.guard=function(I,J){if(E(I))return true;if(t==1&&I.type==3)return false;if(J&&I.equals(F))return false;if(!J&&I.type==1)F=I;return true;};if(B){var G=D[t==1?'lastForward':'next']();G&&this.setStartAt(G,u?1:3);}if(C){D.reset();var H=D[t==1?'lastBackward':'previous']();H&&this.setEndAt(H,u?2:4);}return!!(B||C);}},insertNode:function(t){var x=this;x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])u=t.getIndex(),t=t.getParent();v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;if(t.type==1&&f.$empty[t.getName()])u=t.getIndex()+1,t=t.getParent();v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer); +D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=u==1,w=this.clone();w.collapse(v);w[v?'setStartAt':'setEndAt'](t,v?1:2);var x=new d.walker(w);x.evaluator=p;return x[v?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var z=this;var t=z.startContainer,u=z.startOffset;if(u&&t.type==3){var v=e.ltrim(t.substring(0,u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.startContainer),x=z.clone();x.collapse(true);x.setStartAt(w.block||w.blockLimit,1);var y=new d.walker(x);y.evaluator=o(true);return y.checkBackward();},checkEndOfBlock:function(){var z=this;var t=z.endContainer,u=z.endOffset;if(t.type==3){var v=e.rtrim(t.substring(u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.endContainer),x=z.clone();x.collapse(false);x.setEndAt(w.block||w.blockLimit,2);var y=new d.walker(x);y.evaluator=o(false);return y.checkForward();},checkReadOnly:(function(){function t(u,v){while(u){if(u.type==1)if(u.getAttribute('contentEditable')=='false'&&!u.data('cke-editable'))return 0;else if(u.is('body')||u.getAttribute('contentEditable')=='true'&&(u.contains(v)||u.equals(v)))break;u=u.getParent();}return 1;};return function(){var u=this.startContainer,v=this.endContainer;return!(t(u,v)&&t(v,u));};})(),moveToElementEditablePosition:function(t,u){var v;if(f.$empty[t.getName()])return false;while(t&&t.type==1){v=t.isEditable();if(v)this.moveToPosition(t,u?2:1);else if(f.$inline[t.getName()]){this.moveToPosition(t,u?4:3);return true;}if(f.$empty[t.getName()])t=t[u?'getPrevious':'getNext'](s);else t=t[u?'getLast':'getFirst'](s);if(t&&t.type==3){this.moveToPosition(t,u?4:3);return true;}}return v;},moveToElementEditStart:function(t){return this.moveToElementEditablePosition(t);},moveToElementEditEnd:function(t){return this.moveToElementEditablePosition(t,true);},getEnclosedNode:function(){var t=this.clone();t.optimize();if(t.startContainer.type!=1||t.endContainer.type!=1)return null;var u=new d.walker(t),v=d.walker.bookmark(true),w=d.walker.whitespaces(true),x=function(z){return w(z)&&v(z);};t.evaluator=x;var y=u.next(); +u.reset();return y&&y.equals(u.previous())?y:null;},getTouchedStartNode:function(){var t=this.startContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.startOffset)||t;},getTouchedEndNode:function(){var t=this.endContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.endOffset-1)||t;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;a.SHRINK_ELEMENT=1;a.SHRINK_TEXT=2;(function(){d.rangeList=function(n){if(n instanceof d.rangeList)return n;if(!n)n=[];else if(n instanceof d.range)n=[n];return e.extend(n,l);};var l={createIterator:function(){var n=this,o=d.walker.bookmark(),p=function(s){return!(s.is&&s.is('tr'));},q=[],r;return{getNextRange:function(s){r=r==undefined?0:r+1;var t=n[r];if(t&&n.length>1){if(!r)for(var u=n.length-1;u>=0;u--)q.unshift(n[u].createBookmark(true));if(s){var v=0;while(n[r+v+1]){var w=t.document,x=0,y=w.getById(q[v].endNode),z=w.getById(q[v+1].startNode),A;while(1){A=y.getNextSourceNode(false);if(!z.equals(A)){if(o(A)||A.type==1&&A.isBlockBoundary()){y=A;continue;}}else x=1;break;}if(!x)break;v++;}}t.moveToBookmark(q.shift());while(v--){A=n[++r];A.moveToBookmark(q.shift());t.setEnd(A.endContainer,A.endOffset);}}return t;}};},createBookmarks:function(n){var s=this;var o=[],p;for(var q=0;q',a.document);l.appendTo(a.document.getHead()); +try{b.hc=l.getComputedStyle('border-top-color')==l.getComputedStyle('border-right-color');}catch(m){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';l.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m0){z=A.shift();while(!z.getParent().equals(D))z=z.getParent();if(!z.equals(H))E.push(z);H=z;}while(E.length>0){z=E.shift();if(z.getName()=='blockquote'){var I=new d.documentFragment(q.document);while(z.getFirst()){I.append(z.getFirst().remove());A.push(I.getLast());}I.replace(z);}else A.push(z);}var J=q.document.createElement('blockquote');J.insertBefore(A[0]);while(A.length>0){z=A.shift();J.append(z);}}else if(r==1){var K=[],L={};while(z=y.getNextParagraph()){var M=null,N=null;while(z.getParent()){if(z.getParent().getName()=='blockquote'){M=z.getParent();N=z;break;}z=z.getParent();}if(M&&N&&!N.getCustomData('blockquote_moveout')){K.push(N);h.setMarker(L,N,'blockquote_moveout',true);}}h.clearAllMarkers(L);var O=[],P=[];L={};while(K.length>0){var Q=K.shift();J=Q.getParent();if(!Q.getPrevious())Q.remove().insertBefore(J);else if(!Q.getNext())Q.remove().insertAfter(J);else{Q.breakParent(Q.getParent());P.push(Q.getNext());}if(!J.getCustomData('blockquote_processed')){P.push(J);h.setMarker(L,J,'blockquote_processed',true);}O.push(Q);}h.clearAllMarkers(L);for(F=P.length-1;F>=0;F--){J=P[F];if(o(J))J.remove();}if(q.config.enterMode==2){var R=true;while(O.length){Q=O.shift();if(Q.getName()=='div'){I=new d.documentFragment(q.document);var S=R&&Q.getPrevious()&&!(Q.getPrevious().type==1&&Q.getPrevious().isBlockBoundary());if(S)I.append(q.document.createElement('br'));var T=Q.getNext()&&!(Q.getNext().type==1&&Q.getNext().isBlockBoundary());while(Q.getFirst())Q.getFirst().remove().appendTo(I);if(T)I.append(q.document.createElement('br'));I.replace(Q);R=false;}}}}s.selectBookmarks(u);q.focus();}};j.add('blockquote',{init:function(q){q.addCommand('blockquote',p);q.ui.addButton('Blockquote',{label:q.lang.blockquote,command:'blockquote'});q.on('selectionChange',n);},requires:['domiterator']});})();j.add('button',{beforeInit:function(m){m.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(m){e.extend(this,m,{title:m.label,className:m.className||m.command&&'cke_button_'+m.command||'',click:m.click||(function(n){n.execCommand(m.command);})});this._={};};k.button.handler={create:function(m){return new k.button(m);}};k.button._={instances:[],keydown:function(m,n){var o=k.button._.instances[m];if(o.onkey){n=new d.event(n);return o.onkey(o,n.getKeystroke())!==false;}},focus:function(m,n){var o=k.button._.instances[m],p;if(o.onfocus)p=o.onfocus(o,new d.event(n))!==false;if(b.gecko&&b.version<10900)n.preventBubble();return p;}};(function(){var m=e.addFunction(k.button._.keydown,k.button._),n=e.addFunction(k.button._.focus,k.button._); +k.button.prototype={canGroup:true,render:function(o,p){var q=b,r=this._.id=e.getNextId(),s='',t=this.command,u,v;this._.editor=o;var w={id:r,button:this,editor:o,focus:function(){var z=a.document.getById(r);z.focus();},execute:function(){this.button.click(o);}};w.clickFn=u=e.addFunction(w.execute,w);w.index=v=k.button._.instances.push(w)-1;if(this.modes){var x={};o.on('beforeModeUnload',function(){x[o.mode]=this._.state;},this);o.on('mode',function(){var z=o.mode;this.setState(this.modes[z]?x[z]!=undefined?x[z]:2:0);},this);}else if(t){t=o.getCommand(t);if(t){t.on('state',function(){this.setState(t.state);},this);s+='cke_'+(t.state==1?'on':t.state==0?'disabled':'off');}}if(!t)s+='cke_off';if(this.className)s+=' '+this.className;p.push('','=10900&&!q.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+r+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(q.opera||q.gecko&&q.mac)p.push(' onkeypress="return false;"');if(q.gecko)p.push(' onblur="this.style.cssText = this.style.cssText;"');p.push(' onkeydown="return CKEDITOR.tools.callFunction(',m,', ',v,', event);" onfocus="return CKEDITOR.tools.callFunction(',n,', ',v,', event);" onclick="CKEDITOR.tools.callFunction(',u,', this); return false;"> ',this.label,'');if(this.hasArrow)p.push(''+(b.hc?'▼':' ')+'');p.push('','');if(this.onRender)this.onRender();return w;},setState:function(o){if(this._.state==o)return false;this._.state=o;var p=a.document.getById(this._.id);if(p){p.setState(o);o==0?p.setAttribute('aria-disabled',true):p.removeAttribute('aria-disabled');o==1?p.setAttribute('aria-pressed',true):p.removeAttribute('aria-pressed');return true;}else return false;}};})();k.prototype.addButton=function(m,n){this.add(m,1,n);};a.on('reset',function(){k.button._.instances=[];});(function(){var m=function(y,z){var A=y.document,B=A.getBody(),C=0,D=function(){C=1;};B.on(z,D);(b.version>7?A.$:A.$.selection.createRange()).execCommand(z);B.removeListener(z,D);return C;},n=c?function(y,z){return m(y,z); +}:function(y,z){try{return y.document.$.execCommand(z,false,null);}catch(A){return false;}},o=function(y){var z=this;z.type=y;z.canUndo=z.type=='cut';z.startDisabled=true;};o.prototype={exec:function(y,z){this.type=='cut'&&t(y);var A=n(y,this.type);if(!A)alert(y.lang.clipboard[this.type+'Error']);return A;}};var p={canUndo:false,exec:c?function(y){y.focus();if(!y.document.getBody().fire('beforepaste')&&!m(y,'paste')){y.fire('pasteDialog');return false;}}:function(y){try{if(!y.document.getBody().fire('beforepaste')&&!y.document.$.execCommand('Paste',false,null))throw 0;}catch(z){setTimeout(function(){y.fire('pasteDialog');},0);return false;}}},q=function(y){if(this.mode!='wysiwyg')return;switch(y.data.keyCode){case 1000+86:case 2000+45:var z=this.document.getBody();if(!c&&z.fire('beforepaste'))y.cancel();else if(b.opera||b.gecko&&b.version<10900)z.fire('paste');return;case 1000+88:case 2000+46:var A=this;this.fire('saveSnapshot');setTimeout(function(){A.fire('saveSnapshot');},0);}};function r(y){y.cancel();};function s(y,z,A){var B=this.document;if(B.getById('cke_pastebin'))return;if(z=='text'&&y.data&&y.data.$.clipboardData){var C=y.data.$.clipboardData.getData('text/plain');if(C){y.data.preventDefault();A(C);return;}}var D=this.getSelection(),E=new d.range(B),F=new h(z=='text'?'textarea':b.webkit?'body':'div',B);F.setAttribute('id','cke_pastebin');b.webkit&&F.append(B.createText('\xa0'));B.getBody().append(F);F.setStyles({position:'absolute',top:D.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});F.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var G=D.createBookmarks();this.on('selectionChange',r,null,null,0);if(z=='text'){if(c){var H=B.getBody().$.createTextRange();H.moveToElementText(F.$);H.execCommand('Paste');y.data.preventDefault();}else F.$.focus();}else{E.setStartAt(F,1);E.setEndAt(F,2);E.select(true);}var I=this;window.setTimeout(function(){z=='text'&&b.gecko&&I.focusGrabber.focus();F.remove();I.removeListener('selectionChange',r);var J;F=b.webkit&&(J=F.getFirst())&&J.is&&J.hasClass('Apple-style-span')?J:F;D.selectBookmarks(G);A(F['get'+(z=='text'?'Value':'Html')]());},0);};function t(y){if(!c||b.quirks)return;var z=y.getSelection(),A;if(z.getType()==3&&(A=z.getSelectedElement())){var B=z.getRanges()[0],C=y.document.createText('');C.insertBefore(A);B.setStartBefore(C);B.setEndAfter(A);z.selectRanges([B]);setTimeout(function(){if(A.getParent()){C.remove();z.selectElement(A);}},0); +}};var u;function v(y,z){c&&(u=1);var A=z.document.$.queryCommandEnabled(y)?2:0;u=0;return A;};var w;function x(){var z=this;if(z.mode!='wysiwyg')return;z.getCommand('cut').setState(w?0:v('Cut',z));z.getCommand('copy').setState(v('Copy',z));var y=w?0:b.webkit?2:v('Paste',z);z.fire('pasteState',y);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(y){y.on('paste',function(B){var C=B.data;if(C.html)y.insertHtml(C.html);else if(C.text)y.insertText(C.text);setTimeout(function(){y.fire('afterPaste');},0);},null,null,1000);y.on('pasteDialog',function(B){setTimeout(function(){y.openDialog('paste');},0);});y.on('pasteState',function(B){y.getCommand('paste').setState(B.data);});function z(B,C,D,E){var F=y.lang[C];y.addCommand(C,D);y.ui.addButton(B,{label:F,command:C});if(y.addMenuItems)y.addMenuItem(C,{label:F,command:C,group:'clipboard',order:E});};z('Cut','cut',new o('cut'),1);z('Copy','copy',new o('copy'),4);z('Paste','paste',p,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));y.on('key',q,y);var A=y.config.forcePasteAsPlainText?'text':'html';y.on('contentDom',function(){var B=y.document.getBody();B.on(A=='text'&&c||b.webkit?'paste':'beforepaste',function(C){if(u)return;s.call(y,C,A,function(D){if(!e.trim(D.toLowerCase().replace(/]+data-cke-bookmark[^<]*?<\/span>/g,'')))return;var E={};E[A]=D;y.fire('paste',E);});});B.on('beforecut',function(){!u&&t(y);});B.on('mouseup',function(){setTimeout(function(){x.call(y);},0);},y);B.on('keyup',x,y);});y.on('selectionChange',function(B){w=B.data.selection.getRanges()[0].checkReadOnly();x.call(y);});if(y.contextMenu)y.contextMenu.addListener(function(B,C){var D=C.getRanges()[0].checkReadOnly();return{cut:!D&&v('Cut',y),copy:v('Copy',y),paste:!D&&(b.webkit?2:v('Paste',y))};});}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p;if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,4,{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev'; +z[38]='prev';z[2000+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=x.length+(n.colorButton_enableMore?2:1),z=e.addFunction(function(F,G){if(F=='?'){var H=arguments.callee;function I(K){this.removeListener('ok',I);this.removeListener('cancel',I);K.name=='ok'&&H(this.getContentElement('picker','selectedColor').getValue(),G);};m.openDialog('colordialog',function(){this.on('ok',I);this.on('cancel',I);});return;}m.focus();t.hide();m.fire('saveSnapshot');new a.style(n['colorButton_'+G+'Style'],{color:'inherit'}).remove(m.document);if(F){var J=n['colorButton_'+G+'Style'];J.childRule=G=='back'?function(K){return s(K);}:function(K){return K.getName()!='a'||s(K);};new a.style(J,{color:F}).apply(m.document);}m.fire('saveSnapshot');});w.push('
',o.auto,'
');for(var A=0;A');var B=x[A].split('/'),C=B[0],D=B[1]||C;if(!B[1])C='#'+C.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var E=m.lang.colors[D]||D;w.push('');}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push(''); +w.push('
',o.more,'
');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};(function(){j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],onLoad:function(){j.contextMenu=e.createClass({base:a.menu,$:function(m){this.base.call(this,m,{panel:{className:m.skinClass+' cke_contextmenu',attributes:{'aria-label':m.lang.contextmenu.options}}});},proto:{addTarget:function(m,n){if(b.opera&&!('oncontextmenu' in document.body)){var o;m.on('mousedown',function(s){s=s.data;if(s.$.button!=2){if(s.getKeystroke()==1000+1)m.fire('contextmenu',s);return;}if(n&&(b.mac?s.$.metaKey:s.$.ctrlKey))return;var t=s.getTarget();if(!o){var u=t.getDocument();o=u.createElement('input');o.$.type='button';u.getBody().append(o);}o.setAttribute('style','position:absolute;top:'+(s.$.clientY-2)+'px;left:'+(s.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});m.on('mouseup',function(s){if(o){o.remove();o=undefined;m.fire('contextmenu',s.data);}});}m.on('contextmenu',function(s){var t=s.data;if(n&&(b.webkit?p:b.mac?t.$.metaKey:t.$.ctrlKey))return;t.preventDefault();var u=t.getTarget().getDocument().getDocumentElement(),v=t.$.clientX,w=t.$.clientY;e.setTimeout(function(){this.open(u,null,v,w);},0,this);},this);if(b.opera)m.on('keypress',function(s){var t=s.data;if(t.$.keyCode===0)t.preventDefault();});if(b.webkit){var p,q=function(s){p=b.mac?s.data.$.metaKey:s.data.$.ctrlKey;},r=function(){p=0;};m.on('keydown',q);m.on('keyup',r);m.on('contextmenu',r);}},open:function(m,n,o,p){this.editor.focus();m=m||a.document.getDocumentElement();this.show(m,n,o,p);}}});},beforeInit:function(m){m.contextMenu=new j.contextMenu(m);m.addCommand('contextMenu',{exec:function(){m.contextMenu.open(m.document.getBody());}});}});(function(){function m(o){var p=this.att,q=o&&o.hasAttribute(p)&&o.getAttribute(p)||''; +if(q!==undefined)this.setValue(q);};function n(){var o;for(var p=0;p ';j.add('elementspath',{requires:['selection'],init:function(o){var p='cke_path_'+o.name,q,r=function(){if(!q)q=a.document.getById(p);return q;},s='cke_elementspath_'+e.getNextNumber()+'_';o._.elementsPath={idBase:s,filters:[]};o.on('themeSpace',function(w){if(w.data.space=='bottom')w.data.html+=''+o.lang.elementsPath.eleLabel+''+'
'+n+'
';});function t(w){o.focus();var x=o._.elementsPath.list[w];if(x.is('body')){var y=new d.range(o.document);y.selectNodeContents(x);y.select();}else o.getSelection().selectElement(x);};var u=e.addFunction(t),v=e.addFunction(function(w,x){var y=o._.elementsPath.idBase,z;x=new d.event(x);var A=o.lang.dir=='rtl';switch(x.getKeystroke()){case A?39:37:case 9:z=a.document.getById(y+(w+1));if(!z)z=a.document.getById(y+'0');z.focus();return false;case A?37:39:case 2000+9:z=a.document.getById(y+(w-1));if(!z)z=a.document.getById(y+(o._.elementsPath.list.length-1));z.focus();return false;case 27:o.focus();return false;case 13:case 32:t(w);return false;}return true;});o.on('selectionChange',function(w){var x=b,y=w.data.selection,z=y.getStartElement(),A=[],B=w.editor,C=B._.elementsPath.list=[],D=B._.elementsPath.filters;while(z){var E=0;for(var F=0;F',H,''+J+'',''); +}if(H=='body')break;z=z.getParent();}var K=r();K.setHtml(A.join('')+n);B.fire('elementsPathUpdate',{space:K});});o.on('contentDomUnload',function(){q&&q.setHtml(n);});o.addCommand('elementsPathFocus',m.toolbarFocus);}});})();(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(t){var u=t.specialKeys;u[13]=r;u[2000+13]=q;}});j.enterkey={enterBlock:function(t,u,v,w){v=v||s(t);if(!v)return;var x=v.document;if(v.checkStartOfBlock()&&v.checkEndOfBlock()){var y=new d.elementPath(v.startContainer),z=y.block;if(z&&(z.is('li')||z.getParent().is('li'))){t.execCommand('outdent');return;}}var A=u==3?'div':'p',B=v.splitBlock(A);if(!B)return;var C=B.previousBlock,D=B.nextBlock,E=B.wasStartOfBlock,F=B.wasEndOfBlock,G;if(D){G=D.getParent();if(G.is('li')){D.breakParent(G);D.move(D.getNext(),1);}}else if(C&&(G=C.getParent())&&G.is('li')){C.breakParent(G);G=C.getNext();v.moveToElementEditStart(G);C.move(C.getPrevious());}if(!E&&!F){if(D.is('li')&&(G=D.getFirst(d.walker.invisible(true)))&&G.is&&G.is('ul','ol'))(c?x.createText('\xa0'):x.createElement('br')).insertBefore(G);if(D)v.moveToElementEditStart(D);}else{var H,I;if(C){if(C.is('li')||!p.test(C.getName())){H=C.clone();H.is('li')&&H.removeAttribute('value');}}else if(D)H=D.clone();if(!H){if(G&&G.is('li'))H=G;else{H=x.createElement(A);if(C&&(I=C.getDirection()))H.setAttribute('dir',I);}}else if(w&&!H.is('li'))H.renameNode(A);var J=B.elementPath;if(J)for(var K=0,L=J.elements.length;K0;v--)u[v].deleteContents();return u[0];};})();(function(){var m='nbsp,gt,lt',n='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',o='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',p='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv'; +function q(r,s){var t={},u=[],v={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};r=r.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(A,B){var C=s?'&'+B+';':v[B],D=s?v[B]:'&'+B+';';t[C]=D;u.push(C);return '';});if(!s&&r){r=r.split(',');var w=document.createElement('div'),x;w.innerHTML='&'+r.join(';&')+';';x=w.innerHTML;w=null;for(var y=0;y'+u+'',u);}},onClick:function(t){m.focus();m.fire('saveSnapshot');var u=q[t],v=new d.elementPath(m.getSelection().getStartElement());u[u.checkActive(v)?'remove':'apply'](m.document);setTimeout(function(){m.fire('saveSnapshot');},0);},onRender:function(){m.on('selectionChange',function(t){var u=this.getValue(),v=t.data.path;for(var w in q){if(q[w].checkActive(v)){if(w!=u)this.setValue(w,m.lang.format['tag_'+w]);return;}}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(m){var n=m.lang;m.addCss('form{border: 1px dotted #FF0000;padding: 2px;}\n'); +m.addCss('img.cke_hidden{background-image: url('+a.getUrl(this.path+'images/hiddenfield.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 16px !important;'+'height: 16px !important;'+'}');var o=function(q,r,s){m.addCommand(r,new a.dialogCommand(r));m.ui.addButton(q,{label:n.common[q.charAt(0).toLowerCase()+q.slice(1)],command:r});a.dialog.add(r,s);},p=this.path+'dialogs/';o('Form','form',p+'form.js');o('Checkbox','checkbox',p+'checkbox.js');o('Radio','radio',p+'radio.js');o('TextField','textfield',p+'textfield.js');o('Textarea','textarea',p+'textarea.js');o('Select','select',p+'select.js');o('Button','button',p+'button.js');o('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');o('HiddenField','hiddenfield',p+'hiddenfield.js');if(m.addMenuItems)m.addMenuItems({form:{label:n.form.menu,command:'form',group:'form'},checkbox:{label:n.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:n.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:n.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:n.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:n.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:n.button.title,command:'button',group:'button'},select:{label:n.select.title,command:'select',group:'select'},textarea:{label:n.textarea.title,command:'textarea',group:'textarea'}});if(m.contextMenu){m.contextMenu.addListener(function(q){if(q&&q.hasAscendant('form',true)&&!q.isReadOnly())return{form:2};});m.contextMenu.addListener(function(q){if(q&&!q.isReadOnly()){var r=q.getName();if(r=='select')return{select:2};if(r=='textarea')return{textarea:2};if(r=='input')switch(q.getAttribute('type')){case 'button':case 'submit':case 'reset':return{button:2};case 'checkbox':return{checkbox:2};case 'radio':return{radio:2};case 'image':return{imagebutton:2};default:return{textfield:2};}if(r=='img'&&q.data('cke-real-element-type')=='hiddenfield')return{hiddenfield:2};}});}m.on('doubleclick',function(q){var r=q.data.element;if(r.is('form'))q.data.dialog='form';else if(r.is('select'))q.data.dialog='select';else if(r.is('textarea'))q.data.dialog='textarea';else if(r.is('img')&&r.data('cke-real-element-type')=='hiddenfield')q.data.dialog='hiddenfield';else if(r.is('input'))switch(r.getAttribute('type')){case 'button':case 'submit':case 'reset':q.data.dialog='button';break;case 'checkbox':q.data.dialog='checkbox'; +break;case 'radio':q.data.dialog='radio';break;case 'image':q.data.dialog='imagebutton';break;default:q.data.dialog='textfield';break;}});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.htmlFilter,p=n&&n.dataFilter;if(c)o&&o.addRules({elements:{input:function(q){var r=q.attributes,s=r.type;if(!s)r.type='text';if(s=='checkbox'||s=='radio')r.value=='on'&&delete r.value;}}});if(p)p.addRules({elements:{input:function(q){if(q.attributes.type=='hidden')return m.createFakeParserElement(q,'cke_hidden','hiddenfield');}}});},requires:['image','fakeobjects']});if(c)h.prototype.hasAttribute=function(m){var p=this;var n=p.$.attributes.getNamedItem(m);if(p.getName()=='input')switch(m){case 'class':return p.$.className.length>0;case 'checked':return!!p.$.checked;case 'value':var o=p.getAttribute('type');return o=='checkbox'||o=='radio'?p.$.value!='on':p.$.value;}return!!(n&&n.specified);};(function(){var m={canUndo:false,exec:function(o){o.insertElement(o.document.createElement('hr'));}},n='horizontalrule';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('HorizontalRule',{label:o.lang.horizontalrule,command:n});}});})();(function(){var m=/^[\t\r\n ]*(?: |\xa0)$/,n='{cke_protected}';function o(T){var U=T.children.length,V=T.children[U-1];while(V&&V.type==3&&!e.trim(V.value))V=T.children[--U];return V;};function p(T,U){var V=T.children,W=o(T);if(W){if((U||!c)&&W.type==1&&W.name=='br')V.pop();if(W.type==3&&m.test(W.value))V.pop();}};function q(T,U,V){if(!U&&(!V||typeof V=='function'&&V(T)===false))return false;if(U&&c&&(document.documentMode>7||T.name in f.tr||T.name in f.$listItem))return false;var W=o(T);return!W||W&&(W.type==1&&W.name=='br'||T.name=='form'&&W.name=='input');};function r(T,U){return function(V){p(V,!T);if(q(V,!T,U))if(T||c)V.add(new a.htmlParser.text('\xa0'));else V.add(new a.htmlParser.element('br',{}));};};var s=f,t=['caption','colgroup','col','thead','tfoot','tbody'],u=e.extend({},s.$block,s.$listItem,s.$tableContent);for(var v in u){if(!('br' in s[v]))delete u[v];}delete u.pre;var w={elements:{a:function(T){var U=T.attributes;if(U&&U['data-cke-saved-name'])U['class']=(U['class']?U['class']+' ':'')+'cke_anchor';}},attributeNames:[[/^on/,'data-cke-pa-on']]},x={elements:{}};for(v in u)x.elements[v]=r();var y={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(T){var U=T.attributes;if(U){if(U['data-cke-temp'])return false;var V=['name','href','src'],W; +for(var X=0;Xe.indexOf(t,W.name)?1:-1:0;});},embed:function(T){var U=T.parent;if(U&&U.name=='object'){var V=U.attributes.width,W=U.attributes.height;V&&(T.attributes.width=V);W&&(T.attributes.height=W);}},param:function(T){T.children=[];T.isEmpty=true;return T;},a:function(T){if(!(T.children.length||T.attributes.name||T.attributes['data-cke-saved-name']))return false;},span:function(T){if(T.attributes['class']=='Apple-style-span')delete T.name;},pre:function(T){c&&p(T);},html:function(T){delete T.attributes.contenteditable;delete T.attributes['class'];},body:function(T){delete T.attributes.spellcheck;delete T.attributes.contenteditable;},style:function(T){var U=T.children[0];U&&U.value&&(U.value=e.trim(U.value));if(!T.attributes.type)T.attributes.type='text/css';},title:function(T){var U=T.children[0];U&&(U.value=T.attributes['data-cke-title']||'');}},attributes:{'class':function(T,U){return e.ltrim(T.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(c)y.attributes.style=function(T,U){return T.replace(/(^|;)([^\:]+)/g,function(V){return V.toLowerCase();});};function z(T){var U=T.attributes;if(U.contenteditable!='false')U['data-cke-editable']=U.contenteditable?'true':1;U.contenteditable='false';};function A(T){var U=T.attributes;switch(U['data-cke-editable']){case 'true':U.contenteditable='true';break;case '1':delete U.contenteditable;break;}};for(v in {input:1,textarea:1}){w.elements[v]=z;y.elements[v]=A;}var B=/<(a|area|img|input)\b([^>]*)>/gi,C=/\b(href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,E=/([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,H=/]*?)\/?>(?!\s*<\/cke:\1)/gi;function I(T){return T.replace(B,function(U,V,W){return '<'+V+W.replace(C,function(X,Y){if(W.indexOf('data-cke-saved-'+Y)==-1)return ' data-cke-saved-'+X+' '+X;return X;})+'>';});};function J(T){return T.replace(D,function(U){return ''+encodeURIComponent(U)+'';});};function K(T){return T.replace(E,function(U,V){return decodeURIComponent(V);});};function L(T){return T.replace(F,'$1cke:$2');};function M(T){return T.replace(G,'$1$2');};function N(T){return T.replace(H,''); +};function O(T){return T.replace(/(]*>)(\r\n|\n)/g,'$1$2$2');};function P(T){return T.replace(//g,function(U){return '';});};function Q(T){return T.replace(//g,function(U,V){return decodeURIComponent(V);});};function R(T,U){var V=U._.dataStore;return T.replace(//g,function(W,X){return decodeURIComponent(X);}).replace(/\{cke_protected_(\d+)\}/g,function(W,X){return V&&V[X]||'';});};function S(T,U){var V=[],W=U.config.protectedSource,X=U._.dataStore||(U._.dataStore={id:1}),Y=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,Z=[//gi,//gi].concat(W);T=T.replace(//g,function(ab){return '';});for(var aa=0;aa';});T=T.replace(Y,function(ab,ac,ad){return '';});return T.replace(/(['"]).*?\1/g,function(ab){return ab.replace(//g,function(ac,ad){X[X.id]=decodeURIComponent(ad);return '{cke_protected_'+X.id++ +'}';});});};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(T){var U=T.dataProcessor=new a.htmlDataProcessor(T);U.writer.forceSimpleAmpersand=T.config.forceSimpleAmpersand;U.dataFilter.addRules(w);U.dataFilter.addRules(x);U.htmlFilter.addRules(y);var V={elements:{}};for(v in u)V.elements[v]=r(true,T.config.fillEmptyBlocks);U.htmlFilter.addRules(V);},onLoad:function(){!('fillEmptyBlocks' in i)&&(i.fillEmptyBlocks=1);}});a.htmlDataProcessor=function(T){var U=this;U.editor=T;U.writer=new a.htmlWriter();U.dataFilter=new a.htmlParser.filter();U.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(T,U){T=S(T,this.editor);T=I(T);T=J(T);T=L(T);T=N(T);T=O(T);var V=new h('div');V.setHtml('a'+T);T=V.getHtml().substr(1);T=M(T);T=K(T);T=Q(T);var W=a.htmlParser.fragment.fromHtml(T,U),X=new a.htmlParser.basicWriter();W.writeHtml(X,this.dataFilter);T=X.getHtml(true);T=P(T);return T;},toDataFormat:function(T,U){var V=this.writer,W=a.htmlParser.fragment.fromHtml(T,U);V.reset();W.writeHtml(V,this.htmlFilter);var X=V.getHtml(true);X=Q(X);X=R(X,this.editor);return X;}};})();(function(){function m(n,o){var p=n.createFakeParserElement(o,'cke_iframe','iframe',true),q=p.attributes.style||'',r=o.attributes.width,s=o.attributes.height; +if(typeof r!='undefined')q+='width:'+e.cssLength(r)+';';if(typeof s!='undefined')q+='height:'+e.cssLength(s)+';';p.attributes.style=q;return p;};j.add('iframe',{requires:['dialog','fakeobjects'],init:function(n){var o='iframe',p=n.lang.iframe;a.dialog.add(o,this.path+'dialogs/iframe.js');n.addCommand(o,new a.dialogCommand(o));n.addCss('img.cke_iframe{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');n.ui.addButton('Iframe',{label:p.toolbar,command:o});n.on('doubleclick',function(q){var r=q.data.element;if(r.is('img')&&r.data('cke-real-element-type')=='iframe')q.data.dialog='iframe';});if(n.addMenuItems)n.addMenuItems({iframe:{label:p.title,command:'iframe',group:'image'}});if(n.contextMenu)n.contextMenu.addListener(function(q,r){if(q&&q.is('img')&&q.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(n){var o=n.dataProcessor,p=o&&o.dataFilter;if(p)p.addRules({elements:{iframe:function(q){return m(n,q);}}});}});})();j.add('image',{init:function(m){var n='image';a.dialog.add(n,this.path+'dialogs/image.js');m.addCommand(n,new a.dialogCommand(n));m.ui.addButton('Image',{label:m.lang.common.image,command:n});m.on('doubleclick',function(o){var p=o.data.element;if(p.is('img')&&!p.data('cke-realelement')&&!p.isReadOnly())o.data.dialog='image';});if(m.addMenuItems)m.addMenuItems({image:{label:m.lang.image.menu,command:'image',group:'image'}});if(m.contextMenu)m.contextMenu.addListener(function(o,p){if(!o||!o.is('img')||o.data('cke-realelement')||o.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var m={ol:1,ul:1},n=d.walker.whitespaces(true),o=d.walker.bookmark(false,true);function p(t){var B=this;var u=t.editor,v=t.data.path,w=v&&v.contains(m),x=v.block||v.blockLimit;if(w)return B.setState(2);if(!B.useIndentClasses&&B.name=='indent')return B.setState(2);if(!x)return B.setState(0);if(B.useIndentClasses){var y=x.$.className.match(B.classNameRegex),z=0;if(y){y=y[1];z=B.indentClassMap[y];}if(B.name=='outdent'&&!z||B.name=='indent'&&z==u.config.indentClasses.length)return B.setState(0);return B.setState(2);}else{var A=parseInt(x.getStyle(r(x)),10);if(isNaN(A))A=0;if(A<=0)return B.setState(0);return B.setState(2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)'); +w.indentClassMap={};for(var v=0;vY;T++)X[T].indent+=U;var aa=j.list.arrayToList(X,v,null,t.config.enterMode,M.getDirection());if(u.name=='outdent'){var ab;if((ab=M.getParent())&&ab.is('li')){var ac=aa.listNode.getChildren(),ad=[],ae=ac.count(),af;for(T=ae-1;T>=0;T--){if((af=ac.getItem(T))&&af.is&&af.is('li'))ad.push(af);}}}if(aa)aa.listNode.replace(M);if(ad&&ad.length)for(T=0;T0)M.addClass(t.config.indentClasses[P-1]);}else{var Q=r(M,N),R=parseInt(M.getStyle(Q),10);if(isNaN(R))R=0;var S=t.config.indentOffset||40;R+=(u.name=='indent'?1:-1)*S;if(R<0)return false;R=Math.max(R,0);R=Math.ceil(R/S)*S;M.setStyle(Q,R?R+(t.config.indentUnit||'px'):'');if(M.getAttribute('style')==='')M.removeAttribute('style');}h.setMarker(v,M,'indent_processed',1); +return true;};var z=t.getSelection(),A=z.createBookmarks(1),B=z&&z.getRanges(1),C,D=B.createIterator();while(C=D.getNextRange()){var E=C.getCommonAncestor(),F=E;while(F&&!(F.type==1&&m[F.getName()]))F=F.getParent();if(!F){var G=C.getEnclosedNode();if(G&&G.type==1&&G.getName() in m){C.setStartAt(G,1);C.setEndAt(G,2);F=G;}}if(F&&C.startContainer.type==1&&C.startContainer.getName() in m){var H=new d.walker(C);H.evaluator=s;C.startContainer=H.next();}if(F&&C.endContainer.type==1&&C.endContainer.getName() in m){H=new d.walker(C);H.evaluator=s;C.endContainer=H.previous();}if(F){var I=F.getFirst(s),J=!!I.getNext(s),K=C.startContainer,L=I.equals(K)||I.contains(K);if(!(L&&(u.name=='indent'||u.useIndentClasses||parseInt(F.getStyle(r(F)),10))&&y(F,!J&&I.getDirection())))w(F);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=t.addCommand('indent',new q(t,'indent')),v=t.addCommand('outdent',new q(t,'outdent'));t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');t.on('dirChanged',function(w){var x=new d.range(t.document);x.setStartBefore(w.data.node);x.setEndAfter(w.data.node);var y=new d.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(w.data.node)&&z.getDirection()){x.setStartAfter(z);y=new d.walker(x);continue;}var A=t.config.indentClasses;if(A){var B=w.data.dir=='ltr'?['_rtl','']:['','_rtl'];for(var C=0;C=0;A--){x=v[A].createIterator();x.enlargeBr=t!=2;while(y=x.getNextParagraph(t==1?'p':'div')){y.removeAttribute('align');y.removeStyle('text-align');var B=w&&(y.$.className=e.ltrim(y.$.className.replace(D.cssClassRegex,''))),C=D.state==2&&(!z||n(y,true)!=D.value);if(w){if(C)y.addClass(w);else if(!B)y.removeAttribute('class');}else if(C)y.setStyle('text-align',D.value);}}r.focus();r.forceNextSelectionCheck();s.selectBookmarks(u);}};j.add('justify',{init:function(r){var s=new p(r,'justifyleft','left'),t=new p(r,'justifycenter','center'),u=new p(r,'justifyright','right'),v=new p(r,'justifyblock','justify');r.addCommand('justifyleft',s);r.addCommand('justifycenter',t);r.addCommand('justifyright',u);r.addCommand('justifyblock',v);r.ui.addButton('JustifyLeft',{label:r.lang.justify.left,command:'justifyleft'});r.ui.addButton('JustifyCenter',{label:r.lang.justify.center,command:'justifycenter'});r.ui.addButton('JustifyRight',{label:r.lang.justify.right,command:'justifyright'});r.ui.addButton('JustifyBlock',{label:r.lang.justify.block,command:'justifyblock'});r.on('selectionChange',e.bind(o,s));r.on('selectionChange',e.bind(o,u));r.on('selectionChange',e.bind(o,t));r.on('selectionChange',e.bind(o,v));r.on('dirChanged',q);},requires:['domiterator']});})();j.add('keystrokes',{beforeInit:function(m){m.keystrokeHandler=new a.keystrokeHandler(m); +m.specialKeys={};},init:function(m){var n=m.config.keystrokes,o=m.config.blockedKeystrokes,p=m.keystrokeHandler.keystrokes,q=m.keystrokeHandler.blockedKeystrokes;for(var r=0;r7))O.append(J.createText('\xa0'));O.append(V.listNode);M=V.nextIndex;}else if(R.indent==-1&&!G&&R.grandparent){if(m[R.grandparent.getName()]){O=R.element.clone(false,true);P=R.element.getDirection(1);R.grandparent.getDirection(1)!=P&&O.setAttribute('dir',P);}else if(I||R.element.hasAttributes()||H!=2){O=J.createElement(Q);R.element.copyAttributes(O,{type:1,value:1});P=R.element.getDirection()||I;P&&O.setAttribute('dir',P);if(!I&&H==2&&!O.hasAttributes())O=new d.documentFragment(J);}else O=new d.documentFragment(J);for(S=0;SH[J-1].indent+1){var N=H[J-1].indent+1-H[J].indent,O=H[J].indent;while(H[J]&&H[J].indent>=O){H[J].indent+=N;J++;}J--;}}var P=j.list.arrayToList(H,G,null,E.config.enterMode,F.root.getAttribute('dir')),Q=P.listNode,R,S;function T(U){if((R=Q[U?'getFirst':'getLast']())&&!(R.is&&R.isBlockBoundary())&&(S=F.root[U?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(S.is&&S.isBlockBoundary({br:1})))E.document.createElement('br')[U?'insertBefore':'insertAfter'](R);};T(true);T();Q.replace(F.root);};function w(E,F){this.name=E;this.type=F;};w.prototype={exec:function(E){var F=E.document,G=E.config,H=E.getSelection(),I=H&&H.getRanges(true);if(!I||I.length<1)return;if(this.state==2){var J=F.getBody();if(!J.getFirst(q)){G.enterMode==2?J.appendBogus():I[0].fixBlock(1,G.enterMode==1?'p':'div');H.selectRanges(I);}else{var K=I.length==1&&I[0],L=K&&K.getEnclosedNode(); +if(L&&L.is&&this.type==L.getName())this.setState(1);}}var M=H.createBookmarks(true),N=[],O={},P=I.createIterator(),Q=0;while((K=P.getNextRange())&&++Q){var R=K.getBoundaryNodes(),S=R.startNode,T=R.endNode;if(S.type==1&&S.getName()=='td')K.setStartAt(R.startNode,1);if(T.type==1&&T.getName()=='td')K.setEndAt(R.endNode,2);var U=K.createIterator(),V;U.forceBrBreak=this.state==2;while(V=U.getNextParagraph()){if(V.getCustomData('list_block'))continue;else h.setMarker(O,V,'list_block',1);var W=new d.elementPath(V),X=W.elements,Y=X.length,Z=null,aa=0,ab=W.blockLimit,ac;for(var ad=Y-1;ad>=0&&(ac=X[ad]);ad--){if(m[ac.getName()]&&ab.contains(ac)){ab.removeCustomData('list_group_object_'+Q);var ae=ac.getCustomData('list_group_object');if(ae)ae.contents.push(V);else{ae={root:ac,contents:[V]};N.push(ae);h.setMarker(O,ac,'list_group_object',ae);}aa=1;break;}}if(aa)continue;var af=ab;if(af.getCustomData('list_group_object_'+Q))af.getCustomData('list_group_object_'+Q).contents.push(V);else{ae={root:af,contents:[V]};h.setMarker(O,af,'list_group_object_'+Q,ae);N.push(ae);}}}var ag=[];while(N.length>0){ae=N.shift();if(this.state==2){if(m[ae.root.getName()])s.call(this,E,ae,O,ag);else u.call(this,E,ae,ag);}else if(this.state==1&&m[ae.root.getName()])v.call(this,E,ae,O);}for(ad=0;ad0)for(var u=t.length-1;u>=0;u--){var v=t[u][0],w=t[u][1];if(w)v.insertBefore(w);else v.appendTo(s);}};function o(s,t){var u=m(s),v={},w=s.$;if(!t){v['class']=w.className||'';w.className='';}v.inline=w.style.cssText||'';if(!t)w.style.cssText='position: static; overflow: visible';n(u);return v;};function p(s,t){var u=m(s),v=s.$;if('class' in t)v.className=t['class'];if('inline' in t)v.style.cssText=t.inline;n(u);};function q(s){var t=a.instances;for(var u in t){var v=t[u];if(v.mode=='wysiwyg'){var w=v.document.getBody();w.setAttribute('contentEditable',false);w.setAttribute('contentEditable',true);}}if(s.focusManager.hasFocus){s.toolbox.focus();s.focus();}};function r(s){if(!c||b.version>6)return null;var t=h.createFromHtml('');return s.append(t,true);};j.add('maximize',{init:function(s){var t=s.lang,u=a.document,v=u.getWindow(),w,x,y,z; +function A(){var C=v.getViewPaneSize();z&&z.setStyles({width:C.width+'px',height:C.height+'px'});s.resize(C.width,C.height,null,true);};var B=2;s.addCommand('maximize',{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(){var C=s.container.getChild(1),D=s.getThemeSpace('contents');if(s.mode=='wysiwyg'){var E=s.getSelection();w=E&&E.getRanges();x=v.getScrollPosition();}else{var F=s.textarea.$;w=!c&&[F.selectionStart,F.selectionEnd];x=[F.scrollLeft,F.scrollTop];}if(this.state==2){v.on('resize',A);y=v.getScrollPosition();var G=s.container;while(G=G.getParent()){G.setCustomData('maximize_saved_styles',o(G));G.setStyle('z-index',s.config.baseFloatZIndex-1);}D.setCustomData('maximize_saved_styles',o(D,true));C.setCustomData('maximize_saved_styles',o(C,true));var H={overflow:b.webkit?'':'hidden',width:0,height:0};u.getDocumentElement().setStyles(H);!b.gecko&&u.getDocumentElement().setStyle('position','fixed');!(b.gecko&&b.quirks)&&u.getBody().setStyles(H);c?setTimeout(function(){v.$.scrollTo(0,0);},0):v.$.scrollTo(0,0);C.setStyle('position',b.gecko&&b.quirks?'fixed':'absolute');C.$.offsetLeft;C.setStyles({'z-index':s.config.baseFloatZIndex-1,left:'0px',top:'0px'});z=r(C);C.addClass('cke_maximized');A();var I=C.getDocumentPosition();C.setStyles({left:-1*I.x+'px',top:-1*I.y+'px'});b.gecko&&q(s);}else if(this.state==1){v.removeListener('resize',A);var J=[D,C];for(var K=0;K ');o=m.createFakeElement(o,'cke_pagebreak','div');o.setAttributes({alt:n,'aria-label':n,title:n});var p=m.getSelection().getRanges(true);m.fire('saveSnapshot');for(var q,r=p.length-1;r>=0;r--){q=p[r];if(r1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.width*parseInt(n,10)/100,10);if(typeof o=='string'&&o.length>1&&o.substr(o.length-1,1)=='%')o=parseInt(window.screen.height*parseInt(o,10)/100,10);if(n<640)n=640;if(o<420)o=420;var q=parseInt((window.screen.height-o)/2,10),r=parseInt((window.screen.width-n)/2,10);p=(p||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+n+',height='+o+',top='+q+',left='+r;var s=window.open('',null,p,true);if(!s)return false;try{s.moveTo(r,q);s.resizeTo(n,o);s.focus();s.location.href=m;}catch(t){s=window.open(m,null,p,true);}return true;}});(function(){var m={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(o){var p,q=o.config,r=q.baseHref?'':'',s=b.isCustomDomain();if(q.fullPage)p=o.getData().replace(//,'$&'+r).replace(/[^>]*(?=<\/title>)/,'$& — '+o.lang.preview);else{var t=''+''+r+''+o.lang.preview+''+e.buildStyleHtml(o.config.contentsCss)+''+t+o.getData()+''; +}var v=640,w=420,x=80;try{var y=window.screen;v=Math.round(y.width*0.8);w=Math.round(y.height*0.7);x=Math.round(y.width*0.1);}catch(B){}var z='';if(s){window._cke_htmlToLoad=p;z='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var A=window.open(z,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+v+',height='+w+',left='+x);if(!s){A.document.open();A.document.write(p);A.document.close();}}},n='preview';j.add(n,{init:function(o){o.addCommand(n,m);o.ui.addButton('Preview',{label:o.lang.preview,command:n});}});})();j.add('print',{init:function(m){var n='print',o=m.addCommand(n,j.print);m.ui.addButton('Print',{label:m.lang.print,command:n});}});j.print={exec:function(m){if(b.opera)return;else if(b.gecko)m.window.$.print();else m.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(m){m.addCommand('removeFormat',j.removeformat.commands.removeformat);m.ui.addButton('RemoveFormat',{label:m.lang.removeFormat,command:'removeFormat'});m._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(m){var n=m._.removeFormatRegex||(m._.removeFormatRegex=new RegExp('^(?:'+m.config.removeFormatTags.replace(/,/g,'|')+')$','i')),o=m._.removeAttributes||(m._.removeAttributes=m.config.removeFormatAttributes.split(',')),p=j.removeformat.filter,q=m.getSelection().getRanges(1),r=q.createIterator(),s;while(s=r.getNextRange()){if(!s.collapsed)s.enlarge(1);var t=s.createBookmark(),u=t.startNode,v=t.endNode,w,x=function(z){var A=new d.elementPath(z),B=A.elements;for(var C=1,D;D=B[C];C++){if(D.equals(A.block)||D.equals(A.blockLimit))break;if(n.test(D.getName())&&p(m,D))z.breakParent(D);}};x(u);if(v){x(v);w=u.getNextSourceNode(true,1);while(w){if(w.equals(v))break;var y=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.data('cke-realelement'))&&p(m,w))if(n.test(w.getName()))w.remove(1);else{w.removeAttributes(o);m.fire('removeFormatCleanup',w);}w=y;}}s.moveToBookmark(t);}m.getSelection().selectRanges(q);}}},filter:function(m,n){var o=m._.removeFormat.filters;for(var p=0;pr.width&&(n.resize_minWidth=r.width);n.resize_minHeight>r.height&&(n.resize_minHeight=r.height);a.document.on('mousemove',u);a.document.on('mouseup',v);if(m.document){m.document.on('mousemove',u);m.document.on('mouseup',v);}});m.on('destroy',function(){e.removeFunction(w);});m.on('themeSpace',function(x){if(x.data.space=='bottom'){var y='';if(s&&!t)y=' cke_resizer_horizontal';if(!s&&t)y=' cke_resizer_vertical';var z='
';o=='ltr'&&y=='ltr'?x.data.html+=z:x.data.html=z+x.data.html;}},m,null,100);}}});(function(){var m={modes:{wysiwyg:1,source:1},exec:function(o){var p=o.element.$.form;if(p)try{p.submit();}catch(q){if(p.submit.click)p.submit.click();}}},n='save';j.add(n,{init:function(o){var p=o.addCommand(n,m);p.modes={wysiwyg:!!o.element.$.form};o.ui.addButton('Save',{label:o.lang.save,command:n});}});})();(function(){var m='scaytcheck',n='';function o(t,u){var v=0,w;for(w in u){if(u[w]==t){v=1;break;}}return v;};var p=function(){var t=this,u=function(){var y=t.config,z={};z.srcNodeRef=t.document.getWindow().$.frameElement;z.assocApp='CKEDITOR.'+a.version+'@'+a.revision;z.customerid=y.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2'; +z.customDictionaryIds=y.scayt_customDictionaryIds||'';z.userDictionaryName=y.scayt_userDictionaryName||'';z.sLang=y.scayt_sLang||'en_US';z.onLoad=function(){if(!(c&&b.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(t.focusManager.hasFocus&&!q.isControlRestored(t))this.focus();};z.onBeforeChange=function(){if(q.getScayt(t)&&!t.checkDirty())setTimeout(function(){t.resetDirty();},0);};var A=window.scayt_custom_params;if(typeof A=='object')for(var B in A)z[B]=A[B];if(q.getControlId(t))z.id=q.getControlId(t);var C=new window.scayt(z);C.afterMarkupRemove.push(function(E){new h(E,C.document).mergeSiblings();});var D=q.instances[t.name];if(D){C.sLang=D.sLang;C.option(D.option());C.paused=D.paused;}q.instances[t.name]=C;try{C.setDisabled(q.isPaused(t)===false);}catch(E){}t.fire('showScaytState');};t.on('contentDom',u);t.on('contentDomUnload',function(){var y=a.document.getElementsByTag('script'),z=/^dojoIoScript(\d+)$/i,A=/^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var B=0;B=0){this.setState(0);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){var u=t.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',v='';u=u.split('|');if(u&&u.length)for(var w=0;w tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');n=o.replace(/%2/g,m).replace(/%1/g,'cke_show_borders ');var p={preserveState:true,editorFocus:false,exec:function(q){this.toggleState();this.refresh(q);},refresh:function(q){var r=this.state==1?'addClass':'removeClass';q.document.getBody()[r]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(q){var r=q.addCommand('showborders',p);r.canUndo=false;if(q.config.startupShowBorders!==false)r.setState(1);q.addCss(n);q.on('mode',function(){if(r.state!=0)r.refresh(q);},null,null,100);q.on('contentDom',function(){if(r.state!=0)r.refresh(q);});q.on('removeFormatCleanup',function(s){var t=s.data;if(q.getCommand('showborders').state==1&&t.is('table')&&(!t.hasAttribute('border')||parseInt(t.getAttribute('border'),10)<=0))t.addClass(m);});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter,t=r&&r.htmlFilter;if(s)s.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'],x=parseInt(v.border,10);if(!x||x<=0)v['class']=(w||'')+' '+m;}}});if(t)t.addRules({elements:{table:function(u){var v=u.attributes,w=v['class'];w&&(v['class']=w.replace(m,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(q){var r=q.data.name;if(r=='table'||r=='tableProperties'){var s=q.data.definition,t=s.getContents('info'),u=t.get('txtBorder'),v=u.commit;u.commit=e.override(v,function(y){return function(z,A){y.apply(this,arguments); +var B=parseInt(this.getValue(),10);A[!B||B<=0?'addClass':'removeClass'](m);};});var w=s.getContents('advanced'),x=w&&w.get('advCSSClasses');if(x){x.setup=e.override(x.setup,function(y){return function(){y.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});x.commit=e.override(x.commit,function(y){return function(z,A){y.apply(this,arguments);if(!parseInt(A.getAttribute('border'),10))A.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(m){var n=j.sourcearea,o=a.document.getWindow();m.on('editingBlockReady',function(){var p,q;m.addMode('source',{load:function(r,s){if(c&&b.version<8)r.setStyle('position','relative');m.textarea=p=new h('textarea');p.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:m.tabIndex,role:'textbox','aria-label':m.lang.editorTitle.replace('%1',m.name)});p.addClass('cke_source');p.addClass('cke_enable_context_menu');var t={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){q=function(){p.hide();p.setStyle('height',r.$.clientHeight+'px');p.setStyle('width',r.$.clientWidth+'px');p.show();};m.on('resize',q);o.on('resize',q);setTimeout(q,0);}r.setHtml('');r.append(p);p.setStyles(t);m.fire('ariaWidget',p);p.on('blur',function(){m.focusManager.blur();});p.on('focus',function(){m.focusManager.focus();});m.mayBeDirty=true;this.loadData(s);var u=m.keystrokeHandler;if(u)u.attach(p);setTimeout(function(){m.mode='source';m.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(r){p.setValue(r);m.fire('dataReady');},getData:function(){return p.getValue();},getSnapshotData:function(){return p.getValue();},unload:function(r){p.clearCustomData();m.textarea=p=null;if(q){m.removeListener('resize',q);o.removeListener('resize',q);}if(c&&b.version<8)r.removeStyle('position');},focus:function(){p.focus();}});});m.addCommand('source',n.commands.source);if(m.ui.addButton)m.ui.addButton('Source',{label:m.lang.source,command:'source'});m.on('mode',function(){m.getCommand('source').setState(m.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(m){if(m.mode=='wysiwyg')m.fire('saveSnapshot');m.getCommand('source').setState(0);m.setMode(m.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(n){var o=n.config,p=n.lang.stylesCombo,q={},r=[];function s(t){n.getStylesSet(function(u){if(!r.length){var v,w; +for(var x=0,y=u.length;x0)return;if(T.type==1&&m.test(T.getName())&&!T.getCustomData('selected_cell')){h.setMarker(K,T,'selected_cell',true);J.push(T);}};for(var M=0;M1&&V&&U[Y]==V[Y]){Z=U[Y];Z.rowSpan+=1;}else{Z=new h(U[Y]).clone();Z.removeAttribute('rowSpan');!c&&Z.appendBogus();X.append(Z);Z=Z.$;}Y+=Z.colSpan-1;}H?X.insertBefore(S):X.insertAfter(S);};function q(G){if(G instanceof d.selection){var H=n(G),I=H[0],J=I.getAscendant('table'),K=e.buildTableMap(J),L=H[0].getParent(),M=L.$.rowIndex,N=H[H.length-1],O=N.getParent().$.rowIndex+N.$.rowSpan-1,P=[];for(var Q=M;Q<=O;Q++){var R=K[Q],S=new h(J.$.rows[Q]);for(var T=0;T=0;Q--)q(P[Q]);return Y;}else if(G instanceof h){J=G.getAscendant('table');if(J.$.rows.length==1)J.remove();else G.remove();}return null;};function r(G,H){var I=G.getParent(),J=I.$.cells,K=0;for(var L=0;LI)I=K;}return I;};function t(G,H){var I=n(G),J=I[0],K=J.getAscendant('table'),L=s(I,1),M=s(I),N=H?L:M,O=e.buildTableMap(K),P=[],Q=[],R=O.length; +for(var S=0;S1&&Q.length&&Q[S]==P[S]){U=P[S];U.colSpan+=1;}else{U=new h(P[S]).clone();U.removeAttribute('colSpan');!c&&U.appendBogus();U[H?'insertBefore':'insertAfter'].call(U,new h(P[S]));U=U.$;}S+=U.rowSpan-1;}};function u(G){var H=n(G),I=H[0],J=H[H.length-1],K=I.getAscendant('table'),L=e.buildTableMap(K),M,N,O=[];for(var P=0,Q=L.length;P1){L=H[J-1]+1;break;}}if(!L)L=H[0]>0?H[0]-1:H[H.length-1]+1;var N=I.$.rows;for(J=0,K=N.length;J=0;K--)x(H[K]);if(J)z(J,true);else if(I)I.remove();}else if(G instanceof h){var L=G.getParent();if(L.getChildCount()==1)L.remove();else G.remove();}};function y(G){var H=G.getBogus();H&&H.remove();G.trim();};function z(G,H){var I=new d.range(G.getDocument());if(!I['moveToElementEdit'+(H?'End':'Start')](G)){I.selectNodeContents(G);I.collapse(H?false:true);}I.select(true);};function A(G,H,I){var J=G[H];if(typeof I=='undefined')return J;for(var K=0;J&&K=Q)M.removeAttribute('rowSpan');else M.$.rowSpan=Y;if(Y>=P)M.removeAttribute('colSpan');else M.$.colSpan=Z;var ak=new d.nodeList(N.$.rows),al=ak.count();for(ac=al-1;ac>=0;ac--){var am=ak.getItem(ac);if(!am.$.cells.length){am.remove();al++;continue;}}return M;}else return Y*Z==ab;};function D(G,H){var I=n(G);if(I.length>1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.rowSpan,Q,R,S,T;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);T=N+R;var U=new h(L.$.rows[T]),V=A(M,T),W;Q=J.clone();for(var X=0;XO){Q.insertBefore(new h(W));break;}else W=null;}if(!W)U.append(Q,true);}else{S=R=1;U=K.clone();U.insertAfter(K);U.append(Q=J.clone());var Y=A(M,N);for(var Z=0;Z1)return false;else if(H)return true;var J=I[0],K=J.getParent(),L=K.getAscendant('table'),M=e.buildTableMap(L),N=K.$.rowIndex,O=A(M,N,J),P=J.$.colSpan,Q,R,S;if(P>1){R=Math.ceil(P/2);S=Math.floor(P/2);}else{S=R=1;var T=B(M,O);for(var U=0;U0?2:0};}},tablecell_insertBefore:{label:H.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:H.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:H.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:H.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:H.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:H.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:H.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:H.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:H.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:H.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2}; +}},tablerow_insertBefore:{label:H.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:H.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:H.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:H.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:H.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:H.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:H.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(G.contextMenu)G.contextMenu.addListener(function(I,J){if(!I||I.isReadOnly())return null;while(I){if(I.getName() in F)return{tablecell:2,tablerow:2,tablecolumn:2};I=I.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();e.buildTableMap=function(m){var n=m.$.rows,o=-1,p=[];for(var q=0;qp&&(!s||!t||vt){s=v;t=u;}}else{if(q&&u==p){s=v;break;}if(ut)){s=v;t=u;}}}if(s)s.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(o){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));o.addCommand('templates',new a.dialogCommand('templates'));o.ui.addButton('Templates',{label:o.lang.templates.button,command:'templates'});}});var m={},n={};a.addTemplates=function(o,p){m[o]=p;};a.getTemplates=function(o){return m[o];};a.loadTemplates=function(o,p){var q=[];for(var r=0,s=o.length;r':' style="display:none">');s.push('',o.lang.toolbar,'');var v=o.toolbox.toolbars,w=o.config.toolbar instanceof Array?o.config.toolbar:o.config['toolbar_'+o.config.toolbar]; +for(var x=0;x');u=0;}if(y==='/'){s.push('
');continue;}s.push('');var B=v.push(A)-1;if(B>0){A.previous=v[B-1];A.previous.next=A;}for(var C=0;C');u=1;}}else if(u){s.push('');u=0;}var F=D.render(o,s);B=A.items.push(F)-1;if(B>0){F.previous=A.items[B-1];F.previous.next=F;}F.toolbar=A;F.onkey=p;F.onfocus=function(){if(!o.toolbox.focusCommandExecuted)o.focus();};}}if(u){s.push('');u=0;}s.push('');}s.push('');if(o.config.toolbarCanCollapse){var G=e.addFunction(function(){o.execCommand('toolbarCollapse');});o.on('destroy',function(){e.removeFunction(G);});var H=e.getNextId();o.addCommand('toolbarCollapse',{exec:function(I){var J=a.document.getById(H),K=J.getPrevious(),L=I.getThemeSpace('contents'),M=K.getParent(),N=parseInt(L.$.style.height,10),O=M.$.offsetHeight,P=!K.isVisible();if(!P){K.hide();J.addClass('cke_toolbox_collapser_min');J.setAttribute('title',I.lang.toolbarExpand);}else{K.show();J.removeClass('cke_toolbox_collapser_min');J.setAttribute('title',I.lang.toolbarCollapse);}J.getFirst().setText(P?'▲':'◀');var Q=M.$.offsetHeight-O;L.setStyle('height',N-Q+'px');I.fire('resize');},modes:{wysiwyg:1,source:1}});s.push('','','');}q.data.html+=s.join('');}});o.on('destroy',function(){var q,r=0,s,t,u;q=this.toolbox.toolbars;for(;r');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['BidiLtr','BidiRtl'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']]; +i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(s){var t=new o(s),u=s.addCommand('undo',{exec:function(){if(t.undo()){s.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),v=s.addCommand('redo',{exec:function(){if(t.redo()){s.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});t.onChange=function(){u.setState(t.undoable()?2:0);v.setState(t.redoable()?2:0);};function w(x){if(t.enabled&&x.data.command.canUndo!==false)t.save();};s.on('beforeCommandExec',w);s.on('afterCommandExec',w);s.on('saveSnapshot',function(){t.save();});s.on('contentDom',function(){s.document.on('keydown',function(x){if(!x.data.$.ctrlKey&&!x.data.$.metaKey)t.type(x);});});s.on('beforeModeUnload',function(){s.mode=='wysiwyg'&&t.save(true);});s.on('mode',function(){t.enabled=s.mode=='wysiwyg';t.onChange();});s.ui.addButton('Undo',{label:s.lang.undo,command:'undo'});s.ui.addButton('Redo',{label:s.lang.redo,command:'redo'});s.resetUndo=function(){t.reset();s.fire('saveSnapshot');};s.on('updateSnapshot',function(){if(t.currentImage&&new m(s).equals(t.currentImage))setTimeout(function(){t.update();},0);});}});j.undo={};var m=j.undo.Image=function(s){this.editor=s;s.fire('beforeUndoImage');var t=s.getSnapshot(),u=t&&s.getSelection();c&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=t;this.bookmarks=u&&u.createBookmarks2(true);s.fire('afterUndoImage');},n=/\b(?:href|src|name)="[^"]*?"/gi;m.prototype={equals:function(s,t){var u=this.contents,v=s.contents;if(c&&(b.ie7Compat||b.ie6Compat)){u=u.replace(n,'');v=v.replace(n,'');}if(u!=v)return false;if(t)return true;var w=this.bookmarks,x=s.bookmarks;if(w||x){if(!w||!x||w.length!=x.length)return false;for(var y=0;y25){this.save(false,null,false);this.modifiersCount=1;}}else if(!y){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var s=this;s.lastKeystroke=0;s.snapshots=[];s.index=-1;s.limit=s.editor.config.undoStackSize||20;s.currentImage=null;s.hasUndo=false;s.hasRedo=false;s.resetType();},resetType:function(){var s=this;s.typing=false;delete s.lastKeystroke;s.typesCount=0;s.modifiersCount=0;},fireChange:function(){var s=this;s.hasUndo=!!s.getNextImage(true);s.hasRedo=!!s.getNextImage(false);s.resetType();s.onChange();},save:function(s,t,u){var w=this;var v=w.snapshots;if(!t)t=new m(w.editor);if(t.contents===false)return false;if(w.currentImage&&t.equals(w.currentImage,s))return false;v.splice(w.index+1,v.length-w.index-1);if(v.length==w.limit)v.shift();w.index=v.push(t)-1;w.currentImage=t;if(u!==false)w.fireChange();return true;},restoreImage:function(s){var u=this;u.editor.loadSnapshot(s.contents);if(s.bookmarks)u.editor.getSelection().selectBookmarks(s.bookmarks);else if(c){var t=u.editor.document.getBody().$.createTextRange();t.collapse(true);t.select();}u.index=s.index;u.update();u.fireChange();},getNextImage:function(s){var x=this;var t=x.snapshots,u=x.currentImage,v,w;if(u)if(s)for(w=x.index-1;w>=0;w--){v=t[w];if(!u.equals(v,true)){v.index=w;return v;}}else for(w=x.index+1;w]*>)\s*<(p|div|address|h\d|center)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,o=d.walker.whitespaces(true);function p(D){return D.getName() in m||D.isBlockBoundary()&&f.$empty[D.getName()];};function q(D){return function(E){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot'); +D.call(this,E.data);e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};};function r(D){var J=this;if(J.dataProcessor)D=J.dataProcessor.toHtml(D);var E=J.getSelection(),F=E.getRanges()[0];if(F.checkReadOnly())return;if(c){var G=E.isLocked;if(G)E.unlock();var H=E.getNative();if(H.type=='Control')H.clear();else if(E.getType()==2){F=E.getRanges()[0];var I=F&&F.endContainer;if(I&&I.type==1&&I.getAttribute('contenteditable')=='false'&&F.checkBoundaryOfElement(I,2)){F.setEndAfter(F.endContainer);F.deleteContents();}}try{H.createRange().pasteHTML(D);}catch(K){}if(G)J.getSelection().lock();}else J.document.$.execCommand('inserthtml',false,D);if(b.webkit){E=J.getSelection();E.scrollIntoView();}};function s(D){var E=this.getSelection(),F=E.getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,G=F==2,H=e.htmlEncode(D.replace(/\r\n|\r/g,'\n'));H=H.replace(/^[ \t]+|[ \t]+$/g,function(N,O,P){if(N.length==1)return ' ';else if(!O)return e.repeat(' ',N.length-1)+' ';else return ' '+e.repeat(' ',N.length-1);});H=H.replace(/[ \t]{2,}/g,function(N){return e.repeat(' ',N.length-1)+' ';});var I=F==1?'p':'div';if(!G)H=H.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(N,O,P){return '<'+I+'>'+P+'';});H=H.replace(/\n/g,'
');if(!(G||c))H=H.replace(new RegExp('
(?=)'),function(N){return e.repeat(N,2);});if(b.gecko||b.webkit){var J=new d.elementPath(E.getStartElement()),K=[];for(var L=0;L/));else if(M in f.$block)break;}H=K.join('')+H;}r.call(this,H);};function t(D){var E=this.getSelection(),F=E.getRanges(),G=D.getName(),H=f.$block[G],I=E.isLocked;if(I)E.unlock();var J,K,L,M;for(var N=F.length-1;N>=0;N--){J=F[N];if(!J.checkReadOnly()){J.deleteContents(1);K=!N&&D||D.clone(1);var O,P;if(H)while((O=J.getCommonAncestor(0,1))&&(P=f[O.getName()])&&!(P&&P[G])){if(O.getName() in f.span)J.splitElement(O);else if(J.checkStartOfBlock()&&J.checkEndOfBlock()){J.setStartBefore(O);J.collapse(true);O.remove();}else J.splitBlock();}J.insertNode(K);if(!L)L=K;}}if(L){J.moveToPosition(L,4);if(H){var Q=L.getNext(o),R=Q&&Q.type==1&&Q.getName();if(R&&f.$block[R]&&f[R]['#'])J.moveToElementEditStart(Q);}}E.selectRanges([J]);if(I)this.getSelection().lock();};function u(D){if(!D.checkDirty())setTimeout(function(){D.resetDirty();},0);};var v=d.walker.whitespaces(true),w=d.walker.bookmark(false,true);function x(D){return v(D)&&w(D); +};function y(D){return D.type==3&&e.trim(D.getText()).match(/^(?: |\xa0)$/);};function z(D){if(D.isLocked){D.unlock();setTimeout(function(){D.lock();},0);}};function A(D){return D.getOuterHtml().match(n);};v=d.walker.whitespaces(true);function B(D){var E=D.window,F=D.document,G=D.document.getBody(),H=G.getFirst(),I=G.getChildren().count();if(!I||I==1&&H.type==1&&H.hasAttribute('_moz_editor_bogus_node')){u(D);var J=D.element.getDocument(),K=J.getDocumentElement(),L=K.$.scrollTop,M=K.$.scrollLeft,N=F.$.createEvent('KeyEvents');N.initKeyEvent('keypress',true,true,E.$,false,false,false,false,0,32);F.$.dispatchEvent(N);if(L!=K.$.scrollTop||M!=K.$.scrollLeft)J.getWindow().$.scrollTo(M,L);I&&G.getFirst().remove();F.getBody().appendBogus();var O=new d.range(F);O.setStartAt(G,1);O.select();}};function C(D){var E=D.editor,F=D.data.path,G=F.blockLimit,H=D.data.selection,I=H.getRanges()[0],J=E.document.getBody(),K=E.config.enterMode;if(b.gecko){B(E);var L=F.block||F.blockLimit,M=L&&L.getLast(x);if(L&&!(M&&M.type==1&&M.isBlockBoundary())&&!L.is('pre')&&!L.getBogus()){E.fire('updateSnapshot');u(E);L.appendBogus();}}if(K!=2&&I.collapsed&&G.getName()=='body'&&!F.block){E.fire('updateSnapshot');u(E);c&&z(H);var N=I.fixBlock(true,E.config.enterMode==3?'div':'p');if(c){var O=N.getFirst(x);O&&y(O)&&O.remove();}if(A(N)){var P=N.getNext(v);if(P&&P.type==1&&!p(P)){I.moveToElementEditStart(P);N.remove();}else{P=N.getPrevious(v);if(P&&P.type==1&&!p(P)){I.moveToElementEditEnd(P);N.remove();}}}I.select();D.cancel();}var Q=new d.range(E.document),R=new d.walker(Q);Q.selectNodeContents(J);R.evaluator=function(T){return T.type==1&&T.getName() in m;};R.guard=function(T,U){return!(T.type==3&&v(T)||U);};if(R.previous()){E.fire('updateSnapshot');u(E);c&&z(H);var S;if(K!=2)S=J.append(new h(K==1?'p':'div'));else S=J;if(!c)S.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(D){var E=D.config.enterMode!=2?D.config.enterMode==3?'div':'p':false,F=D.lang.editorTitle.replace('%1',D.name),G;D.on('editingBlockReady',function(){var M,N,O,P,Q,R,S=b.isCustomDomain(),T=function(W){if(N)N.remove();var X='document.open();'+(S?'document.domain="'+document.domain+'";':'')+'document.close();';X=b.air?'javascript:void(0)':c?'javascript:void(function(){'+encodeURIComponent(X)+'}())':'';N=h.createFromHtml('');if(document.location.protocol=='chrome:')a.event.useCapture=true; +N.on('load',function(ab){Q=1;ab.removeListener();var ac=N.getFrameDocument();ac.write(W);b.air&&V(ac.getWindow().$);});if(document.location.protocol=='chrome:')a.event.useCapture=false;var Y=D.element,Z=b.gecko&&!Y.isVisible(),aa={};if(Z){Y.show();aa={position:Y.getStyle('position'),top:Y.getStyle('top')};Y.setStyles({position:'absolute',top:'-3000px'});}M.append(N);if(Z)setTimeout(function(){Y.hide();Y.setStyles(aa);},1000);};G=e.addFunction(V);var U='';function V(W){if(!Q)return;Q=0;D.fire('ariaWidget',N);var X=W.document,Y=X.body,Z=X.getElementById('cke_actscrpt');Z&&Z.parentNode.removeChild(Z);Y.spellcheck=!D.config.disableNativeSpellChecker;if(c){Y.hideFocus=true;Y.disabled=true;Y.contentEditable=true;Y.removeAttribute('disabled');}else setTimeout(function(){if(b.gecko&&b.version>=10900||b.opera)X.$.body.contentEditable=true;else if(b.webkit)X.$.body.parentNode.contentEditable=true;else X.$.designMode='on';},0);b.gecko&&e.setTimeout(B,0,null,D);W=D.window=new d.window(W);X=D.document=new g(X);X.on('dblclick',function(af){var ag=af.data.getTarget(),ah={element:ag,dialog:''};D.fire('doubleclick',ah);ah.dialog&&D.openDialog(ah.dialog);});c&&X.on('click',function(af){var ag=af.data.getTarget();if(ag.is('input')){var ah=ag.getAttribute('type');if(ah=='submit'||ah=='reset')af.data.preventDefault();}});if(!(c||b.opera))X.on('mousedown',function(af){var ag=af.data.getTarget();if(ag.is('img','hr','input','textarea','select'))D.getSelection().selectElement(ag);});if(b.gecko)X.on('mouseup',function(af){if(af.data.$.button==2){var ag=af.data.getTarget();if(!ag.getOuterHtml().replace(n,'')){var ah=new d.range(X);ah.moveToElementEditStart(ag);ah.select(true);}}});X.on('click',function(af){af=af.data;if(af.getTarget().is('a')&&af.$.button!=2)af.preventDefault();});if(b.webkit){X.on('mousedown',function(){ac=1;});X.on('click',function(af){if(af.data.getTarget().is('input','select'))af.data.preventDefault();});X.on('mouseup',function(af){if(af.data.getTarget().is('input','textarea'))af.data.preventDefault();});}if(c&&X.$.compatMode=='CSS1Compat'||b.gecko||b.opera){var aa=X.getDocumentElement();aa.on('mousedown',function(af){if(af.data.getTarget().equals(aa)){if(b.gecko&&b.version>=10900)K();L.focus();}});}var ab=c?N:W;ab.on('blur',function(){D.focusManager.blur();});var ac;ab.on('focus',function(){var af=D.document; +if(b.gecko&&b.version>=10900)K();else if(b.opera)af.getBody().focus();else if(b.webkit)if(!ac){D.document.getDocumentElement().focus();ac=1;}D.focusManager.focus();});var ad=D.keystrokeHandler;if(ad)ad.attach(X);if(c){X.getDocumentElement().addClass(X.$.compatMode);X.on('keydown',function(af){var ag=af.data.getKeystroke();if(ag in {8:1,46:1}){var ah=D.getSelection(),ai=ah.getSelectedElement();if(ai){D.fire('saveSnapshot');var aj=ah.getRanges()[0].createBookmark();ai.remove();ah.selectBookmarks([aj]);D.fire('saveSnapshot');af.data.preventDefault();}}});if(X.$.compatMode=='CSS1Compat'){var ae={33:1,34:1};X.on('keydown',function(af){if(af.data.getKeystroke() in ae)setTimeout(function(){D.getSelection().scrollIntoView();},0);});}D.config.enterMode!=1&&X.on('selectionchange',function(){var af=X.getBody(),ag=D.getSelection().getRanges()[0];if(af.getHtml().match(/^

 <\/p>$/i)&&ag.startContainer.equals(af))setTimeout(function(){ag=D.getSelection().getRanges()[0];if(!ag.startContainer.equals('body')){af.getFirst().remove(1);ag.moveToElementEditEnd(af);ag.select(1);}},0);});}if(D.contextMenu)D.contextMenu.addTarget(X,D.config.browserContextMenuOnCtrl!==false);setTimeout(function(){D.fire('contentDom');if(R){D.mode='wysiwyg';D.fire('mode');R=false;}O=false;if(P){D.focus();P=false;}setTimeout(function(){D.fire('dataReady');},0);try{D.document.$.execCommand('enableInlineTableEditing',false,!D.config.disableNativeTableHandles);}catch(af){}if(D.config.disableObjectResizing)try{D.document.$.execCommand('enableObjectResizing',false,false);}catch(ag){D.document.getBody().on(c?'resizestart':'resize',function(ah){ah.data.preventDefault();});}if(c)setTimeout(function(){if(D.document){var ah=D.document.$.body;ah.runtimeStyle.marginBottom='0px';ah.runtimeStyle.marginBottom='';}},1000);},0);};D.addMode('wysiwyg',{load:function(W,X,Y){M=W;if(c&&b.quirks)W.setStyle('position','relative');D.mayBeDirty=true;R=true;if(Y)this.loadSnapshotData(X);else this.loadData(X);},loadData:function(W){O=true;D._.dataStore={id:1};var X=D.config,Y=X.fullPage,Z=X.docType,aa='';!Y&&(aa=e.buildStyleHtml(D.config.contentsCss)+aa);var ab=X.baseHref?'':'';if(Y)W=W.replace(/]*>/i,function(ac){D.docType=Z=ac;return '';});if(D.dataProcessor)W=D.dataProcessor.toHtml(W,E);if(Y){if(!/]/.test(W))W=''+W;if(!/]/.test(W))W=''+W+'';if(!/]/.test(W))W=W.replace(/]*>/,'$&'); +else if(!/]/.test(W))W=W.replace(/]*>/,'$&');ab&&(W=W.replace(//,'$&'+ab));W=W.replace(/<\/head\s*>/,aa+'$&');W=Z+W;}else W=X.docType+''+''+''+F+''+ab+aa+''+''+W+'';if(b.gecko)W=W.replace(/
(?=\s*<\/(:?html|body)>)/,'$&
');W+=U;this.onDispose();T(W);},getData:function(){var W=D.config,X=W.fullPage,Y=X&&D.docType,Z=N.getFrameDocument(),aa=X?Z.getDocumentElement().getOuterHtml():Z.getBody().getHtml();if(b.gecko)aa=aa.replace(/
(?=\s*(:?$|<\/body>))/,'');if(D.dataProcessor)aa=D.dataProcessor.toDataFormat(aa,E);if(W.ignoreEmptyParagraph)aa=aa.replace(n,function(ab,ac){return ac;});if(Y)aa=Y+'\n'+aa;return aa;},getSnapshotData:function(){return N.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(W){N.getFrameDocument().getBody().setHtml(W);},onDispose:function(){if(!D.document)return;D.document.getDocumentElement().clearCustomData();D.document.getBody().clearCustomData();D.window.clearCustomData();D.document.clearCustomData();N.clearCustomData();N.remove();},unload:function(W){this.onDispose();D.window=D.document=N=M=P=null;D.fire('contentDomUnload');},focus:function(){var W=D.window;if(O)P=true;else if(b.opera&&D.document){var X=D.window.$.frameElement;X.blur(),X.focus();D.document.getBody().focus();D.selectionChange();}else if(!b.opera&&W){b.air?setTimeout(function(){W.focus();},0):W.focus();D.selectionChange();}}});D.on('insertHtml',q(r),null,null,20);D.on('insertElement',q(t),null,null,20);D.on('insertText',q(s),null,null,20);D.on('selectionChange',C,null,null,1);});var H;D.on('contentDom',function(){var M=D.document.getElementsByTag('title').getItem(0);M.data('cke-title',D.document.$.title);D.document.$.title=F;});if(a.document.$.documentMode>=8){D.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var I=[];for(var J in f.$removeEmpty)I.push('html.CSS1Compat '+J+'[contenteditable=false]');D.addCss(I.join(',')+'{ display:inline-block;}');}else if(b.gecko)D.addCss('html { height: 100% !important; }');function K(M){e.tryThese(function(){D.document.$.designMode='on';setTimeout(function(){D.document.$.designMode='off';if(a.currentInstance==D)D.document.getBody().focus();},50);},function(){D.document.$.designMode='off';var N=D.document.getBody();N.setAttribute('contentEditable',false); +N.setAttribute('contentEditable',true);!M&&K(1);});};if(b.gecko||c||b.opera){var L;D.on('uiReady',function(){L=D.container.append(h.createFromHtml(''));L.on('focus',function(){D.focus();});D.focusGrabber=L;});D.on('destroy',function(){e.removeFunction(G);L.clearCustomData();delete D.focusGrabber;});}D.on('insertElement',function(M){var N=M.data;if(N.type==1&&(N.is('input')||N.is('textarea'))){if(!N.isReadOnly())N.data('cke-editable',N.hasAttribute('contenteditable')?'true':'1');N.setAttribute('contentEditable',false);}});}});if(b.gecko)(function(){var D=document.body;if(!D)window.addEventListener('load',arguments.callee,false);else{var E=D.getAttribute('onpageshow');D.setAttribute('onpageshow',(E?E+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();');}})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(m){var n='checkspell',o=m.addCommand(n,new a.dialogCommand(n));o.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname};m.ui.addButton('SpellChecker',{label:m.lang.spellCheck.toolbar,command:n});a.dialog.add(n,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){var m=e.cssLength;function n(P){return!!this._.tabs[P][0].$.offsetHeight;};function o(){var T=this;var P=T._.currentTabId,Q=T._.tabIdList.length,R=e.indexOf(T._.tabIdList,P)+Q;for(var S=R-1;S>R-Q;S--){if(n.call(T,T._.tabIdList[S%Q]))return T._.tabIdList[S%Q];}return null;};function p(){var T=this;var P=T._.currentTabId,Q=T._.tabIdList.length,R=e.indexOf(T._.tabIdList,P);for(var S=R+1;S1){ac._.tabBarMode=true;ac._.tabs[ac._.currentTabId][0].focus();ag=1;}else if((ap==37||ap==39)&&ac._.tabBarMode){as=ap==(aq?39:37)?o.call(ac):p.call(ac);ac.selectPage(as);ac._.tabs[as][0].focus();ag=1;}else if((ap==13||ap==32)&&ac._.tabBarMode){at.selectPage(at._.currentTabId);at._.tabBarMode=false;at._.currentFocusIndex=-1;af(true);ag=1;}if(ag){ao.stop();ao.data.preventDefault();}};function ai(ao){ag&&ao.data.preventDefault();};var aj=this._.element;this.on('show',function(){aj.on('keydown',ah,this,null,0);if(b.opera||b.gecko&&b.mac)aj.on('keypress',ai,this);});this.on('hide',function(){aj.removeListener('keydown',ah);if(b.opera||b.gecko&&b.mac)aj.removeListener('keypress',ai);});this.on('iframeAdded',function(ao){var ap=new g(ao.data.iframe.$.contentWindow.document);ap.on('keydown',ah,this,null,0);});this.on('show',function(){var as=this;ae();if(P.config.dialog_startupFocusTab&&ac._.pageCount>1){ac._.tabBarMode=true;ac._.tabs[ac._.currentTabId][0].focus();}else if(!as._.hasFocus){as._.currentFocusIndex=-1;if(R.onFocus){var ao=R.onFocus.call(as);ao&&ao.focus();}else af(true);if(as._.editor.mode=='wysiwyg'&&c){var ap=P.document.$.selection,aq=ap.createRange();if(aq)if(aq.parentElement&&aq.parentElement().ownerDocument==P.document.$||aq.item&&aq.item(0).ownerDocument==P.document.$){var ar=document.body.createTextRange();ar.moveToElementText(as.getElement().getFirst().$);ar.collapse(true);ar.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(ao){var ap=this.getElement(),aq=ap.getFirst();aq.remove();aq.appendTo(ap);},this);y(this);z(this);new d.text(R.title,a.document).appendTo(this.parts.title);for(var ak=0;ak0?R:0)+'px'};Y[U?'right':'left']=(Q>0?Q:0)+'px';T.setStyles(Y);S&&(Z._.moved=1);};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){var P=this._.element,Q=this.definition;if(!(P.getParent()&&P.getParent().equals(a.document.getBody())))P.appendTo(a.document.getBody());else P.setStyle('display','block');if(b.gecko&&b.version<10900){var R=this.parts.dialog;R.setStyle('position','absolute'); +setTimeout(function(){R.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||Q.width||Q.minWidth,this._.contentSize&&this._.contentSize.height||Q.height||Q.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;D(this._.editor);P.on('keydown',H);P.on(b.opera?'keypress':'keyup',I);for(var S in {keyup:1,keydown:1,keypress:1})P.on(S,O);}else{this._.parentDialog=a.dialog._.currentTop;var T=this._.parentDialog.getElement().getFirst();T.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}J(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;e.setTimeout(function(){this.layout();this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});k.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(U){U.setInitValue&&U.setInitValue();});},100,this);},layout:function(){var R=this;var P=a.document.getWindow().getViewPaneSize(),Q=R.getSize();R.move(R._.moved?R._.position.x:(P.width-Q.width)/2,R._.moved?R._.position.y:(P.height-Q.height)/2);},foreach:function(P){var S=this;for(var Q in S._.contents)for(var R in S._.contents[Q])P(S._.contents[Q][R]);return S;},reset:(function(){var P=function(Q){if(Q.reset)Q.reset(1);};return function(){this.foreach(P);return this;};})(),setupContent:function(){var P=arguments;this.foreach(function(Q){if(Q.setup)Q.setup.apply(Q,P);});},commitContent:function(){var P=arguments;this.foreach(function(Q){if(Q.commit)Q.commit.apply(Q,P);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var P=this._.element;P.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');K(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)E();else{var Q=this._.parentDialog.getElement().getFirst();Q.setStyle('z-index',parseInt(Q.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;P.removeListener('keydown',H);P.removeListener(b.opera?'keypress':'keyup',I);for(var R in {keyup:1,keydown:1,keypress:1})P.removeListener(R,O); +var S=this._.editor;S.focus();if(S.mode=='wysiwyg'&&c){var T=S.getSelection();T&&T.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(U){U.resetInitValue&&U.resetInitValue();});},addPage:function(P){var ab=this;var Q=[],R=P.label?' title="'+e.htmlEncode(P.label)+'"':'',S=P.elements,T=a.dialog._.uiElementBuilders.vbox.build(ab,{type:'vbox',className:'cke_dialog_page_contents',children:P.elements,expand:!!P.expand,padding:P.padding,style:P.style||'width: 100%;height:100%'},Q),U=h.createFromHtml(Q.join(''));U.setAttribute('role','tabpanel');var V=b,W='cke_'+P.id+'_'+e.getNextNumber(),X=h.createFromHtml(['0?' cke_last':'cke_first',R,!!P.hidden?' style="display:none"':'',' id="',W,'"',V.gecko&&V.version>=10900&&!V.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',P.label,''].join(''));U.setAttribute('aria-labelledby',W);ab._.tabs[P.id]=[X,U];ab._.tabIdList.push(P.id);!P.hidden&&ab._.pageCount++;ab._.lastTab=X;ab.updateStyle();var Y=ab._.contents[P.id]={},Z,aa=T.getChild();while(Z=aa.shift()){Y[Z.id]=Z;if(typeof Z.getChild=='function')aa.push.apply(aa,Z.getChild());}U.setAttribute('name',P.id);U.appendTo(ab.parts.contents);X.unselectable();ab.parts.tabs.append(X);if(P.accessKey){J(ab,ab,'CTRL+'+P.accessKey,M,L);ab._.accessKeyMap['CTRL+'+P.accessKey]=P.id;}},selectPage:function(P){if(this._.currentTabId==P)return;if(this.fire('selectPage',{page:P,currentPage:this._.currentTabId})===true)return;for(var Q in this._.tabs){var R=this._.tabs[Q][0],S=this._.tabs[Q][1];if(Q!=P){R.removeClass('cke_dialog_tab_selected');S.hide();}S.setAttribute('aria-hidden',Q!=P);}var T=this._.tabs[P];T[0].addClass('cke_dialog_tab_selected');if(b.ie6Compat||b.ie7Compat){q(T[1]);T[1].show();setTimeout(function(){q(T[1],1);},0);}else T[1].show();this._.currentTabId=P;this._.currentTabIndex=e.indexOf(this._.tabIdList,P);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(P){var R=this;var Q=R._.tabs[P]&&R._.tabs[P][0];if(!Q||R._.pageCount==1||!Q.isVisible())return;else if(P==R._.currentTabId)R.selectPage(o.call(R));Q.hide();R._.pageCount--;R.updateStyle();},showPage:function(P){var R=this;var Q=R._.tabs[P]&&R._.tabs[P][0];if(!Q)return;Q.show();R._.pageCount++;R.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(P,Q){var R=this._.contents[P]; +return R&&R[Q];},getValueOf:function(P,Q){return this.getContentElement(P,Q).getValue();},setValueOf:function(P,Q,R){return this.getContentElement(P,Q).setValue(R);},getButton:function(P){return this._.buttons[P];},click:function(P){return this._.buttons[P].click();},disableButton:function(P){return this._.buttons[P].disable();},enableButton:function(P){return this._.buttons[P].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(P,Q){var S=this;if(typeof Q=='undefined'){Q=S._.focusList.length;S._.focusList.push(new r(S,P,Q));}else{S._.focusList.splice(Q,0,new r(S,P,Q));for(var R=Q+1;Raa.width-Z.width-U)af=aa.width-Z.width+(T.lang.dir=='rtl'?0:V[1]);else af=R.x;if(R.y+V[0]aa.height-Z.height-U)ag=aa.height-Z.height+V[2];else ag=R.y;P.move(af,ag,1);Y.data.preventDefault();};function X(Y){a.document.removeListener('mousemove',W);a.document.removeListener('mouseup',X);if(b.ie6Compat){var Z=C.getChild(0).getFrameDocument();Z.removeListener('mousemove',W);Z.removeListener('mouseup',X);}};P.parts.title.on('mousedown',function(Y){Q={x:Y.data.$.screenX,y:Y.data.$.screenY};a.document.on('mousemove',W);a.document.on('mouseup',X);R=P.getPosition();if(b.ie6Compat){var Z=C.getChild(0).getFrameDocument();Z.on('mousemove',W);Z.on('mouseup',X);}Y.data.preventDefault();},P);};function z(P){var Q=P.definition,R=Q.resizable;if(R==0)return;var S=P.getParentEditor(),T,U,V,W,X,Y,Z=e.addFunction(function(ac){X=P.getSize();var ad=P.parts.contents,ae=ad.$.getElementsByTagName('iframe').length;if(ae){Y=h.createFromHtml('

');ad.append(Y);}U=X.height-P.parts.contents.getSize('height',!(b.gecko||b.opera||c&&b.quirks));T=X.width-P.parts.contents.getSize('width',1);W={x:ac.screenX,y:ac.screenY};V=a.document.getWindow().getViewPaneSize();a.document.on('mousemove',aa);a.document.on('mouseup',ab);if(b.ie6Compat){var af=C.getChild(0).getFrameDocument();af.on('mousemove',aa); +af.on('mouseup',ab);}ac.preventDefault&&ac.preventDefault();});P.on('load',function(){var ac='';if(R==1)ac=' cke_resizer_horizontal';else if(R==2)ac=' cke_resizer_vertical';var ad=h.createFromHtml('
');P.parts.footer.append(ad,1);});S.on('destroy',function(){e.removeFunction(Z);});function aa(ac){var ad=S.lang.dir=='rtl',ae=(ac.data.$.screenX-W.x)*(ad?-1:1),af=ac.data.$.screenY-W.y,ag=X.width,ah=X.height,ai=ag+ae*(P._.moved?1:2),aj=ah+af*(P._.moved?1:2),ak=P._.element.getFirst(),al=ad&&ak.getComputedStyle('right'),am=P.getPosition();if(am.y+aj>V.height)aj=V.height-am.y;if((ad?al:am.x)+ai>V.width)ai=V.width-(ad?al:am.x);if(R==1||R==3)ag=Math.max(Q.minWidth||0,ai-T);if(R==2||R==3)ah=Math.max(Q.minHeight||0,aj-U);P.resize(ag,ah);if(!P._.moved)P.layout();ac.data.preventDefault();};function ab(){a.document.removeListener('mouseup',ab);a.document.removeListener('mousemove',aa);if(Y){Y.remove();Y=null;}if(b.ie6Compat){var ac=C.getChild(0).getFrameDocument();ac.removeListener('mouseup',ab);ac.removeListener('mousemove',aa);}};};var A,B={},C;function D(P){var Q=a.document.getWindow(),R=P.config,S=R.dialog_backgroundCoverColor||'white',T=R.dialog_backgroundCoverOpacity,U=R.baseFloatZIndex,V=e.genKey(S,T,U),W=B[V];if(!W){var X=['
'];if(b.ie6Compat){var Y=b.isCustomDomain(),Z="";X.push('');}X.push('
');W=h.createFromHtml(X.join(''));W.setOpacity(T!=undefined?T:0.5);W.appendTo(a.document.getBody());B[V]=W;}else W.show();C=W;var aa=function(){var ad=Q.getViewPaneSize();W.setStyles({width:ad.width+'px',height:ad.height+'px'});},ab=function(){var ad=Q.getScrollPosition(),ae=a.dialog._.currentTop;W.setStyles({left:ad.x+'px',top:ad.y+'px'});if(ae)do{var af=ae.getPosition();ae.move(af.x,af.y);}while(ae=ae._.parentDialog)}; +A=aa;Q.on('resize',aa);aa();if(!(b.mac&&b.webkit))W.focus();if(b.ie6Compat){var ac=function(){ab();arguments.callee.prevScrollHandler.apply(this,arguments);};Q.$.setTimeout(function(){ac.prevScrollHandler=window.onscroll||(function(){});window.onscroll=ac;},0);ab();}};function E(){if(!C)return;var P=a.document.getWindow();C.hide();P.removeListener('resize',A);if(b.ie6Compat)P.$.setTimeout(function(){var Q=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=Q||null;},0);A=null;};function F(){for(var P in B)B[P].remove();B={};};var G={},H=function(P){var Q=P.data.$.ctrlKey||P.data.$.metaKey,R=P.data.$.altKey,S=P.data.$.shiftKey,T=String.fromCharCode(P.data.$.keyCode),U=G[(Q?'CTRL+':'')+(R?'ALT+':'')+(S?'SHIFT+':'')+T];if(!U||!U.length)return;U=U[U.length-1];U.keydown&&U.keydown.call(U.uiElement,U.dialog,U.key);P.data.preventDefault();},I=function(P){var Q=P.data.$.ctrlKey||P.data.$.metaKey,R=P.data.$.altKey,S=P.data.$.shiftKey,T=String.fromCharCode(P.data.$.keyCode),U=G[(Q?'CTRL+':'')+(R?'ALT+':'')+(S?'SHIFT+':'')+T];if(!U||!U.length)return;U=U[U.length-1];if(U.keyup){U.keyup.call(U.uiElement,U.dialog,U.key);P.data.preventDefault();}},J=function(P,Q,R,S,T){var U=G[R]||(G[R]=[]);U.push({uiElement:P,dialog:Q,key:R,keyup:T||P.accessKeyUp,keydown:S||P.accessKeyDown});},K=function(P){for(var Q in G){var R=G[Q];for(var S=R.length-1;S>=0;S--){if(R[S].dialog==P||R[S].uiElement==P)R.splice(S,1);}if(R.length===0)delete G[Q];}},L=function(P,Q){if(P._.accessKeyMap[Q])P.selectPage(P._.accessKeyMap[Q]);},M=function(P,Q){},N={27:1,13:1},O=function(P){if(P.data.getKeystroke() in N)P.data.stopPropagation();};(function(){k.dialog={uiElement:function(P,Q,R,S,T,U,V){if(arguments.length<4)return;var W=(S.call?S(Q):S)||'div',X=['<',W,' '],Y=(T&&T.call?T(Q):T)||{},Z=(U&&U.call?U(Q):U)||{},aa=(V&&V.call?V.call(this,P,Q):V)||'',ab=this.domId=Z.id||e.getNextId()+'_uiElement',ac=this.id=Q.id,ad;Z.id=ab;var ae={};if(Q.type)ae['cke_dialog_ui_'+Q.type]=1;if(Q.className)ae[Q.className]=1;var af=Z['class']&&Z['class'].split?Z['class'].split(' '):[];for(ad=0;ad=0;ad--){if(ah[ad]==='')ah.splice(ad,1);}if(ah.length>0)Z.style=(Z.style?Z.style+'; ':'')+ah.join('; ');for(ad in Z)X.push(ad+'="'+e.htmlEncode(Z[ad])+'" ');X.push('>',aa,''); +R.push(X.join(''));(this._||(this._={})).dialog=P;if(typeof Q.isChanged=='boolean')this.isChanged=function(){return Q.isChanged;};if(typeof Q.isChanged=='function')this.isChanged=Q.isChanged;a.event.implementOn(this);this.registerEvents(Q);if(this.accessKeyUp&&this.accessKeyDown&&Q.accessKey)J(this,P,'CTRL+'+Q.accessKey);var ai=this;P.on('load',function(){if(ai.getInputElement())ai.getInputElement().on('focus',function(){P._.tabBarMode=false;P._.hasFocus=true;ai.fire('focus');},ai);});if(this.keyboardFocusable){this.tabIndex=Q.tabIndex||0;this.focusIndex=P._.focusList.push(this)-1;this.on('focus',function(){P._.currentFocusIndex=ai.focusIndex;});}e.extend(this,Q);},hbox:function(P,Q,R,S,T){if(arguments.length<4)return;this._||(this._={});var U=this._.children=Q,V=T&&T.widths||null,W=T&&T.height||null,X={},Y,Z=function(){var ab=[''];for(Y=0;Y0)ab.push('style="'+ad.join('; ')+'" ');ab.push('>',R[Y],'');}ab.push('');return ab.join('');},aa={role:'presentation'};T&&T.align&&(aa.align=T.align);k.dialog.uiElement.call(this,P,T||{type:'hbox'},S,'table',X,aa,Z);},vbox:function(P,Q,R,S,T){if(arguments.length<3)return;this._||(this._={});var U=this._.children=Q,V=T&&T.width||null,W=T&&T.heights||null,X=function(){var Y=['');for(var Z=0;Z');}Y.push('
0)Y.push('style="',aa.join('; '),'" ');Y.push(' class="cke_dialog_ui_vbox_child">',R[Z],'
');return Y.join('');};k.dialog.uiElement.call(this,P,T||{type:'vbox'},S,'div',null,{role:'presentation'},X);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId); +},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(P,Q){this.getInputElement().setValue(P);!Q&&this.fire('change',{value:P});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var S=this;var P=S.getInputElement(),Q=P,R;while((Q=Q.getParent())&&Q.$.className.search('cke_dialog_page_contents')==-1){}if(!Q)return S;R=Q.getAttribute('name');if(S._.dialog._.currentTabId!=R)S._.dialog.selectPage(R);return S;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(P){var Q=/^on([A-Z]\w+)/,R,S=function(U,V,W,X){V.on('load',function(){U.getInputElement().on(W,X,U);});};for(var T in P){if(!(R=T.match(Q)))continue;if(this.eventProcessors[T])this.eventProcessors[T].call(this,this._.dialog,P[T]);else S(this,this._.dialog,R[1].toLowerCase(),P[T]);}return this;},eventProcessors:{onLoad:function(P,Q){P.on('load',Q,this);},onShow:function(P,Q){P.on('show',Q,this);},onHide:function(P,Q){P.on('hide',Q,this);}},accessKeyDown:function(P,Q){this.focus();},accessKeyUp:function(P,Q){},disable:function(){var P=this.getInputElement();P.setAttribute('disabled','true');P.addClass('cke_disabled');},enable:function(){var P=this.getInputElement();P.removeAttribute('disabled');P.removeClass('cke_disabled');},isEnabled:function(){return!this.getInputElement().getAttribute('disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(P){var Q=this;if(arguments.length<1)return Q._.children.concat();if(!P.splice)P=[P];if(P.length<2)return Q._.children[P[0]];else return Q._.children[P[0]]&&Q._.children[P[0]].getChild?Q._.children[P[0]].getChild(P.slice(1,P.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var P={build:function(Q,R,S){var T=R.children,U,V=[],W=[];for(var X=0;X',T.name,'');return U.join('');}};a.style.getStyleText=function(T){var U=T._ST;if(U)return U;U=T.styles;var V=T.attributes&&T.attributes.style||'',W='';if(V.length)V=V.replace(o,';'); +for(var X in U){var Y=U[X],Z=(X+':'+Y).replace(o,';');if(Y=='inherit')W+=Z;else V+=Z;}if(V.length)V=P(V);V+=W;return T._ST=V;};function s(T){var U,V;while(T=T.getParent()){if(T.getName()=='body')break;if(T.getAttribute('data-nostyle'))U=T;else if(!V){var W=T.getAttribute('contentEditable');if(W=='false')U=T;else if(W=='true')V=1;}}return U;};function t(T){var ax=this;var U=T.document;if(T.collapsed){var V=J(ax,U);T.insertNode(V);T.moveToPosition(V,2);return;}var W=ax.element,X=ax._.definition,Y,Z=X.includeReadonly;if(Z==undefined)Z=U.getCustomData('cke_includeReadonly');var aa=f[W]||(Y=true,f.span);T.enlarge(1,1);T.trim();var ab=T.createBookmark(),ac=ab.startNode,ad=ab.endNode,ae=ac,af,ag=s(ac),ah=s(ad);if(ag)ae=ag.getNextSourceNode(true);if(ah)ad=ah;if(ae.getPosition(ad)==2)ae=0;while(ae){var ai=false;if(ae.equals(ad)){ae=null;ai=true;}else{var aj=ae.type,ak=aj==1?ae.getName():null,al=ak&&ae.getAttribute('contentEditable')=='false',am=ak&&ae.getAttribute('data-nostyle');if(ak&&ae.data('cke-bookmark')){ae=ae.getNextSourceNode(true);continue;}if(!ak||aa[ak]&&!am&&(!al||Z)&&(ae.getPosition(ad)|4|0|8)==4+0+8&&(!X.childRule||X.childRule(ae))){var an=ae.getParent();if(an&&((an.getDtd()||f.span)[W]||Y)&&(!X.parentRule||X.parentRule(an))){if(!af&&(!ak||!f.$removeEmpty[ak]||(ae.getPosition(ad)|4|0|8)==4+0+8)){af=new d.range(U);af.setStartBefore(ae);}if(aj==3||al||aj==1&&!ae.getChildCount()){var ao=ae,ap;while((ai=!ao.getNext(q))&&(ap=ao.getParent(),aa[ap.getName()])&&(ap.getPosition(ac)|2|0|8)==2+0+8&&(!X.childRule||X.childRule(ap)))ao=ap;af.setEndAfter(ao);}}else ai=true;}else ai=true;ae=ae.getNextSourceNode(am||al);}if(ai&&af&&!af.collapsed){var aq=J(ax,U),ar=aq.hasAttributes(),as=af.getCommonAncestor(),at={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},au,av,aw;while(aq&&as){if(as.getName()==W){for(au in X.attributes){if(at.blockedAttrs[au]||!(aw=as.getAttribute(av)))continue;if(aq.getAttribute(au)==aw)at.attrs[au]=1;else at.blockedAttrs[au]=1;}for(av in X.styles){if(at.blockedStyles[av]||!(aw=as.getStyle(av)))continue;if(aq.getStyle(av)==aw)at.styles[av]=1;else at.blockedStyles[av]=1;}}as=as.getParent();}for(au in at.attrs)aq.removeAttribute(au);for(av in at.styles)aq.removeStyle(av);if(ar&&!aq.hasAttributes())aq=null;if(aq){af.extractContents().appendTo(aq);G(ax,aq);af.insertNode(aq);aq.mergeSiblings();if(!c)aq.$.normalize();}else{aq=new h('span');af.extractContents().appendTo(aq);af.insertNode(aq);G(ax,aq);aq.remove(true);}af=null;}}T.moveToBookmark(ab); +T.shrink(2);};function u(T){T.enlarge(1,1);var U=T.createBookmark(),V=U.startNode;if(T.collapsed){var W=new d.elementPath(V.getParent()),X;for(var Y=0,Z;Y'+V+'';else T.setHtml(V);U.remove();};function B(T){var U=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,V=T.getName(),W=C(T.getOuterHtml(),U,function(Y,Z,aa){return Z+''+aa+'
';}),X=[];W.replace(/([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='
'+W+'
';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=e.extend({},V.attributes,N(T)[U.getName()]),X=V.styles,Y=e.isEmpty(W)&&e.isEmpty(X);for(var Z in W){if((Z=='class'||T._.definition.fullMatch)&&U.getAttribute(Z)!=O(Z,W[Z]))continue;Y=U.hasAttribute(Z);U.removeAttribute(Z);}for(var aa in X){if(T._.definition.fullMatch&&U.getStyle(aa)!=O(aa,X[aa],true))continue;Y=Y||!!U.getStyle(aa);U.removeStyle(aa);}if(Y)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab); +for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U){var V=U&&U.attributes;if(V)for(var W=0;W0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0);H+=4;F.setStyle('width',H+'px'); +v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0);F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');var J=u.element,K=J.getWindow(),L=K.getScrollPosition(),M=K.getViewPaneSize(),N={height:J.$.offsetHeight,width:J.$.offsetWidth};if(A?B<0:B+N.width>M.width+L.x)B+=N.width*(A?1:-1);if(C+N.height>M.height+L.y)C-=N.height;if(c){var O=new h(w.$.offsetParent),P=O;if(P.getName()=='html')P=P.getDocument().getBody();if(P.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=O.$.scrollWidth-O.$.clientWidth;}var Q=w.getFirst(),R;if(R=Q.getCustomData('activePanel'))R.onHide&&R.onHide.call(this,1);Q.setCustomData('activePanel',this);w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(){var p=this;if(p.visible&&(!p.onHide||p.onHide.call(p)!==true)){p.hideChild();p.element.setStyle('display','none');p.visible=0;p.element.getFirst().removeCustomData('activePanel');}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q'],B=r.length,C=B&&r[0].group;for(var D=0;D');C=E.group;}E.render(this,D,A);}A.push('');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(){var n=this;n._.onHide&&n._.onHide();n._.panel&&n._.panel.hide();}}});function m(n){n.sort(function(o,p){if(o.groupp.group)return 1;return o.orderp.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push(''+''+'');if(u)p.push('','&#',w.editor.lang.dir=='rtl'?'9668':'9658',';','');p.push(t,''); +}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m=function(o,p){return o._.modes&&o._.modes[p||o.mode];},n;j.add('editingblock',{init:function(o){if(!o.config.editingBlock)return;o.on('themeSpace',function(p){if(p.data.space=='contents')p.data.html+='
';});o.on('themeLoaded',function(){o.fireOnce('editingBlockReady');});o.on('uiReady',function(){o.setMode(o.config.startupMode);});o.on('afterSetData',function(){if(!n){function p(){n=true;m(o).loadData(o.getData());n=false;};if(o.mode)p();else o.on('mode',function(){p();o.removeListener('mode',arguments.callee);});}});o.on('beforeGetData',function(){if(!n&&o.mode){n=true;o.setData(m(o).getData(),null,1);n=false;}});o.on('getSnapshot',function(p){if(o.mode)p.data=m(o).getSnapshotData();});o.on('loadSnapshot',function(p){if(o.mode)m(o).loadSnapshotData(p.data);});o.on('mode',function(p){p.removeListener();b.webkit&&o.container.on('focus',function(){o.focus();});if(o.config.startupFocus)o.focus();setTimeout(function(){o.fireOnce('instanceReady');a.fire('instanceReady',null,o);},0);});o.on('destroy',function(){var p=this;if(p.mode)p._.modes[p.mode].unload(p.getThemeSpace('contents'));});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(o,p){p.name=o;(this._.modes||(this._.modes={}))[o]=p;};a.editor.prototype.setMode=function(o){this.fire('beforeSetMode',{newMode:o});var p,q=this.getThemeSpace('contents'),r=this.checkDirty();if(this.mode){if(o==this.mode)return;this.fire('beforeModeUnload');var s=m(this);p=s.getData();s.unload(q);this.mode='';}q.setHtml('');var t=m(this,o);if(!t)throw '[CKEDITOR.editor.setMode] Unknown mode "'+o+'".';if(!r)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});t.load(q,typeof p!='string'?this.getData():p);};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var o=m(this);if(o)o.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var B=this;try{var y=B.getSelection();if(!y||!y.document.getWindow().$)return;var z=y.getStartElement(),A=new d.elementPath(z);if(!A.compare(B._.selectionPreviousPath)){B._.selectionPreviousPath=A;B.fire('selectionChange',{selection:y,path:A,element:z});}}catch(C){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this); +o=false;}};function r(y){function z(C){return C&&C.type==1&&C.getName() in f.$removeEmpty;};var A=y.startContainer,B=y.startOffset;if(A.type==3)return false;return!e.trim(A.getHtml())?z(A):z(A.getChild(B-1))||z(A.getChild(B));};var s={modes:{wysiwyg:1,source:1},exec:function(y){switch(y.mode){case 'wysiwyg':y.document.$.execCommand('SelectAll',false,null);y.forceNextSelectionCheck();y.selectionChange();break;case 'source':var z=y.textarea.$;if(c)z.createTextRange().execCommand('SelectAll');else{z.selectionStart=0;z.selectionEnd=z.value.length;}z.focus();}},canUndo:false};function t(y){w(y);var z=y.createText('​');y.setCustomData('cke-fillingChar',z);return z;};function u(y){return y&&y.getCustomData('cke-fillingChar');};function v(y){var z=y&&u(y);if(z)if(z.getCustomData('ready'))w(y);else z.setCustomData('ready',1);};function w(y){var z=y&&y.removeCustomData('cke-fillingChar');if(z){z.setText(z.getText().replace(/\u200B/g,''));z=0;}};j.add('selection',{init:function(y){if(b.webkit){y.on('selectionChange',function(){v(y.document);});y.on('beforeSetMode',function(){w(y.document);});y.on('key',function(D){switch(D.data.keyCode){case 13:case 2000+13:case 37:case 39:case 8:w(y.document);}},null,null,10);var z,A;function B(){var D=y.document,E=u(D);if(E){var F=D.$.defaultView.getSelection();if(F.type=='Caret'&&F.anchorNode==E.$)A=1;z=E.getText();E.setText(z.replace(/\u200B/g,''));}};function C(){var D=y.document,E=u(D);if(E){E.setText(z);if(A){D.$.defaultView.getSelection().setPosition(E.$,E.getLength());A=0;}}};y.on('beforeUndoImage',B);y.on('afterUndoImage',C);y.on('beforeGetData',B,null,null,0);y.on('getData',C);}y.on('contentDom',function(){var D=y.document,E=D.getBody(),F=D.getDocumentElement();if(c){var G,H,I=1;E.on('focusin',function(M){if(M.data.$.srcElement.nodeName!='BODY')return;if(G){if(I){try{G.select();}catch(O){}var N=D.getCustomData('cke_locked_selection');if(N){N.unlock();N.lock();}}G=null;}});E.on('focus',function(){H=1;L();});E.on('beforedeactivate',function(M){if(M.data.$.toElement)return;H=0;I=1;});if(c&&b.version<8)y.on('blur',function(M){try{y.document&&y.document.$.selection.empty();}catch(N){}});F.on('mousedown',function(){I=0;});F.on('mouseup',function(){I=1;});if(c&&(b.ie7Compat||b.version<8||b.quirks))F.on('click',function(M){if(M.data.getTarget().getName()=='html')y.getSelection().getRanges()[0].select();});var J;E.on('mousedown',function(M){if(M.data.$.button==2){var N=y.document.$.selection;if(N.type=='None')J=y.window.getScrollPosition(); +}K();});E.on('mouseup',function(M){if(M.data.$.button==2&&J){y.document.$.documentElement.scrollLeft=J.x;y.document.$.documentElement.scrollTop=J.y;}J=null;H=1;setTimeout(function(){L(true);},0);});E.on('keydown',K);E.on('keyup',function(){H=1;L();});D.on('selectionchange',L);function K(){H=0;};function L(M){if(H){var N=y.document,O=y.getSelection(),P=O&&O.getNative();if(M&&P&&P.type=='None')if(!N.$.queryCommandEnabled('InsertImage')){e.setTimeout(L,50,this,true);return;}var Q;if(P&&P.type&&P.type!='Control'&&(Q=P.createRange())&&(Q=Q.parentElement())&&(Q=Q.nodeName)&&Q.toLowerCase() in {input:1,textarea:1})return;G=P&&O.getRanges()[0];p.call(y);}};}else{D.on('mouseup',p,y);D.on('keyup',p,y);}});y.on('contentDomUnload',y.forceNextSelectionCheck,y);y.addCommand('selectAll',s);y.ui.addButton('SelectAll',{label:y.lang.selectAll,command:'selectAll'});y.selectionChange=p;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var y=new d.selection(this);return!y||y.isInvalid?null:y;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(y){var B=this;var z=y.getCustomData('cke_locked_selection');if(z)return z;B.document=y;B.isLocked=0;B._={cache:{}};if(c){var A=B.getNative().createRange();if(!A||A.item&&A.item(0).ownerDocument!=B.document.$||A.parentElement&&A.parentElement().ownerDocument!=B.document.$)B.isInvalid=true;}return B;};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,th:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var y=this._.cache;if(y.type)return y.type;var z=1;try{var A=this.getNative(),B=A.type;if(B=='Text')z=2;if(B=='Control')z=3;if(A.createRange().parentElement)z=2;}catch(C){}return y.type=z;}:function(){var y=this._.cache;if(y.type)return y.type;var z=2,A=this.getNative();if(!A)z=1;else if(A.rangeCount==1){var B=A.getRangeAt(0),C=B.startContainer;if(C==B.endContainer&&C.nodeType==1&&B.endOffset-B.startOffset==1&&x[C.childNodes[B.startOffset].nodeName.toLowerCase()])z=3;}return y.type=z;},getRanges:(function(){var y=c?(function(){function z(B){return new d.node(B).getIndex(); +};var A=function(B,C){B=B.duplicate();B.collapse(C);var D=B.parentElement(),E=D.ownerDocument;if(!D.hasChildNodes())return{container:D,offset:0};var F=D.children,G,H,I=B.duplicate(),J=0,K=F.length-1,L=-1,M,N;while(J<=K){L=Math.floor((J+K)/2);G=F[L];I.moveToElementText(G);M=I.compareEndPoints('StartToStart',B);if(M>0)K=L-1;else if(M<0)J=L+1;else if(b.ie9Compat&&G.tagName=='BR'){var O='cke_range_marker';B.execCommand('CreateBookmark',false,O);G=E.getElementsByName(O)[0];var P=z(G);D.removeChild(G);return{container:D,offset:P};}else return{container:D,offset:z(G)};}if(L==-1||L==F.length-1&&M<0){I.moveToElementText(D);I.setEndPoint('StartToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;F=D.childNodes;if(!N){G=F[F.length-1];if(G.nodeType==1)return{container:D,offset:F.length};else return{container:G,offset:G.nodeValue.length};}var Q=F.length;while(N>0)N-=F[--Q].nodeValue.length;return{container:F[Q],offset:-N};}else{I.collapse(M>0?true:false);I.setEndPoint(M>0?'StartToStart':'EndToStart',B);N=I.text.replace(/(\r\n|\r)/g,'\n').length;if(!N)return{container:D,offset:z(G)+(M>0?0:1)};while(N>0)try{H=G[M>0?'previousSibling':'nextSibling'];N-=H.nodeValue.length;G=H;}catch(R){return{container:D,offset:z(G)};}return{container:G,offset:M>0?-N:G.nodeValue.length+N};}};return function(){var L=this;var B=L.getNative(),C=B&&B.createRange(),D=L.getType(),E;if(!B)return[];if(D==2){E=new d.range(L.document);var F=A(C,true);E.setStart(new d.node(F.container),F.offset);F=A(C);E.setEnd(new d.node(F.container),F.offset);if(E.endContainer.getPosition(E.startContainer)&4&&E.endOffset<=E.startContainer.getIndex())E.collapse();return[E];}else if(D==3){var G=[];for(var H=0;H=F.getLength())J.setStartAfter(F);else J.setStartBefore(F);if(G&&G.type==3)if(!I)J.setEndBefore(G);else J.setEndAfter(G);var L=new d.walker(J);L.evaluator=function(M){if(M.type==1&&M.isReadOnly()){var N=D.clone();D.setEndBefore(M);if(D.collapsed)B.splice(C--,1);if(!(M.getPosition(J.endContainer)&16)){N.setStartAfter(M);if(!N.collapsed)B.splice(C+1,0,N);}return true;}return false;};L.next();}}return A.ranges;};})(),getStartElement:function(){var F=this;var y=F._.cache;if(y.startElement!==undefined)return y.startElement;var z,A=F.getNative();switch(F.getType()){case 3:return F.getSelectedElement();case 2:var B=F.getRanges()[0];if(B){if(!B.collapsed){B.optimize();while(1){var C=B.startContainer,D=B.startOffset;if(D==(C.getChildCount?C.getChildCount():C.getLength())&&!C.isBlockBoundary())B.setStartAfter(C);else break;}z=B.startContainer;if(z.type!=1)return z.getParent();z=z.getChild(B.startOffset);if(!z||z.type!=1)z=B.startContainer;else{var E=z.getFirst();while(E&&E.type==1){z=E;E=E.getFirst();}}}else{z=B.startContainer;if(z.type!=1)z=z.getParent();}z=z.$;}}return y.startElement=z?new h(z):null;},getSelectedElement:function(){var y=this._.cache;if(y.selectedElement!==undefined)return y.selectedElement;var z=this,A=e.tryThese(function(){return z.getNative().createRange().item(0);},function(){var B=z.getRanges()[0],C,D;for(var E=2;E&&!((C=B.getEnclosedNode())&&C.type==1&&x[C.getName()]&&(D=C));E--)B.shrink(1);return D.$;});return y.selectedElement=A?new h(A):null;},lock:function(){var y=this;y.getRanges();y.getStartElement();y.getSelectedElement();y._.cache.nativeSel={};y.isLocked=1;y.document.setCustomData('cke_locked_selection',y);},unlock:function(y){var D=this;var z=D.document,A=z.getCustomData('cke_locked_selection');if(A){z.setCustomData('cke_locked_selection',null);if(y){var B=A.getSelectedElement(),C=!B&&A.getRanges();D.isLocked=0;D.reset();z.getBody().focus();if(B)D.selectElement(B);else D.selectRanges(C);}}if(!A||!y){D.isLocked=0;D.reset();}},reset:function(){this._.cache={};},selectElement:function(y){var A=this;if(A.isLocked){var z=new d.range(A.document);z.setStartBefore(y);z.setEndAfter(y);A._.cache.selectedElement=y;A._.cache.startElement=y;A._.cache.ranges=new d.rangeList(z);A._.cache.type=3;return;}z=new d.range(y.getDocument());z.setStartBefore(y);z.setEndAfter(y);z.select();A.document.fire('selectionchange'); +A.reset();},selectRanges:function(y){var M=this;if(M.isLocked){M._.cache.selectedElement=null;M._.cache.startElement=y[0]&&y[0].getTouchedStartNode();M._.cache.ranges=new d.rangeList(y);M._.cache.type=2;return;}if(c){if(y.length>1){var z=y[y.length-1];y[0].setEnd(z.endContainer,z.endOffset);y.length=1;}if(y[0])y[0].select();M.reset();}else{var A=M.getNative();if(!A)return;if(y.length){A.removeAllRanges();b.webkit&&w(M.document);}for(var B=0;B=0){H.collapse(1);I.setEnd(H.endContainer.$,H.endOffset);}else throw N;}A.addRange(I);}M.reset();}},createBookmarks:function(y){return this.getRanges().createBookmarks(y);},createBookmarks2:function(y){return this.getRanges().createBookmarks2(y);},selectBookmarks:function(y){var z=[];for(var A=0;A','','',this.label,'','=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',s,', event, this );" onclick="CKEDITOR.tools.callFunction(',q,', this); return false;">'+this.label+''+''+''+(b.hc?'▼':b.air?' ':'')+''+''+''+'');if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel'); +s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();s.document.getById('cke_'+s.id).getFirst().getNext().focus();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide();};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m);},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,3,n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&')); +n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler(5,k.menuButton.handler);}});a.UI_MENUBUTTON=5;(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w',v.label,'','');else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'