From f8fc585c18d287eb325c575596d183122486b641 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 4 Nov 2010 01:29:21 -0400 Subject: [PATCH] vanilla ckeditor-3.3 --- CHANGES.html | 12 ++ _source/core/ckeditor_base.js | 8 +- _source/core/config.js | 12 +- _source/core/dom/elementpath.js | 12 ++ _source/core/editor.js | 3 + _source/core/loader.js | 2 +- _source/lang/_translationstatus.txt | 114 +++++------ _source/lang/af.js | 3 +- _source/lang/ar.js | 1 + _source/lang/bg.js | 3 +- _source/lang/bn.js | 3 +- _source/lang/bs.js | 3 +- _source/lang/ca.js | 1 + _source/lang/cs.js | 1 + _source/lang/cy.js | 1 + _source/lang/da.js | 3 +- _source/lang/de.js | 3 +- _source/lang/el.js | 3 +- _source/lang/en-au.js | 3 +- _source/lang/en-ca.js | 3 +- _source/lang/en-gb.js | 3 +- _source/lang/en.js | 3 +- _source/lang/eo.js | 3 +- _source/lang/es.js | 1 + _source/lang/et.js | 3 +- _source/lang/eu.js | 3 +- _source/lang/fa.js | 3 +- _source/lang/fi.js | 1 + _source/lang/fo.js | 3 +- _source/lang/fr-ca.js | 3 +- _source/lang/fr.js | 3 +- _source/lang/gl.js | 3 +- _source/lang/gu.js | 3 +- _source/lang/he.js | 1 + _source/lang/hi.js | 3 +- _source/lang/hr.js | 3 +- _source/lang/hu.js | 1 + _source/lang/is.js | 3 +- _source/lang/it.js | 3 +- _source/lang/ja.js | 1 + _source/lang/km.js | 3 +- _source/lang/ko.js | 3 +- _source/lang/lt.js | 3 +- _source/lang/lv.js | 3 +- _source/lang/mn.js | 3 +- _source/lang/ms.js | 3 +- _source/lang/nb.js | 1 + _source/lang/nl.js | 1 + _source/lang/no.js | 1 + _source/lang/pl.js | 1 + _source/lang/pt-br.js | 3 +- _source/lang/pt.js | 3 +- _source/lang/ro.js | 3 +- _source/lang/ru.js | 1 + _source/lang/sk.js | 3 +- _source/lang/sl.js | 1 + _source/lang/sr-latn.js | 3 +- _source/lang/sr.js | 3 +- _source/lang/sv.js | 3 +- _source/lang/th.js | 3 +- _source/lang/tr.js | 1 + _source/lang/uk.js | 3 +- _source/lang/vi.js | 1 + _source/lang/zh-cn.js | 3 +- _source/lang/zh.js | 3 +- _source/plugins/colordialog/dialogs/colordialog.js | 207 +++++++++++++++++--- _source/plugins/editingblock/plugin.js | 6 + _source/plugins/flash/plugin.js | 8 + _source/plugins/forms/dialogs/hiddenfield.js | 37 ++-- _source/plugins/forms/images/hiddenfield.gif | Bin 0 -> 105 bytes _source/plugins/forms/plugin.js | 72 ++++++- _source/plugins/htmldataprocessor/plugin.js | 16 ++ _source/plugins/image/plugin.js | 8 + _source/plugins/indent/plugin.js | 123 +++++++----- _source/plugins/link/plugin.js | 10 + _source/plugins/maximize/plugin.js | 15 ++ _source/plugins/sourcearea/plugin.js | 2 +- _source/plugins/tab/plugin.js | 2 +- _source/plugins/table/plugin.js | 8 + _source/plugins/wysiwygarea/plugin.js | 135 +++++++++---- _source/themes/default/theme.js | 1 + ckeditor.asp | 6 +- ckeditor.js | 187 +++++++++--------- ckeditor_basic.js | 2 +- ckeditor_basic_source.js | 2 +- ckeditor_php4.php | 6 +- ckeditor_php5.php | 6 +- ckeditor_source.js | 2 +- lang/_translationstatus.txt | 114 +++++------ lang/af.js | 2 +- lang/ar.js | 2 +- lang/bg.js | 2 +- lang/bn.js | 2 +- lang/bs.js | 2 +- lang/ca.js | 2 +- lang/cs.js | 2 +- lang/cy.js | 2 +- lang/da.js | 2 +- lang/de.js | 2 +- lang/el.js | 2 +- lang/en-au.js | 2 +- lang/en-ca.js | 2 +- lang/en-gb.js | 2 +- lang/en.js | 2 +- lang/eo.js | 2 +- lang/es.js | 2 +- lang/et.js | 2 +- lang/eu.js | 2 +- lang/fa.js | 2 +- lang/fi.js | 2 +- lang/fo.js | 2 +- lang/fr-ca.js | 2 +- lang/fr.js | 2 +- lang/gl.js | 2 +- lang/gu.js | 2 +- lang/he.js | 2 +- lang/hi.js | 2 +- lang/hr.js | 2 +- lang/hu.js | 2 +- lang/is.js | 2 +- lang/it.js | 2 +- lang/ja.js | 2 +- lang/km.js | 2 +- lang/ko.js | 2 +- lang/lt.js | 2 +- lang/lv.js | 2 +- lang/mn.js | 2 +- lang/ms.js | 2 +- lang/nb.js | 2 +- lang/nl.js | 2 +- lang/no.js | 2 +- lang/pl.js | 2 +- lang/pt-br.js | 2 +- lang/pt.js | 2 +- lang/ro.js | 2 +- lang/ru.js | 2 +- lang/sk.js | 2 +- lang/sl.js | 2 +- lang/sr-latn.js | 2 +- lang/sr.js | 2 +- lang/sv.js | 2 +- lang/th.js | 2 +- lang/tr.js | 2 +- lang/uk.js | 2 +- lang/vi.js | 2 +- lang/zh-cn.js | 2 +- lang/zh.js | 2 +- plugins/colordialog/dialogs/colordialog.js | 3 +- plugins/forms/dialogs/hiddenfield.js | 2 +- plugins/forms/images/hiddenfield.gif | Bin 0 -> 105 bytes themes/default/theme.js | 2 +- 151 files changed, 938 insertions(+), 463 deletions(-) create mode 100644 _source/plugins/forms/images/hiddenfield.gif create mode 100644 plugins/forms/images/hiddenfield.gif diff --git a/CHANGES.html b/CHANGES.html index f65775a..da02f1a 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -35,6 +35,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEditor Changelog

+ CKEditor 3.3

+

+ New features:

+ +

CKEditor 3.2.2

New features:

diff --git a/_source/core/ckeditor_base.js b/_source/core/ckeditor_base.js index 0d72212..8a8e62f 100644 --- a/_source/core/ckeditor_base.js +++ b/_source/core/ckeditor_base.js @@ -12,7 +12,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Must be updated on changes in the script, as well as updated in the // ckeditor_source.js and ckeditor_basic_source.js files. -// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.2.2',rev:'5541',_:{},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;})(); +// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.3',rev:'5542',_:{},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;})(); // #### Raw code // ATTENTION: read the above "Compressed Code" notes when changing this code. @@ -43,7 +43,7 @@ if ( !window.CKEDITOR ) // The production implementation contains a fixed timestamp, unique // for each release, generated by the releaser. // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) - timestamp : 'A4SD49X', + timestamp : 'A4SD49Y', /** * Contains the CKEditor version number. @@ -51,7 +51,7 @@ if ( !window.CKEDITOR ) * @example * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.0 Beta' */ - version : '3.2.2', + version : '3.3', /** * Contains the CKEditor revision number. @@ -60,7 +60,7 @@ if ( !window.CKEDITOR ) * @example * alert( CKEDITOR.revision ); // e.g. '3975' */ - revision : '5541', + revision : '5542', /** * Private object used to hold core stuff. It should not be used out of diff --git a/_source/core/config.js b/_source/core/config.js index e836125..f3938d8 100644 --- a/_source/core/config.js +++ b/_source/core/config.js @@ -76,14 +76,18 @@ CKEDITOR.config = /** * The writting direction of the language used to write the editor - * contents. Allowed values are 'ltr' for Left-To-Right language (like - * English), or 'rtl' for Right-To-Left languages (like Arabic). - * @default 'ltr' + * contents. Allowed values are: + *
    + *
  • 'ui' - which indicate content direction will be the same with the user interface language direction;
  • + *
  • 'ltr' - for Left-To-Right language (like English);
  • + *
  • 'rtl' - for Right-To-Left languages (like Arabic).
  • + *
+ * @default 'ui' * @type String * @example * config.contentsLangDirection = 'rtl'; */ - contentsLangDirection : 'ltr', + contentsLangDirection : 'ui', /** * Language code of the writting language which is used to author the editor diff --git a/_source/core/dom/elementpath.js b/_source/core/dom/elementpath.js index 974685f..3c74a92 100644 --- a/_source/core/dom/elementpath.js +++ b/_source/core/dom/elementpath.js @@ -100,5 +100,17 @@ CKEDITOR.dom.elementPath.prototype = } return true; + }, + + contains : function( tagNames ) + { + var elements = this.elements; + for ( var i = 0 ; i < elements.length ; i++ ) + { + if ( elements[ i ].getName() in tagNames ) + return elements[ i ]; + } + + return null; } }; diff --git a/_source/core/editor.js b/_source/core/editor.js index f0f3682..0b373f7 100644 --- a/_source/core/editor.js +++ b/_source/core/editor.js @@ -146,6 +146,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' ) editor.lang.dir = 'ltr'; + var config = editor.config; + config.contentsLangDirection == 'ui' && ( config.contentsLangDirection = editor.lang.dir ); + loadPlugins( editor ); }); }; diff --git a/_source/core/loader.js b/_source/core/loader.js index d9ae4a6..87a4d38 100644 --- a/_source/core/loader.js +++ b/_source/core/loader.js @@ -107,7 +107,7 @@ if ( !CKEDITOR.loader ) return path; })(); - var timestamp = 'A4SD49X'; + var timestamp = 'A4SD49Y'; var getUrl = function( resource ) { diff --git a/_source/lang/_translationstatus.txt b/_source/lang/_translationstatus.txt index 7663abc..3c93d13 100644 --- a/_source/lang/_translationstatus.txt +++ b/_source/lang/_translationstatus.txt @@ -1,60 +1,60 @@ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license -af.js Found: 287 Missing: 236 -ar.js Found: 451 Missing: 72 -bg.js Found: 280 Missing: 243 -bn.js Found: 281 Missing: 242 -bs.js Found: 187 Missing: 336 -ca.js Found: 490 Missing: 33 -cs.js Found: 411 Missing: 112 -cy.js Found: 452 Missing: 71 -da.js Found: 404 Missing: 119 -de.js Found: 444 Missing: 79 -el.js Found: 286 Missing: 237 -en-au.js Found: 369 Missing: 154 -en-ca.js Found: 369 Missing: 154 -en-gb.js Found: 370 Missing: 153 -eo.js Found: 259 Missing: 264 -es.js Found: 467 Missing: 56 -et.js Found: 301 Missing: 222 -eu.js Found: 403 Missing: 120 -fa.js Found: 302 Missing: 221 -fi.js Found: 518 Missing: 5 -fo.js Found: 420 Missing: 103 -fr-ca.js Found: 301 Missing: 222 -fr.js Found: 403 Missing: 120 -gl.js Found: 283 Missing: 240 -gu.js Found: 300 Missing: 223 -he.js Found: 523 Missing: 0 -hi.js Found: 302 Missing: 221 -hr.js Found: 404 Missing: 119 -hu.js Found: 445 Missing: 78 -is.js Found: 307 Missing: 216 -it.js Found: 404 Missing: 119 -ja.js Found: 413 Missing: 110 -km.js Found: 275 Missing: 248 -ko.js Found: 293 Missing: 230 -lt.js Found: 306 Missing: 217 -lv.js Found: 283 Missing: 240 -mn.js Found: 300 Missing: 223 -ms.js Found: 265 Missing: 258 -nb.js Found: 470 Missing: 53 -nl.js Found: 494 Missing: 29 -no.js Found: 470 Missing: 53 -pl.js Found: 411 Missing: 112 -pt-br.js Found: 402 Missing: 121 -pt.js Found: 282 Missing: 241 -ro.js Found: 301 Missing: 222 -ru.js Found: 467 Missing: 56 -sk.js Found: 302 Missing: 221 -sl.js Found: 410 Missing: 113 -sr-latn.js Found: 276 Missing: 247 -sr.js Found: 275 Missing: 248 -sv.js Found: 299 Missing: 224 -th.js Found: 287 Missing: 236 -tr.js Found: 494 Missing: 29 -uk.js Found: 404 Missing: 119 -vi.js Found: 481 Missing: 42 -zh-cn.js Found: 404 Missing: 119 -zh.js Found: 404 Missing: 119 +af.js Found: 287 Missing: 237 +ar.js Found: 451 Missing: 73 +bg.js Found: 280 Missing: 244 +bn.js Found: 281 Missing: 243 +bs.js Found: 187 Missing: 337 +ca.js Found: 490 Missing: 34 +cs.js Found: 411 Missing: 113 +cy.js Found: 452 Missing: 72 +da.js Found: 404 Missing: 120 +de.js Found: 444 Missing: 80 +el.js Found: 286 Missing: 238 +en-au.js Found: 369 Missing: 155 +en-ca.js Found: 369 Missing: 155 +en-gb.js Found: 370 Missing: 154 +eo.js Found: 259 Missing: 265 +es.js Found: 467 Missing: 57 +et.js Found: 301 Missing: 223 +eu.js Found: 403 Missing: 121 +fa.js Found: 302 Missing: 222 +fi.js Found: 518 Missing: 6 +fo.js Found: 420 Missing: 104 +fr-ca.js Found: 301 Missing: 223 +fr.js Found: 403 Missing: 121 +gl.js Found: 283 Missing: 241 +gu.js Found: 300 Missing: 224 +he.js Found: 523 Missing: 1 +hi.js Found: 302 Missing: 222 +hr.js Found: 404 Missing: 120 +hu.js Found: 445 Missing: 79 +is.js Found: 307 Missing: 217 +it.js Found: 404 Missing: 120 +ja.js Found: 413 Missing: 111 +km.js Found: 275 Missing: 249 +ko.js Found: 293 Missing: 231 +lt.js Found: 306 Missing: 218 +lv.js Found: 283 Missing: 241 +mn.js Found: 300 Missing: 224 +ms.js Found: 265 Missing: 259 +nb.js Found: 470 Missing: 54 +nl.js Found: 494 Missing: 30 +no.js Found: 470 Missing: 54 +pl.js Found: 411 Missing: 113 +pt-br.js Found: 402 Missing: 122 +pt.js Found: 282 Missing: 242 +ro.js Found: 301 Missing: 223 +ru.js Found: 467 Missing: 57 +sk.js Found: 302 Missing: 222 +sl.js Found: 410 Missing: 114 +sr-latn.js Found: 276 Missing: 248 +sr.js Found: 275 Missing: 249 +sv.js Found: 299 Missing: 225 +th.js Found: 287 Missing: 237 +tr.js Found: 494 Missing: 30 +uk.js Found: 404 Missing: 120 +vi.js Found: 481 Missing: 43 +zh-cn.js Found: 404 Missing: 120 +zh.js Found: 404 Missing: 120 diff --git a/_source/lang/af.js b/_source/lang/af.js index 72e841a..4009d29 100644 --- a/_source/lang/af.js +++ b/_source/lang/af.js @@ -736,8 +736,9 @@ CKEDITOR.lang['af'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ar.js b/_source/lang/ar.js index c504f66..8260fbf 100644 --- a/_source/lang/ar.js +++ b/_source/lang/ar.js @@ -736,6 +736,7 @@ CKEDITOR.lang['ar'] = colordialog : { title : 'اختر لون', + options : 'Color Options', // MISSING highlight : 'إلقاء الضوء', selected : 'مُختار', clear : 'مسح' diff --git a/_source/lang/bg.js b/_source/lang/bg.js index 4719abf..9a37d4f 100644 --- a/_source/lang/bg.js +++ b/_source/lang/bg.js @@ -736,8 +736,9 @@ CKEDITOR.lang['bg'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/bn.js b/_source/lang/bn.js index 801d22c..cafebfc 100644 --- a/_source/lang/bn.js +++ b/_source/lang/bn.js @@ -736,8 +736,9 @@ CKEDITOR.lang['bn'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/bs.js b/_source/lang/bs.js index 018ef96..da213a4 100644 --- a/_source/lang/bs.js +++ b/_source/lang/bs.js @@ -736,8 +736,9 @@ CKEDITOR.lang['bs'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ca.js b/_source/lang/ca.js index 26fb95d..ce7e59b 100644 --- a/_source/lang/ca.js +++ b/_source/lang/ca.js @@ -736,6 +736,7 @@ CKEDITOR.lang['ca'] = colordialog : { title : 'Selecciona el color', + options : 'Color Options', // MISSING highlight : 'Destacat', selected : 'Seleccionat', clear : 'Neteja' diff --git a/_source/lang/cs.js b/_source/lang/cs.js index 0aacf62..e44d880 100644 --- a/_source/lang/cs.js +++ b/_source/lang/cs.js @@ -736,6 +736,7 @@ CKEDITOR.lang['cs'] = colordialog : { title : 'Výběr barvy', + options : 'Color Options', // MISSING highlight : 'Zvýraznit', selected : 'Vybráno', clear : 'Vyčistit' diff --git a/_source/lang/cy.js b/_source/lang/cy.js index 0dda45a..b45bc90 100644 --- a/_source/lang/cy.js +++ b/_source/lang/cy.js @@ -736,6 +736,7 @@ CKEDITOR.lang['cy'] = colordialog : { title : 'Dewis lliw', + options : 'Color Options', // MISSING highlight : 'Uwcholeuo', selected : 'Dewiswyd', clear : 'Clirio' diff --git a/_source/lang/da.js b/_source/lang/da.js index 555fce9..8acf04e 100644 --- a/_source/lang/da.js +++ b/_source/lang/da.js @@ -736,8 +736,9 @@ CKEDITOR.lang['da'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/de.js b/_source/lang/de.js index 7cc0b29..7a0ce50 100644 --- a/_source/lang/de.js +++ b/_source/lang/de.js @@ -736,8 +736,9 @@ CKEDITOR.lang['de'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/el.js b/_source/lang/el.js index 44fecdc..dc39720 100644 --- a/_source/lang/el.js +++ b/_source/lang/el.js @@ -736,8 +736,9 @@ CKEDITOR.lang['el'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/en-au.js b/_source/lang/en-au.js index 513eb18..68c378c 100644 --- a/_source/lang/en-au.js +++ b/_source/lang/en-au.js @@ -736,8 +736,9 @@ CKEDITOR.lang['en-au'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/en-ca.js b/_source/lang/en-ca.js index 704b919..0888923 100644 --- a/_source/lang/en-ca.js +++ b/_source/lang/en-ca.js @@ -736,8 +736,9 @@ CKEDITOR.lang['en-ca'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/en-gb.js b/_source/lang/en-gb.js index a527f05..206ed17 100644 --- a/_source/lang/en-gb.js +++ b/_source/lang/en-gb.js @@ -736,8 +736,9 @@ CKEDITOR.lang['en-gb'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/en.js b/_source/lang/en.js index 6dcec09..7798433 100644 --- a/_source/lang/en.js +++ b/_source/lang/en.js @@ -736,8 +736,9 @@ CKEDITOR.lang['en'] = colordialog : { title : 'Select color', + options : 'Color Options', highlight : 'Highlight', - selected : 'Selected', + selected : 'Selected Color', clear : 'Clear' }, diff --git a/_source/lang/eo.js b/_source/lang/eo.js index 4672260..6ff7579 100644 --- a/_source/lang/eo.js +++ b/_source/lang/eo.js @@ -736,8 +736,9 @@ CKEDITOR.lang['eo'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/es.js b/_source/lang/es.js index aff79d8..ea6e33c 100644 --- a/_source/lang/es.js +++ b/_source/lang/es.js @@ -736,6 +736,7 @@ CKEDITOR.lang['es'] = colordialog : { title : 'Elegir color', + options : 'Color Options', // MISSING highlight : 'Muestra', selected : 'Elegido', clear : 'Borrar' diff --git a/_source/lang/et.js b/_source/lang/et.js index 782b09f..8472ced 100644 --- a/_source/lang/et.js +++ b/_source/lang/et.js @@ -736,8 +736,9 @@ CKEDITOR.lang['et'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/eu.js b/_source/lang/eu.js index e8dc1aa..e96e1da 100644 --- a/_source/lang/eu.js +++ b/_source/lang/eu.js @@ -736,8 +736,9 @@ CKEDITOR.lang['eu'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/fa.js b/_source/lang/fa.js index a70c78c..7d11f3f 100644 --- a/_source/lang/fa.js +++ b/_source/lang/fa.js @@ -736,8 +736,9 @@ CKEDITOR.lang['fa'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/fi.js b/_source/lang/fi.js index 9ed758d..d28a7e7 100644 --- a/_source/lang/fi.js +++ b/_source/lang/fi.js @@ -736,6 +736,7 @@ CKEDITOR.lang['fi'] = colordialog : { title : 'Valitse väri', + options : 'Color Options', // MISSING highlight : 'Korostus', selected : 'Valittu', clear : 'Poista' diff --git a/_source/lang/fo.js b/_source/lang/fo.js index 2649a2b..e146e01 100644 --- a/_source/lang/fo.js +++ b/_source/lang/fo.js @@ -736,8 +736,9 @@ CKEDITOR.lang['fo'] = colordialog : { title : 'Vel lit', + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/fr-ca.js b/_source/lang/fr-ca.js index 4eb70c5..a4c8062 100644 --- a/_source/lang/fr-ca.js +++ b/_source/lang/fr-ca.js @@ -736,8 +736,9 @@ CKEDITOR.lang['fr-ca'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/fr.js b/_source/lang/fr.js index f6c4938..0e3cb41 100644 --- a/_source/lang/fr.js +++ b/_source/lang/fr.js @@ -736,8 +736,9 @@ CKEDITOR.lang['fr'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/gl.js b/_source/lang/gl.js index 28cabb3..8aac995 100644 --- a/_source/lang/gl.js +++ b/_source/lang/gl.js @@ -736,8 +736,9 @@ CKEDITOR.lang['gl'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/gu.js b/_source/lang/gu.js index f8ae721..0b63fb0 100644 --- a/_source/lang/gu.js +++ b/_source/lang/gu.js @@ -736,8 +736,9 @@ CKEDITOR.lang['gu'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/he.js b/_source/lang/he.js index a935853..3ab6976 100644 --- a/_source/lang/he.js +++ b/_source/lang/he.js @@ -736,6 +736,7 @@ CKEDITOR.lang['he'] = colordialog : { title : 'בחירת צבע', + options : 'Color Options', // MISSING highlight : 'סימון', selected : 'בחירה', clear : 'ניקוי' diff --git a/_source/lang/hi.js b/_source/lang/hi.js index a5fa50b..2698812 100644 --- a/_source/lang/hi.js +++ b/_source/lang/hi.js @@ -736,8 +736,9 @@ CKEDITOR.lang['hi'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/hr.js b/_source/lang/hr.js index d30ffaa..9ed789b 100644 --- a/_source/lang/hr.js +++ b/_source/lang/hr.js @@ -736,8 +736,9 @@ CKEDITOR.lang['hr'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/hu.js b/_source/lang/hu.js index e6c8288..172e85c 100644 --- a/_source/lang/hu.js +++ b/_source/lang/hu.js @@ -736,6 +736,7 @@ CKEDITOR.lang['hu'] = colordialog : { title : 'Válasszon színt', + options : 'Color Options', // MISSING highlight : 'Nagyítás', selected : 'Kiválasztott', clear : 'Ürítés' diff --git a/_source/lang/is.js b/_source/lang/is.js index 0e0ee3f..bc73b9c 100644 --- a/_source/lang/is.js +++ b/_source/lang/is.js @@ -736,8 +736,9 @@ CKEDITOR.lang['is'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/it.js b/_source/lang/it.js index 9252573..57a5101 100644 --- a/_source/lang/it.js +++ b/_source/lang/it.js @@ -736,8 +736,9 @@ CKEDITOR.lang['it'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ja.js b/_source/lang/ja.js index ecf7bfd..47ee9da 100644 --- a/_source/lang/ja.js +++ b/_source/lang/ja.js @@ -736,6 +736,7 @@ CKEDITOR.lang['ja'] = colordialog : { title : '色選択', + options : 'Color Options', // MISSING highlight : 'ハイライト', selected : '選択された色', clear : 'クリア' diff --git a/_source/lang/km.js b/_source/lang/km.js index bb7bdb5..c8dcd3b 100644 --- a/_source/lang/km.js +++ b/_source/lang/km.js @@ -736,8 +736,9 @@ CKEDITOR.lang['km'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ko.js b/_source/lang/ko.js index 325fd9f..a6323fc 100644 --- a/_source/lang/ko.js +++ b/_source/lang/ko.js @@ -736,8 +736,9 @@ CKEDITOR.lang['ko'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/lt.js b/_source/lang/lt.js index 1d7c0bc..5b98610 100644 --- a/_source/lang/lt.js +++ b/_source/lang/lt.js @@ -736,8 +736,9 @@ CKEDITOR.lang['lt'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/lv.js b/_source/lang/lv.js index cbc85e2..4c33859 100644 --- a/_source/lang/lv.js +++ b/_source/lang/lv.js @@ -736,8 +736,9 @@ CKEDITOR.lang['lv'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/mn.js b/_source/lang/mn.js index db763c2..f38c415 100644 --- a/_source/lang/mn.js +++ b/_source/lang/mn.js @@ -736,8 +736,9 @@ CKEDITOR.lang['mn'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ms.js b/_source/lang/ms.js index 4c5407c..0f16884 100644 --- a/_source/lang/ms.js +++ b/_source/lang/ms.js @@ -736,8 +736,9 @@ CKEDITOR.lang['ms'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/nb.js b/_source/lang/nb.js index 3070cb0..1122ec4 100644 --- a/_source/lang/nb.js +++ b/_source/lang/nb.js @@ -736,6 +736,7 @@ CKEDITOR.lang['nb'] = colordialog : { title : 'Velg farge', + options : 'Color Options', // MISSING highlight : 'Merk', selected : 'Valgt', clear : 'Tøm' diff --git a/_source/lang/nl.js b/_source/lang/nl.js index 790d7c2..b4193c2 100644 --- a/_source/lang/nl.js +++ b/_source/lang/nl.js @@ -736,6 +736,7 @@ CKEDITOR.lang['nl'] = colordialog : { title : 'Selecteer kleur', + options : 'Color Options', // MISSING highlight : 'Actief', selected : 'Geselecteerd', clear : 'Wissen' diff --git a/_source/lang/no.js b/_source/lang/no.js index 8338c25..5eb3733 100644 --- a/_source/lang/no.js +++ b/_source/lang/no.js @@ -736,6 +736,7 @@ CKEDITOR.lang['no'] = colordialog : { title : 'Velg farge', + options : 'Color Options', // MISSING highlight : 'Merk', selected : 'Valgt', clear : 'Tøm' diff --git a/_source/lang/pl.js b/_source/lang/pl.js index 2bd8684..0374fc3 100644 --- a/_source/lang/pl.js +++ b/_source/lang/pl.js @@ -736,6 +736,7 @@ CKEDITOR.lang['pl'] = colordialog : { title : 'Wybierz kolor', + options : 'Color Options', // MISSING highlight : 'Zaznacz', selected : 'Wybrany', clear : 'Wyczyść' diff --git a/_source/lang/pt-br.js b/_source/lang/pt-br.js index 91a0d3b..a8f3304 100644 --- a/_source/lang/pt-br.js +++ b/_source/lang/pt-br.js @@ -736,8 +736,9 @@ CKEDITOR.lang['pt-br'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/pt.js b/_source/lang/pt.js index e9aaf62..7a2c8cf 100644 --- a/_source/lang/pt.js +++ b/_source/lang/pt.js @@ -736,8 +736,9 @@ CKEDITOR.lang['pt'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ro.js b/_source/lang/ro.js index 8b31328..d30e499 100644 --- a/_source/lang/ro.js +++ b/_source/lang/ro.js @@ -736,8 +736,9 @@ CKEDITOR.lang['ro'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/ru.js b/_source/lang/ru.js index b81e253..be4a5dd 100644 --- a/_source/lang/ru.js +++ b/_source/lang/ru.js @@ -736,6 +736,7 @@ CKEDITOR.lang['ru'] = colordialog : { title : 'Выберите цвет', + options : 'Color Options', // MISSING highlight : 'Выделить', selected : 'Выбранное', clear : 'Очистить' diff --git a/_source/lang/sk.js b/_source/lang/sk.js index 713997c..7a862d9 100644 --- a/_source/lang/sk.js +++ b/_source/lang/sk.js @@ -736,8 +736,9 @@ CKEDITOR.lang['sk'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/sl.js b/_source/lang/sl.js index 29bcfd1..10d7cff 100644 --- a/_source/lang/sl.js +++ b/_source/lang/sl.js @@ -736,6 +736,7 @@ CKEDITOR.lang['sl'] = colordialog : { title : 'Izberi barvo', + options : 'Color Options', // MISSING highlight : 'Poudarjeno', selected : 'Izbrano', clear : 'Počisti' diff --git a/_source/lang/sr-latn.js b/_source/lang/sr-latn.js index b066ac9..ebbcd16 100644 --- a/_source/lang/sr-latn.js +++ b/_source/lang/sr-latn.js @@ -736,8 +736,9 @@ CKEDITOR.lang['sr-latn'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/sr.js b/_source/lang/sr.js index 2a930df..85219ce 100644 --- a/_source/lang/sr.js +++ b/_source/lang/sr.js @@ -736,8 +736,9 @@ CKEDITOR.lang['sr'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/sv.js b/_source/lang/sv.js index 18e20fb..7c4b177 100644 --- a/_source/lang/sv.js +++ b/_source/lang/sv.js @@ -736,8 +736,9 @@ CKEDITOR.lang['sv'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/th.js b/_source/lang/th.js index 2b4e9ab..7ad7054 100644 --- a/_source/lang/th.js +++ b/_source/lang/th.js @@ -736,8 +736,9 @@ CKEDITOR.lang['th'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/tr.js b/_source/lang/tr.js index 95f21cf..53d4530 100644 --- a/_source/lang/tr.js +++ b/_source/lang/tr.js @@ -736,6 +736,7 @@ CKEDITOR.lang['tr'] = colordialog : { title : 'Renk seç', + options : 'Color Options', // MISSING highlight : 'İşaretle', selected : 'Seçilmiş', clear : 'Temizle' diff --git a/_source/lang/uk.js b/_source/lang/uk.js index 2e048f9..cddb744 100644 --- a/_source/lang/uk.js +++ b/_source/lang/uk.js @@ -736,8 +736,9 @@ CKEDITOR.lang['uk'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/vi.js b/_source/lang/vi.js index 7f70742..9041587 100644 --- a/_source/lang/vi.js +++ b/_source/lang/vi.js @@ -736,6 +736,7 @@ CKEDITOR.lang['vi'] = colordialog : { title : 'Chọn màu', + options : 'Color Options', // MISSING highlight : 'Màu chọn', selected : 'Màu đã chọn', clear : 'Xóa bỏ' diff --git a/_source/lang/zh-cn.js b/_source/lang/zh-cn.js index 7900948..1515810 100644 --- a/_source/lang/zh-cn.js +++ b/_source/lang/zh-cn.js @@ -736,8 +736,9 @@ CKEDITOR.lang['zh-cn'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/lang/zh.js b/_source/lang/zh.js index ed0efd2..95f9301 100644 --- a/_source/lang/zh.js +++ b/_source/lang/zh.js @@ -736,8 +736,9 @@ CKEDITOR.lang['zh'] = colordialog : { title : 'Select color', // MISSING + options : 'Color Options', // MISSING highlight : 'Highlight', // MISSING - selected : 'Selected', // MISSING + selected : 'Selected Color', // MISSING clear : 'Clear' // MISSING }, diff --git a/_source/plugins/colordialog/dialogs/colordialog.js b/_source/plugins/colordialog/dialogs/colordialog.js index e8e5d31..891947e 100644 --- a/_source/plugins/colordialog/dialogs/colordialog.js +++ b/_source/plugins/colordialog/dialogs/colordialog.js @@ -22,21 +22,157 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) }; } - var table = new $el( 'table' ); - createColorTable(); + function clearSelected() + { + $doc.getById( selHiColorId ).removeStyle( 'background-color' ); + dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' ); + } - var cellMouseover = function( event ) + function updateSelected( evt ) { - var color = new $el( event.data.getTarget() ).getAttribute( 'title' ); - $doc.getById( hicolorId ).setStyle( 'background-color', color ); - $doc.getById( hicolorTextId ).setHtml( color ); - }; + if ( ! (evt instanceof CKEDITOR.dom.event ) ) + evt = new CKEDITOR.dom.event( evt ); + + var target = evt.getTarget(), + color; - var cellClick = function( event ) + if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) ) + dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color ); + } + + function updateHighlight( event ) { - var color = new $el( event.data.getTarget() ).getAttribute( 'title' ); - dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color ); - }; + if ( ! (event instanceof CKEDITOR.dom.event ) ) + event = event.data; + + var target = event.getTarget(), + color; + + if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) ) + { + $doc.getById( hicolorId ).setStyle( 'background-color', color ); + $doc.getById( hicolorTextId ).setHtml( color ); + } + } + + function clearHighlight() + { + $doc.getById( hicolorId ).removeStyle( 'background-color' ); + $doc.getById( hicolorTextId ).setHtml( ' ' ); + } + + var onMouseout = $tools.addFunction( clearHighlight ); + + var onClick = updateSelected, + onClickHandler = CKEDITOR.tools.addFunction( onClick ); + + var onFocus = updateHighlight, + onBlur = clearHighlight; + + var onKeydownHandler = CKEDITOR.tools.addFunction( function( ev ) + { + ev = new CKEDITOR.dom.event( ev ); + var element = ev.getTarget(); + var relative, nodeToMove; + var keystroke = ev.getKeystroke(); + var rtl = editor.lang.dir == 'rtl'; + + switch ( keystroke ) + { + // UP-ARROW + case 38 : + // relative is TR + if ( ( relative = element.getParent().getParent().getPrevious() ) ) + { + nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] ); + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + } + ev.preventDefault(); + break; + // DOWN-ARROW + case 40 : + // relative is TR + if ( ( relative = element.getParent().getParent().getNext() ) ) + { + nodeToMove = relative.getChild( [ element.getParent().getIndex(), 0 ] ); + if ( nodeToMove && nodeToMove.type == 1 ) + { + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + } + } + ev.preventDefault(); + break; + // SPACE + // ENTER is already handled as onClick + case 32 : + onClick( ev ); + ev.preventDefault(); + break; + + // RIGHT-ARROW + case rtl ? 37 : 39 : + // relative is TD + if ( ( relative = element.getParent().getNext() ) ) + { + nodeToMove = relative.getChild( 0 ); + if ( nodeToMove.type == 1 ) + { + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + else + onBlur( null, element ); + } + // relative is TR + else if ( ( relative = element.getParent().getParent().getNext() ) ) + { + nodeToMove = relative.getChild( [ 0, 0 ] ); + if ( nodeToMove && nodeToMove.type == 1 ) + { + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + else + onBlur( null, element ); + } + break; + + // LEFT-ARROW + case rtl ? 39 : 37 : + // relative is TD + if ( ( relative = element.getParent().getPrevious() ) ) + { + nodeToMove = relative.getChild( 0 ); + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + // relative is TR + else if ( ( relative = element.getParent().getParent().getPrevious() ) ) + { + nodeToMove = relative.getLast().getChild( 0 ); + nodeToMove.focus(); + onBlur( ev, element ); + onFocus( ev, nodeToMove ); + ev.preventDefault( true ); + } + else + onBlur( null, element ); + break; + default : + // Do not stop not handled events. + return; + } + }); function createColorTable() { @@ -70,8 +206,15 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) cell.setStyle( 'width', '15px' ); cell.setStyle( 'height', '15px' ); - // Pass unparsed color value in some markup-degradable form. - cell.setAttribute( 'title', color ); + var index = cell.$.cellIndex + 1 + 18 * targetRow.rowIndex; + cell.append( CKEDITOR.dom.element.createFromHtml( + '' + color + '', CKEDITOR.document ) ); } appendColorRow( 0, 0 ); @@ -95,19 +238,13 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) } } - function clear() - { - $doc.getById( selHiColorId ).removeStyle( 'background-color' ); - dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' ); - } - - var clearActual = $tools.addFunction( function() - { - $doc.getById( hicolorId ).removeStyle( 'background-color' ); - $doc.getById( hicolorTextId ).setHtml( ' ' ); - } ); + var table = new $el( 'table' ); + createColorTable(); - var numbering = function( id ){ return id + CKEDITOR.tools.getNextNumber(); }, + var numbering = function( id ) + { + return id + CKEDITOR.tools.getNextNumber(); + }, hicolorId = numbering( 'hicolor' ), hicolorTextId = numbering( 'hicolortext' ), selHiColorId = numbering( 'selhicolor' ); @@ -136,12 +273,17 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) [ { type : 'html', - html : '' + table.getHtml() + '
', + html : '' + table.getHtml() + '
' + + '' + lang.options +'', onLoad : function() { var table = CKEDITOR.document.getById( this.domId ); - table.on( 'mouseover', cellMouseover ); - table.on( 'click', cellClick ); + table.on( 'mouseover', updateHighlight ); + }, + focus: function() + { + var firstColor = this.getElement().getElementsByTag( 'a' ).getItem( 0 ); + firstColor.focus(); } }, spacer(), @@ -155,12 +297,13 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) type : 'html', html : '' + lang.highlight +'\
\ -
 
\ - ' + lang.selected +'\ +
 
' + lang.selected + '\
' }, { type : 'text', + label : lang.selected, + labelStyle: 'display:none', id : 'selectedColor', style : 'width: 74px', onChange : function() @@ -172,7 +315,7 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) } catch ( e ) { - clear(); + clearSelected(); } } }, @@ -182,7 +325,7 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) id : 'clear', style : 'margin-top: 5px', label : lang.clear, - onClick : clear + onClick : clearSelected } ] } diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index 8d54142..d0bbde8 100644 --- a/_source/plugins/editingblock/plugin.js +++ b/_source/plugins/editingblock/plugin.js @@ -95,6 +95,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Do that once only. event.removeListener(); + // Redirect the focus into editor for webkit. (#5713) + CKEDITOR.env.webkit && editor.container.on( 'focus', function() + { + editor.focus(); + }); + if ( editor.config.startupFocus ) editor.focus(); diff --git a/_source/plugins/flash/plugin.js b/_source/plugins/flash/plugin.js index 41814e3..c76a7fe 100644 --- a/_source/plugins/flash/plugin.js +++ b/_source/plugins/flash/plugin.js @@ -77,6 +77,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license }); } + editor.on( 'doubleclick', function( evt ) + { + var element = evt.data.element; + + if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'flash' ) + evt.data.dialog = 'flash'; + }); + // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { diff --git a/_source/plugins/forms/dialogs/hiddenfield.js b/_source/plugins/forms/dialogs/hiddenfield.js index 21fa26f..4d823b1 100644 --- a/_source/plugins/forms/dialogs/hiddenfield.js +++ b/_source/plugins/forms/dialogs/hiddenfield.js @@ -6,35 +6,43 @@ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) { return { title : editor.lang.hidden.title, + hiddenField : null, minWidth : 350, minHeight : 110, onShow : function() { delete this.hiddenField; - var element = this.getParentEditor().getSelection().getSelectedElement(); - if ( element && element.getName() == "input" && element.getAttribute( 'type' ) == "checkbox" ) + var editor = this.getParentEditor(), + selection = editor.getSelection(), + element = selection.getSelectedElement(); + + if ( element && element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' ) { this.hiddenField = element; + element = editor.restoreRealElement( this.hiddenField ); this.setupContent( element ); + selection.selectElement( this.hiddenField ); } }, onOk : function() { - var editor, - element = this.hiddenField, - isInsertMode = !element; + var name = this.getValueOf( 'info', '_cke_saved_name' ), + value = this.getValueOf( 'info', 'value' ), + editor = this.getParentEditor(), + element = CKEDITOR.env.ie ? editor.document.createElement( '' ) : editor.document.createElement( 'input' ); - if ( isInsertMode ) + element.setAttribute( 'type', 'hidden' ); + this.commitContent( element ); + var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' ); + if ( !this.hiddenField ) + editor.insertElement( fakeElement ); + else { - editor = this.getParentEditor(); - element = editor.document.createElement( 'input' ); - element.setAttribute( 'type', 'hidden' ); + fakeElement.replace( this.hiddenField ); + editor.getSelection().selectElement( fakeElement ); } - - if ( isInsertMode ) - editor.insertElement( element ); - this.commitContent( element ); + return true; }, contents : [ { @@ -58,10 +66,9 @@ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) commit : function( element ) { if ( this.getValue() ) - element.setAttribute( '_cke_saved_name', this.getValue() ); + element.setAttribute( 'name', this.getValue() ); else { - element.removeAttribute( '_cke_saved_name' ); element.removeAttribute( 'name' ); } } diff --git a/_source/plugins/forms/images/hiddenfield.gif b/_source/plugins/forms/images/hiddenfield.gif new file mode 100644 index 0000000000000000000000000000000000000000..953f643b60032c36ac92590950577c336f133512 GIT binary patch literal 105 zcmZ?wbhEHb6lM@&n8?8JABg_{Z)j*>U|`SzVg`^n1Cx_W&+?fM`5zlEy44+e;LbT+ zkH8h7N-kQ@I;_|Q}>&=&Wsxvt_U!{00zr0#2QD@sN HCI)K&$9F25 literal 0 HcmV?d00001 diff --git a/_source/plugins/forms/plugin.js b/_source/plugins/forms/plugin.js index 5978e0b..fcf639c 100644 --- a/_source/plugins/forms/plugin.js +++ b/_source/plugins/forms/plugin.js @@ -18,6 +18,17 @@ CKEDITOR.plugins.add( 'forms', '{' + 'border: 1px dotted #FF0000;' + 'padding: 2px;' + + '}\n' ); + + editor.addCss( + 'img.cke_hidden' + + '{' + + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/hiddenfield.gif' ) + ');' + + 'background-position: center center;' + + 'background-repeat: no-repeat;' + + 'border: 1px solid #a9a9a9;' + + 'width: 16px;' + + 'height: 16px;' + '}' ); // All buttons use the same code to register. So, to avoid @@ -161,16 +172,54 @@ CKEDITOR.plugins.add( 'forms', } }); } + + editor.on( 'doubleclick', function( evt ) + { + var element = evt.data.element; + + if ( element.is( 'form' ) ) + evt.data.dialog = 'form'; + else if ( element.is( 'select' ) ) + evt.data.dialog = 'select'; + else if ( element.is( 'textarea' ) ) + evt.data.dialog = 'textarea'; + else if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' ) + evt.data.dialog = 'hiddenfield'; + else if ( element.is( 'input' ) ) + { + var type = element.getAttribute( 'type' ); + + switch ( type ) + { + case 'text' : case 'password': + evt.data.dialog = 'textfield'; + break; + case 'button' : case 'submit' : case 'reset' : + evt.data.dialog = 'button'; + break; + case 'checkbox' : + evt.data.dialog = 'checkbox'; + break; + case 'radio' : + evt.data.dialog = 'radio'; + break; + case 'image' : + evt.data.dialog = 'imagebutton'; + break; + } + } + }); }, afterInit : function( editor ) { + var dataProcessor = editor.dataProcessor, + htmlFilter = dataProcessor && dataProcessor.htmlFilter, + dataFilter = dataProcessor && dataProcessor.dataFilter; + // Cleanup certain IE form elements default values. if ( CKEDITOR.env.ie ) { - var dataProcessor = editor.dataProcessor, - htmlFilter = dataProcessor && dataProcessor.htmlFilter; - htmlFilter && htmlFilter.addRules( { elements : @@ -185,8 +234,23 @@ CKEDITOR.plugins.add( 'forms', } } ); } + + if ( dataFilter ) + { + dataFilter.addRules( + { + elements : + { + input : function( element ) + { + if ( element.attributes.type == 'hidden' ) + return editor.createFakeParserElement( element, 'cke_hidden', 'hiddenfield' ); + } + } + } ); + } }, - requires : [ 'image' ] + requires : [ 'image', 'fakeobjects' ] } ); if ( CKEDITOR.env.ie ) diff --git a/_source/plugins/htmldataprocessor/plugin.js b/_source/plugins/htmldataprocessor/plugin.js index 264f504..8a17828 100644 --- a/_source/plugins/htmldataprocessor/plugin.js +++ b/_source/plugins/htmldataprocessor/plugin.js @@ -84,6 +84,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license delete blockLikeTags.pre; var defaultDataFilterRules = { + elements : {}, attributeNames : [ // Event attributes (onXYZ) must not be directly set. They can become @@ -240,6 +241,21 @@ For licensing, see LICENSE.html or http://ckeditor.com/license }; } + function protectReadOnly( element ) + { + element.attributes.contenteditable = "false"; + } + function unprotectReadyOnly( element ) + { + delete element.attributes.contenteditable; + } + // Disable form elements editing mode provided by some browers. (#5746) + for ( i in { input : 1, textarea : 1 } ) + { + defaultDataFilterRules.elements[ i ] = protectReadOnly; + defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly; + } + var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi; var protectElementsRegex = /(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, diff --git a/_source/plugins/image/plugin.js b/_source/plugins/image/plugin.js index e6243b4..4c709b2 100644 --- a/_source/plugins/image/plugin.js +++ b/_source/plugins/image/plugin.js @@ -26,6 +26,14 @@ CKEDITOR.plugins.add( 'image', command : pluginName }); + editor.on( 'doubleclick', function( evt ) + { + var element = evt.data.element; + + if ( element.is( 'img' ) && !element.getAttribute( '_cke_realelement' ) ) + evt.data.dialog = 'image'; + }); + // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { diff --git a/_source/plugins/indent/plugin.js b/_source/plugins/indent/plugin.js index d175e46..80fc71d 100644 --- a/_source/plugins/indent/plugin.js +++ b/_source/plugins/indent/plugin.js @@ -21,38 +21,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function onSelectionChange( evt ) { - var elements = evt.data.path.elements, - listNode, listItem, - editor = evt.editor; + var editor = evt.editor; - for ( var i = 0 ; i < elements.length ; i++ ) - { - if ( elements[i].getName() == 'li' ) - { - listItem = elements[i]; - continue; - } - if ( listNodeNames[ elements[i].getName() ] ) - { - listNode = elements[i]; - break; - } - } + var elementPath = evt.data.path, + list = elementPath && elementPath.contains( listNodeNames ); - if ( listNode ) - { - if ( this.name == 'outdent' ) + if ( list ) return setState.call( this, editor, CKEDITOR.TRISTATE_OFF ); - else - { - while ( listItem && ( listItem = listItem.getPrevious( CKEDITOR.dom.walker.whitespaces( true ) ) ) ) - { - if ( listItem.getName && listItem.getName() == 'li' ) - return setState.call( this, editor, CKEDITOR.TRISTATE_OFF ); - } - return setState.call( this, editor, CKEDITOR.TRISTATE_DISABLED ); - } - } if ( !this.useIndentClasses && this.name == 'indent' ) return setState.call( this, editor, CKEDITOR.TRISTATE_OFF ); @@ -214,12 +189,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR; var block; while ( ( block = iterator.getNextParagraph() ) ) - { + indentElement.call( this, editor, block ); + } + function indentElement( editor, element ) + { if ( this.useIndentClasses ) { // Transform current class name to indent step index. - var indentClass = block.$.className.match( this.classNameRegex ), + var indentClass = element.$.className.match( this.classNameRegex ), indentStep = 0; if ( indentClass ) { @@ -233,28 +211,37 @@ For licensing, see LICENSE.html or http://ckeditor.com/license indentStep--; else indentStep++; + + if ( indentStep < 0 ) + return false; + indentStep = Math.min( indentStep, editor.config.indentClasses.length ); indentStep = Math.max( indentStep, 0 ); - var className = CKEDITOR.tools.ltrim( block.$.className.replace( this.classNameRegex, '' ) ); + var className = CKEDITOR.tools.ltrim( element.$.className.replace( this.classNameRegex, '' ) ); if ( indentStep < 1 ) - block.$.className = className; + element.$.className = className; else - block.$.className = CKEDITOR.tools.ltrim( className + ' ' + editor.config.indentClasses[ indentStep - 1 ] ); + element.addClass( editor.config.indentClasses[ indentStep - 1 ] ); } else { - var currentOffset = parseInt( block.getStyle( this.indentCssProperty ), 10 ); + var currentOffset = parseInt( element.getStyle( this.indentCssProperty ), 10 ); if ( isNaN( currentOffset ) ) currentOffset = 0; currentOffset += ( this.name == 'indent' ? 1 : -1 ) * editor.config.indentOffset; + + if ( currentOffset < 0 ) + return false; + currentOffset = Math.max( currentOffset, 0 ); currentOffset = Math.ceil( currentOffset / editor.config.indentOffset ) * editor.config.indentOffset; - block.setStyle( this.indentCssProperty, currentOffset ? currentOffset + editor.config.indentUnit : '' ); - if ( block.getAttribute( 'style' ) === '' ) - block.removeAttribute( 'style' ); + element.setStyle( this.indentCssProperty, currentOffset ? currentOffset + editor.config.indentUnit : '' ); + if ( element.getAttribute( 'style' ) === '' ) + element.removeAttribute( 'style' ); } + + return true; } - } function indentCommand( editor, name ) { @@ -272,24 +259,59 @@ For licensing, see LICENSE.html or http://ckeditor.com/license this.startDisabled = name == 'outdent'; } + function isListItem( node ) + { + return node.type = CKEDITOR.NODE_ELEMENT && node.is( 'li' ); + } + indentCommand.prototype = { exec : function( editor ) { var selection = editor.getSelection(), range = selection && selection.getRanges()[0]; - if ( !selection || !range ) - return; - - var bookmarks = selection.createBookmarks( true ), - nearestListBlock = range.getCommonAncestor(); + var startContainer = range.startContainer, + endContainer = range.endContainer, + rangeRoot = range.getCommonAncestor(), + nearestListBlock = rangeRoot; while ( nearestListBlock && !( nearestListBlock.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ nearestListBlock.getName() ] ) ) nearestListBlock = nearestListBlock.getParent(); - if ( nearestListBlock ) + // Avoid selection anchors under list root. + //
    [
  • ...
  • ]
=>
  • [...]
+ if ( nearestListBlock && startContainer.type == CKEDITOR.NODE_ELEMENT + && startContainer.getName() in listNodeNames ) + { + var walker = new CKEDITOR.dom.walker( range ); + walker.evaluator = isListItem; + range.startContainer = walker.next(); + } + + if ( nearestListBlock && endContainer.type == CKEDITOR.NODE_ELEMENT + && endContainer.getName() in listNodeNames ) + { + walker = new CKEDITOR.dom.walker( range ); + walker.evaluator = isListItem; + range.endContainer = walker.previous(); + } + + var bookmarks = selection.createBookmarks( true ); + + if ( nearestListBlock ) + { + var firstListItem = nearestListBlock.getFirst( function( node ) + { + return node.type == CKEDITOR.NODE_ELEMENT && node.is( 'li' ); + }), + rangeStart = range.startContainer, + indentWholeList = firstListItem.equals( rangeStart ) || firstListItem.contains( rangeStart ); + + // Indent the entire list if cursor is inside the first list item. (#3893) + if ( !( indentWholeList && indentElement.call( this, editor, nearestListBlock ) ) ) indentList.call( this, editor, range, nearestListBlock ); + } else indentBlock.call( this, editor, range ); @@ -324,6 +346,17 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Register the state changing handlers. editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, indent ) ); editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, outdent ) ); + + // [IE6/7] Raw lists are using margin instead of padding for visual indentation in wysiwyg mode. (#3893) + if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) + { + editor.addCss( + "ul,ol" + + "{" + + " margin-left: 0px;" + + " padding-left: 40px;" + + "}" ); + } }, requires : [ 'domiterator', 'list' ] diff --git a/_source/plugins/link/plugin.js b/_source/plugins/link/plugin.js index 26a8cb3..f373eaf 100644 --- a/_source/plugins/link/plugin.js +++ b/_source/plugins/link/plugin.js @@ -65,6 +65,16 @@ CKEDITOR.plugins.add( 'link', command.setState( CKEDITOR.TRISTATE_DISABLED ); } ); + editor.on( 'doubleclick', function( evt ) + { + var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || evt.data.element; + + if ( element.is( 'a' ) ) + evt.data.dialog = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ) ? 'anchor' : 'link'; + else if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ) + evt.data.dialog = 'anchor'; + }); + // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { diff --git a/_source/plugins/maximize/plugin.js b/_source/plugins/maximize/plugin.js index a5a06fc..bcb726c 100644 --- a/_source/plugins/maximize/plugin.js +++ b/_source/plugins/maximize/plugin.js @@ -80,6 +80,21 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function refreshCursor( editor ) { + // Refresh all editor instances on the page (#5724). + var all = CKEDITOR.instances; + for ( var i in all ) + { + var one = all[ i ]; + if ( one.mode == 'wysiwyg' ) + { + var body = one.document.getBody(); + // Refresh 'contentEditable' otherwise + // DOM lifting breaks design mode. (#5560) + body.setAttribute( 'contentEditable', false ); + body.setAttribute( 'contentEditable', true ); + } + } + if ( editor.focusManager.hasFocus ) { editor.toolbox.focus(); diff --git a/_source/plugins/sourcearea/plugin.js b/_source/plugins/sourcearea/plugin.js index dbbed8d..f1214da 100644 --- a/_source/plugins/sourcearea/plugin.js +++ b/_source/plugins/sourcearea/plugin.js @@ -34,7 +34,7 @@ CKEDITOR.plugins.add( 'sourcearea', textarea.setAttributes( { dir : 'ltr', - tabIndex : editor.tabIndex, + tabIndex : CKEDITOR.env.webkit ? -1 : editor.tabIndex, 'role' : 'textbox', 'aria-label' : editor.lang.editorTitle.replace( '%1', editor.name ) }); diff --git a/_source/plugins/tab/plugin.js b/_source/plugins/tab/plugin.js index c2646fe..c66fb43 100644 --- a/_source/plugins/tab/plugin.js +++ b/_source/plugins/tab/plugin.js @@ -51,7 +51,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license }); } - if ( CKEDITOR.env.webkit ) + if ( CKEDITOR.env.webkit || CKEDITOR.env.gecko ) { editor.on( 'key', function( ev ) { diff --git a/_source/plugins/table/plugin.js b/_source/plugins/table/plugin.js index 2feaeb1..d1c60a8 100644 --- a/_source/plugins/table/plugin.js +++ b/_source/plugins/table/plugin.js @@ -45,6 +45,14 @@ CKEDITOR.plugins.add( 'table', } ); } + editor.on( 'doubleclick', function( evt ) + { + var element = evt.data.element; + + if ( element.is( 'table' ) ) + evt.data.dialog = 'tableProperties'; + }); + // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { diff --git a/_source/plugins/wysiwygarea/plugin.js b/_source/plugins/wysiwygarea/plugin.js index a6b0639..ed278c7 100644 --- a/_source/plugins/wysiwygarea/plugin.js +++ b/_source/plugins/wysiwygarea/plugin.js @@ -319,7 +319,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // for other browers, the 'src' attribute should be left empty to // trigger iframe's 'load' event. ' src="' + ( CKEDITOR.env.ie ? 'javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())' : '' ) + '"' + - ' tabIndex="' + editor.tabIndex + '"' + + ' tabIndex="' + ( CKEDITOR.env.webkit? -1 : editor.tabIndex ) + '"' + ' allowTransparency="true"' + '>' ); @@ -380,30 +380,42 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } else { - // Gecko need a key event to 'wake up' the editing - // ability when document is empty.(#3864) - if ( CKEDITOR.env.gecko && !body.childNodes.length ) + // Avoid opening design mode in a frame window thread, + // which will cause host page scrolling.(#4397) + setTimeout( function() { - setTimeout( function() - { - restoreDirty( editor ); - - // Simulating keyboard character input by dispatching a keydown of white-space text. - var keyEventSimulate = domDocument.$.createEvent( "KeyEvents" ); - keyEventSimulate.initKeyEvent( 'keypress', true, true, domWindow.$, false, - false, false, false, 0, 32 ); - domDocument.$.dispatchEvent( keyEventSimulate ); - - // Restore the original document status by placing the cursor before a bogus br created (#5021). - domDocument.createElement( 'br', { attributes: { '_moz_editor_bogus_node' : 'TRUE', '_moz_dirty' : "" } } ) - .replace( domDocument.getBody().getFirst() ); - var nativeRange = new CKEDITOR.dom.range( domDocument ); - nativeRange.setStartAt( new CKEDITOR.dom.element( body ) , CKEDITOR.POSITION_AFTER_START ); - nativeRange.select(); - }, 0 ); - } + // Prefer 'contentEditable' instead of 'designMode'. (#3593) + if ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 + || CKEDITOR.env.opera ) + domDocument.$.body.contentEditable = true; + else if ( CKEDITOR.env.webkit ) + domDocument.$.body.parentNode.contentEditable = true; + else + domDocument.$.designMode = 'on'; + }, 0 ); + } - domDocument.designMode = 'on'; + // Gecko need a key event to 'wake up' the editing + // ability when document is empty.(#3864) + if ( CKEDITOR.env.gecko && !body.childNodes.length ) + { + setTimeout( function() + { + restoreDirty( editor ); + + // Simulating keyboard character input by dispatching a keydown of white-space text. + var keyEventSimulate = domDocument.$.createEvent( "KeyEvents" ); + keyEventSimulate.initKeyEvent( 'keypress', true, true, domWindow.$, false, + false, false, false, 0, 32 ); + domDocument.$.dispatchEvent( keyEventSimulate ); + + // Restore the original document status by placing the cursor before a bogus br created (#5021). + domDocument.createElement( 'br', { attributes: { '_moz_editor_bogus_node' : 'TRUE', '_moz_dirty' : "" } } ) + .replace( domDocument.getBody().getFirst() ); + var nativeRange = new CKEDITOR.dom.range( domDocument ); + nativeRange.setStartAt( new CKEDITOR.dom.element( body ) , CKEDITOR.POSITION_AFTER_START ); + nativeRange.select(); + }, 0 ); } // IE, Opera and Safari may not support it and throw @@ -414,6 +426,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license domWindow = editor.window = new CKEDITOR.dom.window( domWindow ); domDocument = editor.document = new CKEDITOR.dom.document( domDocument ); + domDocument.on( 'dblclick', function( evt ) + { + var element = evt.data.getTarget(), + data = { element : element, dialog : '' }; + editor.fire( 'doubleclick', data ); + data.dialog && editor.openDialog( data.dialog ); + }); + // Gecko/Webkit need some help when selecting control type elements. (#3448) if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera) ) { @@ -446,7 +466,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // IE standard compliant in editing frame doesn't focus the editor when // clicking outside actual content, manually apply the focus. (#1659) if ( CKEDITOR.env.ie - && domDocument.$.compatMode == 'CSS1Compat' ) + && domDocument.$.compatMode == 'CSS1Compat' + || CKEDITOR.env.gecko + || CKEDITOR.env.opera ) { var htmlElement = domDocument.getDocumentElement(); htmlElement.on( 'mousedown', function( evt ) @@ -455,20 +477,35 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // have to use here a temporary element to 'redirect' // the focus. if ( evt.data.getTarget().equals( htmlElement ) ) - ieFocusGrabber.focus(); + { + CKEDITOR.env.gecko && blinkCursor(); + focusGrabber.focus(); + } } ); } - var focusTarget = ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) ? - domWindow : domDocument; - - focusTarget.on( 'blur', function() + domWindow.on( 'blur', function() { editor.focusManager.blur(); }); - focusTarget.on( 'focus', function() + domWindow.on( 'focus', function() { + var doc = editor.document; + if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) + doc.getBody().focus(); + else if ( CKEDITOR.env.webkit ) + { + // Selection will get lost after move focus + // to document element, save it first. + var sel = editor.getSelection(), + type = sel.getType(), + range = ( type != CKEDITOR.SELECTION_NONE ) && sel.getRanges()[ 0 ]; + + doc.getDocumentElement().focus(); + range && range.select(); + } + editor.focusManager.focus(); }); @@ -478,6 +515,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( CKEDITOR.env.ie ) { + domDocument.getDocumentElement().addClass( domDocument.$.compatMode ); // Override keystrokes which should have deletion behavior // on control types in IE . (#4047) domDocument.on( 'keydown', function( evt ) @@ -753,6 +791,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license else if ( editor.window ) { editor.window.focus(); + editor.selectionChange(); } } @@ -774,18 +813,32 @@ For licensing, see LICENSE.html or http://ckeditor.com/license editor.document.$.title = frameLabel; }); + // IE8 stricts mode doesn't have 'contentEditable' in effect + // on element unless it has layout. (#5562) + if ( CKEDITOR.env.ie8 ) + editor.addCss( 'html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}' ); + + // Switch on design mode for a short while and close it after then. + function blinkCursor() + { + editor.document.$.designMode = 'on'; + setTimeout( function () + { + editor.document.$.designMode = 'off'; + }, 50 ); + } // Create an invisible element to grab focus. - if ( CKEDITOR.env.ie ) + if ( CKEDITOR.env.gecko || CKEDITOR.env.ie || CKEDITOR.env.opera ) { - var ieFocusGrabber; + var focusGrabber; editor.on( 'uiReady', function() { - ieFocusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml( + focusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml( // Use 'span' instead of anything else to fly under the screen-reader radar. (#5049) '' ) ); - ieFocusGrabber.on( 'focus', function() + focusGrabber.on( 'focus', function() { editor.focus(); } ); @@ -793,9 +846,21 @@ For licensing, see LICENSE.html or http://ckeditor.com/license editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( contentDomReadyHandler ); - ieFocusGrabber.clearCustomData(); + focusGrabber.clearCustomData(); } ); } + + // Disable form elements editing mode provided by some browers. (#5746) + editor.on( 'insertElement', function ( evt ) + { + var element = evt.data; + if ( element.type = CKEDITOR.NODE_ELEMENT + && ( element.is( 'input' ) || element.is( 'textarea' ) ) ) + { + element.setAttribute( 'contentEditable', false ); + } + }); + } }); diff --git a/_source/themes/default/theme.js b/_source/themes/default/theme.js index 85229c0..078eb19 100644 --- a/_source/themes/default/theme.js +++ b/_source/themes/default/theme.js @@ -118,6 +118,7 @@ CKEDITOR.themes.add( 'default', (function() ' dir="', editor.lang.dir, '"' + ' title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' + ' lang="', editor.langCode, '"' + + ( CKEDITOR.env.webkit? ' tabindex="' + tabIndex + '"' : '' ) + ' role="application"' + ' aria-labelledby="cke_', name, '_arialbl"' + ( style ? ' style="' + style + '"' : '' ) + diff --git a/ckeditor.asp b/ckeditor.asp index bc644a4..20510e5 100644 --- a/ckeditor.asp +++ b/ckeditor.asp @@ -91,9 +91,9 @@ Class CKEditor Private Sub Class_Initialize() - version = "3.2.2" - timeStamp = "A4SD49X" - mTimeStamp = "A4SD49X" + version = "3.3" + timeStamp = "A4SD49Y" + mTimeStamp = "A4SD49Y" Set oInstanceConfig = CreateObject("Scripting.Dictionary") Set oAllInstancesConfig = CreateObject("Scripting.Dictionary") diff --git a/ckeditor.js b/ckeditor.js index 5f41ad4..1244f44 100644 --- a/ckeditor.js +++ b/ckeditor.js @@ -3,7 +3,7 @@ Copyright (c) 2003-2010, 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:'A4SD49X',version:'3.2.2',revision:'5541',_:{},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,c){var d=a.event.prototype;for(var e in d){if(b[e]==undefined)b[e]=d[e];}};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; +(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A4SD49Y',version:'3.3',revision:'5542',_:{},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,c){var d=a.event.prototype;for(var e in d){if(b[e]==undefined)b[e]=d[e];}};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){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(){var g=document.domain,h=window.location.hostname;return this.ie&&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.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.air?'air':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?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';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=true;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=true;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(//,'>');},escapeCssSelector:function(f){return f.replace(/[\s#:.,$*^\[\]()~=+>]/g,'\\$&');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),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;h1||i.length==1&&i[0].nodeName!='_cke_expando';},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.getAttribute('_fck_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(){var j=this;if(!(f.$removeEmpty[j.getName()]||j.is('a')))return;i(j,j.getNext(),true);i(j,j.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';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}: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();});}});a.command=function(i,j){this.uiItems=[];this.exec=function(k){if(this.state==0)return false;if(this.editorFocus)i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},editorFocus:true,state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0); -},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ltr',contentsLanguage:'',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,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]); +},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ui',contentsLanguage:'',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,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,p){var q=typeof l=='string';if(q)l=[l];if(!n)n=a;var r=l.length,s=[],t=[],u=function(z){if(m)if(q)m.call(n,z);else m.call(n,s,t);};if(r===0){u(true);return;}var v=function(z,A){(A?s:t).push(z);if(--r<=0){p&&a.document.getDocumentElement().removeStyle('cursor');u(A);}},w=function(z,A){j[z]=1;var B=k[z];delete k[z];for(var C=0;C1)return;var B=new h('script');B.setAttributes({type:'text/javascript',src:z});if(m)if(c)B.$.onreadystatechange=function(){if(B.$.readyState=='loaded'||B.$.readyState=='complete'){B.$.onreadystatechange=null;w(z,true);}};else{B.$.onload=function(){setTimeout(function(){w(z,true);},0);};B.$.onerror=function(){w(z,false);};}B.appendTo(a.document.getHead());};p&&a.document.getDocumentElement().setStyle('cursor','wait');for(var y=0;y0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[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();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={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),n=f.$list,o=f.$listItem; -a.htmlParser.fragment.fromHtml=function(p,q){var r=new a.htmlParser(),s=[],t=new a.htmlParser.fragment(),u=[],v=[],w=t,x=false,y;function z(E){var F;if(u.length>0)for(var G=0;G=0;F--){if(E==u[F].name){u.splice(F,1);return;}}var G=[],H=[],I=w;while(I.type&&I.name!=E){if(!I._.isBlockLike)H.unshift(I);G.push(I);I=I.parent;}if(I.type){for(F=0;F0&&s.children[q-1]||null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){var r;this.filterChildren=function(){var s=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,s,q,true);var t=s.getHtml();this.children=new a.htmlParser.fragment.fromHtml(t).children;r=1;};!this.name&&q&&q.onFragment(this);this.writeChildrenHtml(p,r?null:q);},writeChildrenHtml:function(p,q){for(var r=0;rn?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()).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},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0&&D.getChild(w.startOffset-1);this._.guardRTL=function(G,H){return(!H||!D.equals(G))&&(!E||!G.equals(E))&&(G.type!=1||!H||G.getName()!='body');};}var F=t?this._.guardRTL:this._.guardLTR;if(y)x=function(G,H){if(F(G,H)===false)return false;return y(G,H);};else x=F;if(this.current)v=this.current[A](false,z,x);else if(t){v=w.endContainer;if(w.endOffset>0){v=v.getChild(w.endOffset-1);if(x(v)===false)v=null;}else v=x(v,true)===false?null:v.getPreviousSourceNode(true,z,x);}else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},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},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()]; -};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;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){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B;if(x.type==3)x=x.split(z);else if(x.getChildCount()>0)if(z>=x.getChildCount()){x=x.append(t.document.createText(''));B=true;}else x=x.getChild(z);if(w.type==3){w.split(y);if(w.equals(x))x=w.getNext();}else if(!y){w=w.getFirst().insertBeforeMe(t.document.createText(''));A=true;}else if(y>=w.getChildCount()){w=w.append(t.document.createText(''));A=true;}else w=w.getChild(y).getPrevious();var C=w.getParents(),D=x.getParents(),E,F,G;for(E=0;E0&&!I.equals(x))J=H.append(I.clone());if(!C[N]||I.$.parentNode!=C[N].$.parentNode){K=I.getPrevious();while(K){if(K.equals(C[N])||K.equals(w))break;L=K.getPrevious();if(u==2)H.$.insertBefore(K.$.cloneNode(true),H.$.firstChild);else{K.remove();if(u==1)H.$.insertBefore(K.$,H.$.firstChild);}K=L;}}if(H)H=J;}if(u==2){var O=t.startContainer;if(O.type==3){O.$.data+=O.$.nextSibling.data; -O.$.parentNode.removeChild(O.$.nextSibling);}var P=t.endContainer;if(P.type==3&&P.$.nextSibling){P.$.data+=P.$.nextSibling.data;P.$.parentNode.removeChild(P.$.nextSibling);}}else{if(F&&G&&(w.$.parentNode!=F.$.parentNode||x.$.parentNode!=G.$.parentNode)){var Q=G.getIndex();if(A&&G.$.parentNode==w.$.parentNode)Q--;t.setStart(G.getParent(),Q);}t.collapse(true);}if(A)w.remove();if(B&&x.$.parentNode)x.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().hasAttribute('_fck_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(){if(this.collapsed)return;m(this,0);},extractContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,t);return t;},createBookmark:function(t){var y=this;var u,v,w,x;u=y.document.createElement('span');u.setAttribute('_fck_bookmark',1);u.setStyle('display','none');u.setHtml(' ');if(t){w='cke_bm_'+e.getNextNumber();u.setAttribute('id',w+'S');}if(!y.collapsed){v=u.clone();v.setHtml(' ');if(t)v.setAttribute('id',w+'E');x=y.clone();x.collapse();x.insertNode(v);}x=y.clone();x.collapse(true);x.insertNode(u);if(v){y.setStartAfter(u);y.setEndBefore(v);}else y.moveToPosition(u,4);return{startNode:t?w+'S':u,endNode:t?w+'E':v,serializable:t};},createBookmark2:function(t){var A=this;var u=A.startContainer,v=A.endContainer,w=A.startOffset,x=A.endOffset,y,z;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){y=u.getChild(w);if(y&&y.type==3&&w>0&&y.getPrevious().type==3){u=y; -w=0;}}while(u.type==3&&(z=u.getPrevious())&&z.type==3){u=z;w+=z.getLength();}if(!A.isCollapsed){if(v.type==1){y=v.getChild(x);if(y&&y.type==3&&x>0&&y.getPrevious().type==3){v=y;x=0;}}while(v.type==3&&(z=v.getPrevious())&&z.type==3){v=z;x+=z.getLength();}}}return{start:u.getAddress(t),end:A.isCollapsed?null:v.getAddress(t),startOffset:w,endOffset:x,normalized:t,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.hasAttribute('_fck_bookmark'))v.setStartAt(t,3);if(u&&u.is&&u.is('span')&&u.hasAttribute('_fck_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){switch(t){case 1:if(this.collapsed)return;var u=this.getCommonAncestor(),v=this.document.getBody(),w,x,y,z,A,B=false,C,D,E=this.startContainer,F=this.startOffset;if(E.type==3){if(F){E=!e.trim(E.substring(0,F)).length&&E;B=!!E;}if(E)if(!(z=E.getPrevious()))y=E.getParent();}else{if(F)z=E.getChild(F-1)||E.getLast();if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)w=y;else this.setStartBefore(y);}z=y.getPrevious();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/[\s\ufeff]$/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{var G=z.$.all||z.$.getElementsByTagName('*');for(var H=0,I;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B){if(A)w=y;else if(y)this.setStartBefore(y);}else B=true;if(z){var J=z.getPrevious();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}E=this.endContainer;F=this.endOffset;y=z=null;A=B=false;if(E.type==3){E=!e.trim(E.substring(F)).length&&E;B=!(E&&E.getLength());if(E)if(!(z=E.getNext()))y=E.getParent();}else{z=E.getChild(F);if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)x=y;else if(y)this.setEndAfter(y);}z=y.getNext();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/^[\s\ufeff]/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{G=z.$.all||z.$.getElementsByTagName('*');for(H=0;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B)if(A)x=y;else this.setEndAfter(y);if(z){J=z.getNext();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}if(w&&x){u=w.contains(x)?x:w;this.setStartBefore(u);this.setEndAfter(u);}break;case 2:case 3:var K=new d.range(this.document);v=this.document.getBody();K.setStartAt(v,1);K.setEnd(this.startContainer,this.startOffset);var L=new d.walker(K),M,N,O=d.walker.blockBoundary(t==3?{br:1}:null),P=function(R){var S=O(R); -if(!S)M=R;return S;},Q=function(R){var S=P(R);if(!S&&R.is&&R.is('br'))N=R;return S;};L.guard=P;y=L.lastBackward();M=M||v;this.setStartAt(M,!M.is('br')&&(!y&&this.checkStartOfBlock()||y&&M.contains(y))?1:4);K=this.clone();K.collapse();K.setEndAt(v,2);L=new d.walker(K);L.guard=t==3?Q:P;M=null;y=L.lastForward();M=M||v;this.setEndAt(M,!y&&this.checkEndOfBlock()||y&&M.contains(y)?2:3);if(N)this.setEndAfter(N);}},shrink:function(t,u){if(!this.collapsed){t=t||a.SHRINK_TEXT;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);D.evaluator=function(H){return H.type==(t==a.SHRINK_ELEMENT?1:3);};var E;D.guard=function(H,I){if(t==a.SHRINK_ELEMENT&&H.type==3)return false;if(I&&H.equals(E))return false;if(!I&&H.type==1)E=H;return true;};if(B){var F=D[t==a.SHRINK_ELEMENT?'lastForward':'next']();F&&this.setStartAt(F,u?1:3);}if(C){D.reset();var G=D[t==a.SHRINK_ELEMENT?'lastBackward':'previous']();G&&this.setEndAt(G,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()])t=t.getParent(),u=t.getIndex();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()])t=t.getParent(),u=t.getIndex()+1;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=this.clone();v[u==1?'setStartAt':'setEndAt'](t,u==1?1:2);var w=new d.walker(v),x=false;w.evaluator=p;return w[u==1?'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();},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(),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(){if(b.webkit){b.hc=false;return;}var l=c&&b.version<7,m=c&&b.version==7,n=l?a.basePath+'images/spacer.gif':m?'about:blank':'data:image/png;base64,',o=h.createFromHtml('
',a.document);o.appendTo(a.document.getHead());try{b.hc=o.getComputedStyle('background-image')=='none';}catch(p){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';o.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;m=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[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();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={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),n=f.$list,o=f.$listItem;a.htmlParser.fragment.fromHtml=function(p,q){var r=new a.htmlParser(),s=[],t=new a.htmlParser.fragment(),u=[],v=[],w=t,x=false,y;function z(E){var F;if(u.length>0)for(var G=0;G=0;F--){if(E==u[F].name){u.splice(F,1);return;}}var G=[],H=[],I=w;while(I.type&&I.name!=E){if(!I._.isBlockLike)H.unshift(I);G.push(I);I=I.parent;}if(I.type){for(F=0;F0&&s.children[q-1]||null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){var r;this.filterChildren=function(){var s=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,s,q,true);var t=s.getHtml();this.children=new a.htmlParser.fragment.fromHtml(t).children;r=1;};!this.name&&q&&q.onFragment(this);this.writeChildrenHtml(p,r?null:q);},writeChildrenHtml:function(p,q){for(var r=0;rn?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()).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},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0&&D.getChild(w.startOffset-1);this._.guardRTL=function(G,H){return(!H||!D.equals(G))&&(!E||!G.equals(E))&&(G.type!=1||!H||G.getName()!='body');};}var F=t?this._.guardRTL:this._.guardLTR;if(y)x=function(G,H){if(F(G,H)===false)return false;return y(G,H);};else x=F;if(this.current)v=this.current[A](false,z,x);else if(t){v=w.endContainer;if(w.endOffset>0){v=v.getChild(w.endOffset-1);if(x(v)===false)v=null;}else v=x(v,true)===false?null:v.getPreviousSourceNode(true,z,x);}else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this); +},lastBackward:function(){return m.call(this,true);},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},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()];};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;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){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B;if(x.type==3)x=x.split(z);else if(x.getChildCount()>0)if(z>=x.getChildCount()){x=x.append(t.document.createText(''));B=true;}else x=x.getChild(z);if(w.type==3){w.split(y);if(w.equals(x))x=w.getNext();}else if(!y){w=w.getFirst().insertBeforeMe(t.document.createText(''));A=true;}else if(y>=w.getChildCount()){w=w.append(t.document.createText(''));A=true;}else w=w.getChild(y).getPrevious();var C=w.getParents(),D=x.getParents(),E,F,G;for(E=0;E0&&!I.equals(x))J=H.append(I.clone());if(!C[N]||I.$.parentNode!=C[N].$.parentNode){K=I.getPrevious();while(K){if(K.equals(C[N])||K.equals(w))break;L=K.getPrevious();if(u==2)H.$.insertBefore(K.$.cloneNode(true),H.$.firstChild);else{K.remove();if(u==1)H.$.insertBefore(K.$,H.$.firstChild);}K=L;}}if(H)H=J;}if(u==2){var O=t.startContainer;if(O.type==3){O.$.data+=O.$.nextSibling.data;O.$.parentNode.removeChild(O.$.nextSibling);}var P=t.endContainer;if(P.type==3&&P.$.nextSibling){P.$.data+=P.$.nextSibling.data;P.$.parentNode.removeChild(P.$.nextSibling);}}else{if(F&&G&&(w.$.parentNode!=F.$.parentNode||x.$.parentNode!=G.$.parentNode)){var Q=G.getIndex();if(A&&G.$.parentNode==w.$.parentNode)Q--;t.setStart(G.getParent(),Q);}t.collapse(true);}if(A)w.remove();if(B&&x.$.parentNode)x.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().hasAttribute('_fck_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(){if(this.collapsed)return;m(this,0);},extractContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,t);return t;},createBookmark:function(t){var y=this;var u,v,w,x;u=y.document.createElement('span');u.setAttribute('_fck_bookmark',1);u.setStyle('display','none');u.setHtml(' ');if(t){w='cke_bm_'+e.getNextNumber();u.setAttribute('id',w+'S');}if(!y.collapsed){v=u.clone();v.setHtml(' ');if(t)v.setAttribute('id',w+'E'); +x=y.clone();x.collapse();x.insertNode(v);}x=y.clone();x.collapse(true);x.insertNode(u);if(v){y.setStartAfter(u);y.setEndBefore(v);}else y.moveToPosition(u,4);return{startNode:t?w+'S':u,endNode:t?w+'E':v,serializable:t};},createBookmark2:function(t){var A=this;var u=A.startContainer,v=A.endContainer,w=A.startOffset,x=A.endOffset,y,z;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){y=u.getChild(w);if(y&&y.type==3&&w>0&&y.getPrevious().type==3){u=y;w=0;}}while(u.type==3&&(z=u.getPrevious())&&z.type==3){u=z;w+=z.getLength();}if(!A.isCollapsed){if(v.type==1){y=v.getChild(x);if(y&&y.type==3&&x>0&&y.getPrevious().type==3){v=y;x=0;}}while(v.type==3&&(z=v.getPrevious())&&z.type==3){v=z;x+=z.getLength();}}}return{start:u.getAddress(t),end:A.isCollapsed?null:v.getAddress(t),startOffset:w,endOffset:x,normalized:t,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.hasAttribute('_fck_bookmark'))v.setStartAt(t,3);if(u&&u.is&&u.is('span')&&u.hasAttribute('_fck_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){switch(t){case 1:if(this.collapsed)return;var u=this.getCommonAncestor(),v=this.document.getBody(),w,x,y,z,A,B=false,C,D,E=this.startContainer,F=this.startOffset;if(E.type==3){if(F){E=!e.trim(E.substring(0,F)).length&&E;B=!!E;}if(E)if(!(z=E.getPrevious()))y=E.getParent();}else{if(F)z=E.getChild(F-1)||E.getLast();if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)w=y;else this.setStartBefore(y);}z=y.getPrevious();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/[\s\ufeff]$/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{var G=z.$.all||z.$.getElementsByTagName('*');for(var H=0,I;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B){if(A)w=y;else if(y)this.setStartBefore(y);}else B=true;if(z){var J=z.getPrevious();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}E=this.endContainer;F=this.endOffset;y=z=null;A=B=false;if(E.type==3){E=!e.trim(E.substring(F)).length&&E;B=!(E&&E.getLength());if(E)if(!(z=E.getNext()))y=E.getParent();}else{z=E.getChild(F);if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)x=y;else if(y)this.setEndAfter(y);}z=y.getNext();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/^[\s\ufeff]/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{G=z.$.all||z.$.getElementsByTagName('*');for(H=0;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null; +break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B)if(A)x=y;else this.setEndAfter(y);if(z){J=z.getNext();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}if(w&&x){u=w.contains(x)?x:w;this.setStartBefore(u);this.setEndAfter(u);}break;case 2:case 3:var K=new d.range(this.document);v=this.document.getBody();K.setStartAt(v,1);K.setEnd(this.startContainer,this.startOffset);var L=new d.walker(K),M,N,O=d.walker.blockBoundary(t==3?{br:1}:null),P=function(R){var S=O(R);if(!S)M=R;return S;},Q=function(R){var S=P(R);if(!S&&R.is&&R.is('br'))N=R;return S;};L.guard=P;y=L.lastBackward();M=M||v;this.setStartAt(M,!M.is('br')&&(!y&&this.checkStartOfBlock()||y&&M.contains(y))?1:4);K=this.clone();K.collapse();K.setEndAt(v,2);L=new d.walker(K);L.guard=t==3?Q:P;M=null;y=L.lastForward();M=M||v;this.setEndAt(M,!y&&this.checkEndOfBlock()||y&&M.contains(y)?2:3);if(N)this.setEndAfter(N);}},shrink:function(t,u){if(!this.collapsed){t=t||a.SHRINK_TEXT;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);D.evaluator=function(H){return H.type==(t==a.SHRINK_ELEMENT?1:3);};var E;D.guard=function(H,I){if(t==a.SHRINK_ELEMENT&&H.type==3)return false;if(I&&H.equals(E))return false;if(!I&&H.type==1)E=H;return true;};if(B){var F=D[t==a.SHRINK_ELEMENT?'lastForward':'next']();F&&this.setStartAt(F,u?1:3);}if(C){D.reset();var G=D[t==a.SHRINK_ELEMENT?'lastBackward':'previous']();G&&this.setEndAt(G,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()])t=t.getParent(),u=t.getIndex();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()])t=t.getParent(),u=t.getIndex()+1;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=this.clone();v[u==1?'setStartAt':'setEndAt'](t,u==1?1:2);var w=new d.walker(v),x=false;w.evaluator=p;return w[u==1?'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();},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(),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(){if(b.webkit){b.hc=false;return;}var l=c&&b.version<7,m=c&&b.version==7,n=l?a.basePath+'images/spacer.gif':m?'about:blank':'data:image/png;base64,',o=h.createFromHtml('
',a.document);o.appendTo(a.document.getHead());try{b.hc=o.getComputedStyle('background-image')=='none';}catch(p){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';o.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){y=z.shift();while(!y.getParent().equals(C))y=y.getParent();if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove()); z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M);h.setMarker(K,M,'blockquote_moveout',true);}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift();I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber(),p='',q=this.command,r,s;this._.editor=l;var t={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}};t.clickFn=r=e.addFunction(t.execute,t);t.index=s=k.button._.instances.push(t)-1;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(q){q=l.getCommand(q);if(q){q.on('state',function(){this.setState(q.state);},this);p+='cke_'+(q.state==1?'on':q.state==0?'disabled':'off');}}if(!q)p+='cke_off'; @@ -48,80 +48,81 @@ return false;case 27:p.focus();return false;case 13:case 32:this.click(l,m);retu u.select(C);}};var l=j.enterkey,m=l.enterBr,n=l.enterBlock,o=/^h[1-6]$/;function p(s){if(s.mode!='wysiwyg')return false;if(s.getSelection().getStartElement().hasAscendant('pre',true)){setTimeout(function(){n(s,s.config.enterMode,null,true);},0);return true;}else return q(s,s.config.shiftEnterMode,true);};function q(s,t,u){u=s.config.forceEnterMode||u;if(s.mode!='wysiwyg')return false;if(!t)t=s.config.enterMode;setTimeout(function(){s.fire('saveSnapshot');if(t==2||s.getSelection().getStartElement().hasAscendant('pre',true))m(s,t,null,u);else n(s,t,null,u);},0);return true;};function r(s){var t=s.getSelection().getRanges();for(var u=t.length-1;u>0;u--)t[u].deleteContents();return t[0];};})();(function(){var l='nbsp,gt,lt,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',m='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',n='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 o(p){var q={},r=[],s={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};p=p.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(x,y){q[s[y]]='&'+y+';';r.push(s[y]);return '';});p=p.split(',');var t=document.createElement('div'),u;t.innerHTML='&'+p.join(';&')+';';u=t.innerHTML;t=null;for(var v=0;v'+t+'',t);}},onClick:function(s){l.focus();l.fire('saveSnapshot');p[s].apply(l.document);setTimeout(function(){l.fire('saveSnapshot');},0);},onRender:function(){l.on('selectionChange',function(s){var t=this.getValue(),u=s.data.path;for(var v in p){if(p[v].checkActive(u)){if(v!=t)this.setValue(v,l.lang.format['tag_'+v]);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(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}}); -if(l.contextMenu){l.contextMenu.addListener(function(p){if(p&&p.hasAscendant('form',true))return{form:2};});l.contextMenu.addListener(function(p){if(p){var q=p.getName();if(q=='select')return{select:2};if(q=='textarea')return{textarea:2};if(q=='input'){var r=p.getAttribute('type');if(r=='text'||r=='password')return{textfield:2};if(r=='button'||r=='submit'||r=='reset')return{button:2};if(r=='checkbox')return{checkbox:2};if(r=='radio')return{radio:2};if(r=='image')return{imagebutton:2};}if(q=='img'&&p.getAttribute('_cke_real_element_type')=='hiddenfield')return{hiddenfield:2};}});}},afterInit:function(l){if(c){var m=l.dataProcessor,n=m&&m.htmlFilter;n&&n.addRules({elements:{input:function(o){var p=o.attributes,q=p.type;if(q=='checkbox'||q=='radio')p.value=='on'&&delete p.value;}}});}},requires:['image']});if(c)h.prototype.hasAttribute=function(l){var o=this;var m=o.$.attributes.getNamedItem(l);if(o.getName()=='input')switch(l){case 'class':return o.$.className.length>0;case 'checked':return!!o.$.checked;case 'value':var n=o.getAttribute('type');if(n=='checkbox'||n=='radio')return o.$.value!='on';break;default:}return!!(m&&m.specified);};(function(){var l={canUndo:false,exec:function(n){n.insertElement(n.document.createElement('hr'));}},m='horizontalrule';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('HorizontalRule',{label:n.lang.horizontalrule,command:m});}});})();(function(){var l=/^[\t\r\n ]*(?: |\xa0)$/,m='{cke_protected}';function n(O){var P=O.children.length,Q=O.children[P-1];while(Q&&Q.type==3&&!e.trim(Q.value))Q=O.children[--P];return Q;};function o(O,P){var Q=O.children,R=n(O);if(R){if((P||!c)&&R.type==1&&R.name=='br')Q.pop();if(R.type==3&&l.test(R.value))Q.pop();}};function p(O){var P=n(O);return!P||P.type==1&&P.name=='br'||O.name=='form'&&P.name=='input';};function q(O){o(O,true);if(p(O))if(c)O.add(new a.htmlParser.text('\xa0'));else O.add(new a.htmlParser.element('br',{}));};function r(O){o(O);if(p(O))O.add(new a.htmlParser.text('\xa0'));};var s=f,t=e.extend({},s.$block,s.$listItem,s.$tableContent);for(var u in t){if(!('br' in s[u]))delete t[u];}delete t.pre;var v={attributeNames:[[/^on/,'_cke_pa_on']]},w={elements:{}};for(u in t)w.elements[u]=q;var x={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^_cke_(saved|pa)_/,''],[/^_cke.*/,''],['hidefocus','']],elements:{$:function(O){var P=O.attributes;if(P){if(P.cke_temp)return false;var Q=['name','href','src'],R;for(var S=0;S]+)))/gi,A=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,B=/([^<]*)<\/cke:encoded>/gi,C=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,D=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,E=/]*?)\/?>(?!\s*<\/cke:\1)/gi;function F(O){return O.replace(z,'$& _cke_saved_$1');};function G(O){return O.replace(A,function(P){return ''+encodeURIComponent(P)+'';});};function H(O){return O.replace(B,function(P,Q){return decodeURIComponent(Q);});};function I(O){return O.replace(C,'$1cke:$2');};function J(O){return O.replace(D,'$1$2');};function K(O){return O.replace(E,'');};function L(O){return O.replace(//g,function(P){return '';});};function M(O){return O.replace(//g,function(P,Q){return decodeURIComponent(Q);});};function N(O,P){var Q=[],R=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,S=[//gi,//gi].concat(P);O=O.replace(//g,function(U){return '';});for(var T=0;T';});O=O.replace(R,function(U,V,W){return ''; -});return O;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(O){var P=O.dataProcessor=new a.htmlDataProcessor(O);P.writer.forceSimpleAmpersand=O.config.forceSimpleAmpersand;P.dataFilter.addRules(v);P.dataFilter.addRules(w);P.htmlFilter.addRules(x);P.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(O){var P=this;P.editor=O;P.writer=new a.htmlWriter();P.dataFilter=new a.htmlParser.filter();P.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(O,P){O=N(O,this.editor.config.protectedSource);O=F(O);O=G(O);O=I(O);O=K(O);var Q=new h('div');Q.setHtml('a'+O);O=Q.getHtml().substr(1);O=J(O);O=H(O);O=M(O);var R=a.htmlParser.fragment.fromHtml(O,P),S=new a.htmlParser.basicWriter();R.writeHtml(S,this.dataFilter);O=S.getHtml(true);O=L(O);return O;},toDataFormat:function(O,P){var Q=this.writer,R=a.htmlParser.fragment.fromHtml(O,P);Q.reset();R.writeHtml(Q,this.htmlFilter);return Q.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement'))return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1},m=d.walker.whitespaces(true),n=d.walker.bookmark(false,true);function o(t,u){t.getCommand(this.name).setState(u);};function p(t){var E=this;var u=t.data.path.elements,v,w,x=t.editor;for(var y=0;yI;C++)H[C].indent+=D;var K=j.list.arrayToList(H,G,null,t.config.enterMode,0);if(this.name=='outdent'){var L;if((L=v.getParent())&&L.is('li')){var M=K.listNode.getChildren(),N=[],O=M.count(),P;for(C=O-1;C>=0;C--){if((P=M.getItem(C))&&P.is&&P.is('li'))N.push(P);}}}if(K)K.listNode.replace(v);if(N&&N.length)for(C=0;C0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');w.indentClassMap={};for(var v=0;v=0;x--){v=t[x].createIterator();v.enlargeBr=r!=2;while(w=v.getNextParagraph()){w.removeAttribute('align');if(u){var y=w.$.className=e.ltrim(w.$.className.replace(z.cssClassRegex,''));if(z.state==2&&!z.isDefaultAlign)w.addClass(u);else if(!y)w.removeAttribute('class');}else if(z.state==2&&!z.isDefaultAlign)w.setStyle('text-align',z.value);else w.removeStyle('text-align');}}p.focus();p.forceNextSelectionCheck();q.selectBookmarks(s);}};j.add('justify',{init:function(p){var q=new o(p,'justifyleft','left'),r=new o(p,'justifycenter','center'),s=new o(p,'justifyright','right'),t=new o(p,'justifyblock','justify');p.addCommand('justifyleft',q);p.addCommand('justifycenter',r);p.addCommand('justifyright',s);p.addCommand('justifyblock',t);p.ui.addButton('JustifyLeft',{label:p.lang.justify.left,command:'justifyleft'});p.ui.addButton('JustifyCenter',{label:p.lang.justify.center,command:'justifycenter'}); -p.ui.addButton('JustifyRight',{label:p.lang.justify.right,command:'justifyright'});p.ui.addButton('JustifyBlock',{label:p.lang.justify.block,command:'justifyblock'});p.on('selectionChange',e.bind(n,q));p.on('selectionChange',e.bind(n,s));p.on('selectionChange',e.bind(n,r));p.on('selectionChange',e.bind(n,t));},requires:['domiterator']});})();e.extend(i,{justifyClasses:null});j.add('keystrokes',{beforeInit:function(l){l.keystrokeHandler=new a.keystrokeHandler(l);l.specialKeys={};},init:function(l){var m=l.config.keystrokes,n=l.config.blockedKeystrokes,o=l.keystrokeHandler.keystrokes,p=l.keystrokeHandler.blockedKeystrokes;for(var q=0;qE[G-1].indent+1){var K=E[G-1].indent+1-E[G].indent,L=E[G].indent;while(E[G]&&E[G].indent>=L){E[G].indent+=K;G++;}G--;}}var M=j.list.arrayToList(E,D,null,B.config.enterMode),N=M.listNode,O,P;function Q(R){if((O=N[R?'getFirst':'getLast']())&&!(O.is&&O.isBlockBoundary())&&(P=C.root[R?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(P.is&&P.isBlockBoundary({br:1})))B.document.createElement('br')[R?'insertBefore':'insertAfter'](O);};Q(true);Q();N.replace(C.root);};function t(B,C){this.name=B;this.type=C;};t.prototype={exec:function(B){B.focus();var C=B.document,D=B.getSelection(),E=D&&D.getRanges();if(!E||E.length<1)return;if(this.state==2){var F=C.getBody();F.trim();if(!F.getFirst()){var G=C.createElement(B.config.enterMode==1?'p':B.config.enterMode==3?'div':'br');G.appendTo(F);E=[new d.range(C)];if(G.is('br')){E[0].setStartBefore(G);E[0].setEndAfter(G);}else E[0].selectNodeContents(G);D.selectRanges(E);}else{var H=E.length==1&&E[0],I=H&&H.getEnclosedNode();if(I&&I.is&&this.type==I.getName())n.call(this,B,1);}}var J=D.createBookmarks(true),K=[],L={};while(E.length>0){H=E.shift();var M=H.getBoundaryNodes(),N=M.startNode,O=M.endNode;if(N.type==1&&N.getName()=='td')H.setStartAt(M.startNode,1);if(O.type==1&&O.getName()=='td')H.setEndAt(M.endNode,2);var P=H.createIterator(),Q;P.forceBrBreak=this.state==2;while(Q=P.getNextParagraph()){var R=new d.elementPath(Q),S=R.elements,T=S.length,U=null,V=false,W=R.blockLimit,X;for(var Y=T-1;Y>=0&&(X=S[Y]);Y--){if(l[X.getName()]&&W.contains(X)){W.removeCustomData('list_group_object');var Z=X.getCustomData('list_group_object');if(Z)Z.contents.push(Q);else{Z={root:X,contents:[Q]};K.push(Z);h.setMarker(L,X,'list_group_object',Z);}V=true;break;}}if(V)continue;var aa=W;if(aa.getCustomData('list_group_object'))aa.getCustomData('list_group_object').contents.push(Q);else{Z={root:aa,contents:[Q]};h.setMarker(L,aa,'list_group_object',Z);K.push(Z);}}}var ab=[];while(K.length>0){Z=K.shift(); -if(this.state==2){if(l[Z.root.getName()])p.call(this,B,Z,L,ab);else r.call(this,B,Z,ab);}else if(this.state==1&&l[Z.root.getName()])s.call(this,B,Z,L);}for(Y=0;Y0)for(var t=s.length-1;t>=0;t--){var u=s[t][0],v=s[t][1];if(v)u.insertBefore(v);else u.appendTo(r);}};function n(r,s){var t=l(r),u={},v=r.$;if(!s){u['class']=v.className||'';v.className='';}u.inline=v.style.cssText||'';if(!s)v.style.cssText='position: static; overflow: visible';m(t);return u;};function o(r,s){var t=l(r),u=r.$;if('class' in s)u.className=s['class'];if('inline' in s)u.style.cssText=s.inline;m(t);};function p(r){if(r.focusManager.hasFocus){r.toolbox.focus();r.focus();}};function q(r){if(!c||b.version>6)return null;var s=h.createFromHtml(''); -return r.append(s,true);};j.add('maximize',{init:function(r){var s=r.lang,t=a.document,u=t.getWindow(),v,w,x,y;function z(){var B=u.getViewPaneSize();y&&y.setStyles({width:B.width+'px',height:B.height+'px'});r.resize(B.width,B.height,null,true);};var A=2;r.addCommand('maximize',{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(){var B=r.container.getChild(1),C=r.getThemeSpace('contents');if(r.mode=='wysiwyg'){var D=r.getSelection();v=D&&D.getRanges();w=u.getScrollPosition();}else{var E=r.textarea.$;v=!c&&[E.selectionStart,E.selectionEnd];w=[E.scrollLeft,E.scrollTop];}if(this.state==2){u.on('resize',z);x=u.getScrollPosition();var F=r.container;while(F=F.getParent()){F.setCustomData('maximize_saved_styles',n(F));F.setStyle('z-index',r.config.baseFloatZIndex-1);}C.setCustomData('maximize_saved_styles',n(C,true));B.setCustomData('maximize_saved_styles',n(B,true));if(c)t.$.documentElement.style.overflow=t.getBody().$.style.overflow='hidden';else t.getBody().setStyles({overflow:'hidden',width:'0px',height:'0px'});c?setTimeout(function(){u.$.scrollTo(0,0);},0):u.$.scrollTo(0,0);var G=u.getViewPaneSize();B.setStyle('position','absolute');B.$.offsetLeft;B.setStyles({'z-index':r.config.baseFloatZIndex-1,left:'0px',top:'0px'});y=q(B);z();var H=B.getDocumentPosition();B.setStyles({left:-1*H.x+'px',top:-1*H.y+'px'});b.gecko&&p(r);B.addClass('cke_maximized');}else if(this.state==1){u.removeListener('resize',z);var I=[C,B];for(var J=0;J ');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();l.fire('saveSnapshot');for(var o,p=0;p0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}l.fire('saveSnapshot');}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});else n();}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js'); -a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true); -if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);}return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=n.config,q=p.baseHref?'':'',r=b.isCustomDomain();if(p.fullPage)o=n.getData().replace(//,'$&'+q).replace(/[^>]*(?=<\/title>)/,n.lang.preview);else{var s=''+''+q+''+n.lang.preview+''+e.buildStyleHtml(n.config.contentsCss)+''+s+n.getData()+'';}var u=640,v=420,w=80;try{var x=window.screen;u=Math.round(x.width*0.8);v=Math.round(x.height*0.7);w=Math.round(x.width*0.1);}catch(A){}var y='';if(r){window._cke_htmlToLoad=o;y='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var z=window.open(y,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+u+',height='+v+',left='+w);if(!r){z.document.open();z.document.write(o);z.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m});}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});l._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=j.removeformat.filter,p=l.getSelection().getRanges();for(var q=0,r;r=p[q];q++){if(r.collapsed)continue;r.enlarge(1);var s=r.createBookmark(),t=s.startNode,u=s.endNode,v=function(y){var z=new d.elementPath(y),A=z.elements; -for(var B=1,C;C=A[B];B++){if(C.equals(z.block)||C.equals(z.blockLimit))break;if(m.test(C.getName())&&o(l,C))y.breakParent(C);}};v(t);v(u);var w=t.getNextSourceNode(true,1);while(w){if(w.equals(u))break;var x=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.getAttribute('_cke_realelement'))&&o(l,w))if(m.test(w.getName()))w.remove(true);else w.removeAttributes(n);w=x;}r.moveToBookmark(s);}l.getSelection().selectRanges(p);}}},filter:function(l,m){var n=l._.removeFormat.filters;for(var o=0;o';}},l,null,100);}}});i.resize_minWidth=750;i.resize_minHeight=250;i.resize_maxWidth=3000;i.resize_maxHeight=3000;i.resize_enabled=true;i.resize_dir='both';(function(){var l={modes:{wysiwyg:1,source:1},exec:function(n){var o=n.element.$.form;if(o)try{o.submit();}catch(p){if(o.submit.click)o.submit.click();}}},m='save';j.add(m,{init:function(n){var o=n.addCommand(m,l); -o.modes={wysiwyg:!!n.element.$.form};n.ui.addButton('Save',{label:n.lang.save,command:m});}});})();(function(){var l='scaytcheck',m='';function n(s,t){var u=false,v;for(v in t){if(t[v]===s||t[v]==s){u=true;break;}}return u;};var o=function(){var s=this,t=function(){var x={};x.srcNodeRef=s.document.getWindow().$.frameElement;x.assocApp='CKEDITOR.'+a.version+'@'+a.revision;x.customerid=s.config.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';x.customDictionaryIds=s.config.scayt_customDictionaryIds||'';x.userDictionaryName=s.config.scayt_userDictionaryName||'';x.sLang=s.config.scayt_sLang||'en_US';x.onLoad=function(){if(!(c&&b.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(s.focusManager.hasFocus&&!p.isControlRestored(s))this.focus();};x.onBeforeChange=function(){if(p.getScayt(s)&&!s.checkDirty())setTimeout(function(){s.resetDirty();});};var y=window.scayt_custom_params;if(typeof y=='object')for(var z in y)x[z]=y[z];if(p.getControlId(s))x.id=p.getControlId(s);var A=new window.scayt(x);A.afterMarkupRemove.push(function(H){new h(H,A.document).mergeSiblings();});var B=p.instances[s.name];if(B){A.sLang=B.sLang;A.option(B.option());A.paused=B.paused;}p.instances[s.name]=A;var C='scaytButton',D=window.scayt.uiTags,E=[];for(var F=0,G=4;F=0){this.setState(0);p.loadEngine(s);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(s){var t=s.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',u='';t=t.split('|');if(t&&t.length)for(var v in t)u+='scayt_'+t[v]+(t.length!=parseInt(v,10)+1?',':'');if(s.config.scayt_contextMenuOntop)s.config.menu_groups=u+','+s.config.menu_groups;else s.config.menu_groups=s.config.menu_groups+','+u;},init:function(s){var t={},u={},v=s.addCommand(l,r);a.dialog.add(l,a.getUrl(this.path+'dialogs/options.js'));var w=s.config.scayt_uiTabs||'1,1,1',x=[];w=w.split(',');for(var y=0,z=3;y 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('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10); -if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(v){return function(w,x){v.apply(this,arguments);var y=parseInt(this.getValue(),10);x[!y||y<=0?'addClass':'removeClass'](l);};});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[]; -function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w0)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;M0&&Q.$.rows[L]||Q.$.parentNode);for(N=J.length;N>=0;N--){if(J[N])r(J[N]);}return K;}else if(G instanceof h){Q=G.getAscendant('table');if(Q.$.rows.length==1)Q.remove();else G.remove();}return 0;};function s(G,H){var I=G.getStartElement(),J=I.getAscendant('td',true)||I.getAscendant('th',true);if(!J)return;var K=J.getAscendant('table'),L=J.$.cellIndex;for(var M=0;M1){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; -J--){if(H[J])u(H[J]);}return I;}else if(G instanceof h){var K=G.getAscendant('table');if(!K)return null;var L=G.$.cellIndex;for(J=K.$.rows.length-1;J>=0;J--){var M=new h(K.$.rows[J]);if(!L&&M.$.cells.length==1){r(M);continue;}if(M.$.cells[L])M.$.removeChild(M.$.cells[L]);}}return null;};function v(G,H){var I=G.getStartElement(),J=I.getAscendant('td',true)||I.getAscendant('th',true);if(!J)return;var K=J.clone();if(!c)K.appendBogus();if(H)K.insertBefore(J);else K.insertAfter(J);};function w(G){if(G instanceof d.selection){var H=n(G),I=H[0]&&H[0].getAscendant('table'),J=o(H);for(var K=H.length-1;K>=0;K--)w(H[K]);if(J)y(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 x(G){var H=G.getBogus();H&&H.remove();G.trim();};function y(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 z(G){var H=G.$.rows,I=-1,J=[];for(var K=0;K=Q)M.removeAttribute('rowSpan');else M.$.rowSpan=W;if(W>=P)M.removeAttribute('colSpan');else M.$.colSpan=X;var ai=new d.nodeList(N.$.rows),aj=ai.count();for(aa=aj-1;aa>=0;aa--){var ak=ai.getItem(aa);if(!ak.$.cells.length){ak.remove();aj++;continue;}}return M;}else return W*X==Z;};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=z(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=z(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)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);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={editorFocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusNext(true,o.tabIndex);}},n={exec:function(o){o.container.focusPrevious(true,o.tabIndex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabSpaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keyCode==9){o.insertHtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keyCode;if(s==9&&!q){r.cancel();o.execCommand('blur');}if(s==2000+9){o.execCommand('blurBack');r.cancel();}});o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||us){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(ts)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js')); -n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q0)a.scriptLoader.load(p,o);else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];){if(q.focus){q.focus();return;}}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){var r,s,t,u=n.lang.dir=='rtl';switch(q){case u?37:39:case 9:do{r=p.next;if(!r){s=p.toolbar.next;t=s&&s.items.length;while(t===0){s=s.next;t=s&&s.items.length;}if(s)r=s.items[0];}p=r;}while(p&&!p.focus)if(p)p.focus();else n.toolbox.focus();return false;case u?39:37:case 2000+9:do{r=p.previous;if(!r){s=p.toolbar.previous;t=s&&s.items.length;while(t===0){s=s.previous;t=s&&s.items.length;}if(s)r=s.items[t-1];}p=r;}while(p&&!p.focus)if(p)p.focus();else{var v=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;v[v.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q='cke_'+e.getNextNumber(),r=['');if(n.config.toolbarCanCollapse){var F=e.addFunction(function(){n.execCommand('toolbarCollapse');});n.on('destroy',function(){e.removeFunction(F);});var G='cke_'+e.getNextNumber();n.addCommand('toolbarCollapse',{exec:function(H){var I=a.document.getById(G),J=I.getPrevious(),K=H.getThemeSpace('contents'),L=J.getParent(),M=parseInt(K.$.style.height,10),N=L.$.offsetHeight,O=!J.isVisible();if(!O){J.hide();I.addClass('cke_toolbox_collapser_min');I.setAttribute('title',H.lang.toolbarExpand);}else{J.show();I.removeClass('cke_toolbox_collapser_min');I.setAttribute('title',H.lang.toolbarCollapse);}I.getFirst().setText(O?'▲':'◀');var P=L.$.offsetHeight-N;K.setStyle('height',M-P+'px');H.fire('resize');},modes:{wysiwyg:1,source:1}});r.push('','','');}p.data.html+=r.join('');}});n.addCommand('toolbarFocus',m.toolbarFocus);}});})();k.separator={render:function(l,m){m.push('');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'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];i.toolbar='Full'; -i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(r){var s=new n(r),t=r.addCommand('undo',{exec:function(){if(s.undo()){r.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),u=r.addCommand('redo',{exec:function(){if(s.redo()){r.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});s.onChange=function(){t.setState(s.undoable()?2:0);u.setState(s.redoable()?2:0);};function v(w){if(s.enabled&&w.data.command.canUndo!==false)s.save();};r.on('beforeCommandExec',v);r.on('afterCommandExec',v);r.on('saveSnapshot',function(){s.save();});r.on('contentDom',function(){r.document.on('keydown',function(w){if(!w.data.$.ctrlKey&&!w.data.$.metaKey)s.type(w);});});r.on('beforeModeUnload',function(){r.mode=='wysiwyg'&&s.save(true);});r.on('mode',function(){s.enabled=r.mode=='wysiwyg';s.onChange();});r.ui.addButton('Undo',{label:r.lang.undo,command:'undo'});r.ui.addButton('Redo',{label:r.lang.redo,command:'redo'});r.resetUndo=function(){s.reset();r.fire('saveSnapshot');};r.on('updateSnapshot',function(){if(s.currentImage&&new l(r).equals(s.currentImage))setTimeout(function(){s.update();},0);});}});j.undo={};var l=j.undo.Image=function(r){this.editor=r;var s=r.getSnapshot(),t=s&&r.getSelection();c&&s&&(s=s.replace(/\s+_cke_expando=".*?"/g,''));this.contents=s;this.bookmarks=t&&t.createBookmarks2(true);},m=/\b(?:href|src|name)="[^"]*?"/gi;l.prototype={equals:function(r,s){var t=this.contents,u=r.contents;if(c&&(b.ie7Compat||b.ie6Compat)){t=t.replace(m,'');u=u.replace(m,'');}if(t!=u)return false;if(s)return true;var v=this.bookmarks,w=r.bookmarks;if(v||w){if(!v||!w||v.length!=w.length)return false;for(var x=0;x25){this.save(false,null,false);this.modifiersCount=1;}}else if(!x){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var r=this;r.lastKeystroke=0;r.snapshots=[];r.index=-1;r.limit=r.editor.config.undoStackSize;r.currentImage=null;r.hasUndo=false;r.hasRedo=false;r.resetType();},resetType:function(){var r=this;r.typing=false;delete r.lastKeystroke;r.typesCount=0;r.modifiersCount=0;},fireChange:function(){var r=this;r.hasUndo=!!r.getNextImage(true);r.hasRedo=!!r.getNextImage(false);r.resetType();r.onChange();},save:function(r,s,t){var v=this;var u=v.snapshots;if(!s)s=new l(v.editor);if(s.contents===false)return false;if(v.currentImage&&s.equals(v.currentImage,r))return false;u.splice(v.index+1,u.length-v.index-1);if(u.length==v.limit)u.shift();v.index=u.push(s)-1;v.currentImage=s;if(t!==false)v.fireChange();return true;},restoreImage:function(r){var t=this;t.editor.loadSnapshot(r.contents);if(r.bookmarks)t.editor.getSelection().selectBookmarks(r.bookmarks);else if(c){var s=t.editor.document.getBody().$.createTextRange();s.collapse(true);s.select();}t.index=r.index;t.update();t.fireChange();},getNextImage:function(r){var w=this;var s=w.snapshots,t=w.currentImage,u,v;if(t)if(r)for(v=w.index-1;v>=0;v--){u=s[v];if(!t.equals(u,true)){u.index=v;return u;}}else for(v=w.index+1;v]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\1>)?\s*(?=$|<\/body>)/gi;function n(x){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var y=this.getSelection(),z=x.data;if(this.dataProcessor)z=this.dataProcessor.toHtml(z);if(c){var A=y.isLocked;if(A)y.unlock();var B=y.getNative();if(B.type=='Control')B.clear();B.createRange().pasteHTML(z); -if(A)this.getSelection().lock();}else this.document.$.execCommand('inserthtml',false,z);e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function o(x){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var y=x.data,z=y.getName(),A=f.$block[z],B=this.getSelection(),C=B.getRanges(),D=B.isLocked;if(D)B.unlock();var E,F,G,H;for(var I=C.length-1;I>=0;I--){E=C[I];E.deleteContents();F=!I&&y||y.clone(true);var J,K;if(A)while((J=E.getCommonAncestor(false,true))&&(K=f[J.getName()])&&!(K&&K[z])){if(J.getName() in f.span)E.splitElement(J);else if(E.checkStartOfBlock()&&E.checkEndOfBlock()){E.setStartBefore(J);E.collapse(true);J.remove();}else E.splitBlock();}E.insertNode(F);if(!G)G=F;}E.moveToPosition(G,4);var L=G.getNextSourceNode(true);if(L&&L.type==1)E.moveToElementEditStart(L);B.selectRanges([E]);if(D)this.getSelection().lock();e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function p(x){if(!x.checkDirty())setTimeout(function(){x.resetDirty();});};var q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true);function s(x){return q(x)&&r(x);};function t(x){return x.type==3&&e.trim(x.getText()).match(/^(?: |\xa0)$/);};function u(x){if(x.isLocked){x.unlock();setTimeout(function(){x.lock();},0);}};function v(x){return x.getOuterHtml().match(m);};q=d.walker.whitespaces(true);function w(x){var y=x.editor,z=x.data.path,A=z.blockLimit,B=x.data.selection,C=B.getRanges()[0],D=y.document.getBody(),E=y.config.enterMode;if(E!=2&&C.collapsed&&A.getName()=='body'&&!z.block){y.fire('updateSnapshot');p(y);c&&u(B);var F=C.fixBlock(true,y.config.enterMode==3?'div':'p');if(c){var G=F.getFirst(s);G&&t(G)&&G.remove();}if(v(F)){var H=F.getPrevious(q),I=F.getNext(q);if(H&&H.getName&&!(H.getName() in l)&&v(H)&&C.moveToElementEditStart(H)||I&&I.getName&&!(I.getName() in l)&&v(I)&&C.moveToElementEditStart(I))F.remove();}C.select();if(!c)y.selectionChange();}var J=new d.range(y.document),K=new d.walker(J);J.selectNodeContents(D);K.evaluator=function(M){return M.type==1&&M.getName() in l;};K.guard=function(M,N){return!(M.type==3&&q(M)||N);};if(K.previous()){y.fire('updateSnapshot');p(y);c&&u(B);var L;if(E!=2)L=D.append(new h(E==1?'p':'div'));else L=D;if(!c)L.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(x){var y=x.config.enterMode!=2?x.config.enterMode==3?'div':'p':false,z=x.lang.editorTitle.replace('%1',x.name),A;x.on('editingBlockReady',function(){var D,E,F,G,H,I,J=b.isCustomDomain(),K=function(N){if(E)E.remove(); -var O='document.open();'+(J?'document.domain="'+document.domain+'";':'')+'document.close();';E=h.createFromHtml('');E.on('load',function(P){H=1;P.removeListener();var Q=E.getFrameDocument().$;Q.open('text/html','replace');Q.write(N);Q.close();});D.append(E);};A=e.addFunction(M);var L='';function M(N){if(!H)return;H=0;x.fire('ariaWidget',E);var O=N.document,P=O.body,Q=O.getElementById('cke_actscrpt');Q.parentNode.removeChild(Q);P.spellcheck=!x.config.disableNativeSpellChecker;if(c){P.hideFocus=true;P.disabled=true;P.contentEditable=true;P.removeAttribute('disabled');}else{if(b.gecko&&!P.childNodes.length)setTimeout(function(){p(x);var V=O.$.createEvent('KeyEvents');V.initKeyEvent('keypress',true,true,N.$,false,false,false,false,0,32);O.$.dispatchEvent(V);O.createElement('br',{attributes:{_moz_editor_bogus_node:'TRUE',_moz_dirty:''}}).replace(O.getBody().getFirst());var W=new d.range(O);W.setStartAt(new h(P),1);W.select();},0);O.designMode='on';}try{O.execCommand('enableObjectResizing',false,!x.config.disableObjectResizing);}catch(V){}try{O.execCommand('enableInlineTableEditing',false,!x.config.disableNativeTableHandles);}catch(W){}N=x.window=new d.window(N);O=x.document=new g(O);if(!(c||b.opera))O.on('mousedown',function(X){var Y=X.data.getTarget();if(Y.is('img','hr','input','textarea','select'))x.getSelection().selectElement(Y);});if(b.webkit){O.on('click',function(X){if(X.data.getTarget().is('input','select'))X.data.preventDefault();});O.on('mouseup',function(X){if(X.data.getTarget().is('input','textarea'))X.data.preventDefault();});}if(c&&O.$.compatMode=='CSS1Compat'){var R=O.getDocumentElement();R.on('mousedown',function(X){if(X.data.getTarget().equals(R))C.focus();});}var S=c||b.webkit?N:O;S.on('blur',function(){x.focusManager.blur();});S.on('focus',function(){x.focusManager.focus();});var T=x.keystrokeHandler;if(T)T.attach(O);if(c){O.on('keydown',function(X){var Y=X.data.getKeystroke();if(Y in {8:1,46:1}){var Z=x.getSelection(),aa=Z.getSelectedElement();if(aa){x.fire('saveSnapshot');var ab=Z.getRanges()[0].createBookmark();aa.remove();Z.selectBookmarks([ab]); -x.fire('saveSnapshot');X.data.preventDefault();}}});if(O.$.compatMode=='CSS1Compat'){var U={33:1,34:1};O.on('keydown',function(X){if(X.data.getKeystroke() in U)setTimeout(function(){x.getSelection().scrollIntoView();},0);});}}if(x.contextMenu)x.contextMenu.addTarget(O,x.config.browserContextMenuOnCtrl!==false);setTimeout(function(){x.fire('contentDom');if(I){x.mode='wysiwyg';x.fire('mode');I=false;}F=false;if(G){x.focus();G=false;}setTimeout(function(){x.fire('dataReady');},0);if(c)setTimeout(function(){if(x.document){var X=x.document.$.body;X.runtimeStyle.marginBottom='0px';X.runtimeStyle.marginBottom='';}},1000);},0);};x.addMode('wysiwyg',{load:function(N,O,P){D=N;if(c&&b.quirks)N.setStyle('position','relative');x.mayBeDirty=true;I=true;if(P)this.loadSnapshotData(O);else this.loadData(O);},loadData:function(N){F=true;var O=x.config,P=O.fullPage,Q=O.docType,R='';!P&&(R=e.buildStyleHtml(x.config.contentsCss)+R);var S=O.baseHref?'':'';if(P)N=N.replace(/]*>/i,function(T){x.docType=Q=T;return '';});if(x.dataProcessor)N=x.dataProcessor.toHtml(N,y);if(P){if(!/]/.test(N))N=''+N;if(!/]/.test(N))N=''+N+'';if(!/]/.test(N))N=N.replace(/]*>/,'$&');else if(!/]/.test(N))N=N.replace(/]*>/,'$&');S&&(N=N.replace(//,'$&'+S));N=N.replace(/<\/head\s*>/,R+'$&');N=Q+N;}else N=O.docType+''+''+z+''+''+S+R+''+''+N+'';N+=L;this.onDispose();K(N);},getData:function(){var N=x.config,O=N.fullPage,P=O&&x.docType,Q=E.getFrameDocument(),R=O?Q.getDocumentElement().getOuterHtml():Q.getBody().getHtml();if(x.dataProcessor)R=x.dataProcessor.toDataFormat(R,y);if(N.ignoreEmptyParagraph)R=R.replace(m,'');if(P)R=P+'\n'+R;return R;},getSnapshotData:function(){return E.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(N){E.getFrameDocument().getBody().setHtml(N);},onDispose:function(){if(!x.document)return;x.document.getDocumentElement().clearCustomData();x.document.getBody().clearCustomData();x.window.clearCustomData();x.document.clearCustomData();E.clearCustomData();},unload:function(N){this.onDispose();x.window=x.document=E=D=G=null; -x.fire('contentDomUnload');},focus:function(){if(F)G=true;else if(x.window){x.window.focus();x.selectionChange();}}});x.on('insertHtml',n,null,null,20);x.on('insertElement',o,null,null,20);x.on('selectionChange',w,null,null,1);});var B;x.on('contentDom',function(){var D=x.document.getElementsByTag('title').getItem(0);D.setAttribute('_cke_title',x.document.$.title);x.document.$.title=z;});if(c){var C;x.on('uiReady',function(){C=x.container.append(h.createFromHtml(''));C.on('focus',function(){x.focus();});});x.on('destroy',function(){e.removeFunction(A);C.clearCustomData();});}}});if(b.gecko)(function(){var x=document.body;if(!x)window.addEventListener('load',arguments.callee,false);else{var y=x.getAttribute('onpageshow');x.setAttribute('onpageshow',(y?y+';':'')+'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(l){var m='checkspell',n=l.addCommand(m,new a.dialogCommand(m));n.modes={wysiwyg:!b.opera&&document.domain==window.location.hostname};l.ui.addButton('SpellChecker',{label:l.lang.spellCheck.toolbar,command:m});a.dialog.add(m,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(){function l(M){return!!this._.tabs[M][0].$.offsetHeight;};function m(){var Q=this;var M=Q._.currentTabId,N=Q._.tabIdList.length,O=e.indexOf(Q._.tabIdList,M)+N;for(var P=O-1;P>O-N;P--){if(l.call(Q,Q._.tabIdList[P%N]))return Q._.tabIdList[P%N];}return null;};function n(){var Q=this;var M=Q._.currentTabId,N=Q._.tabIdList.length,O=e.indexOf(Q._.tabIdList,M);for(var P=O+1;P1){R._.tabBarMode=true;R._.tabs[R._.currentTabId][0].focus();V=1;}else if((ad==37||ad==39)&&R._.tabBarMode){ag=ad==(ae?39:37)?m.call(R):n.call(R);R.selectPage(ag);R._.tabs[ag][0].focus();V=1;}else if((ad==13||ad==32)&&R._.tabBarMode){ah.selectPage(ah._.currentTabId);ah._.tabBarMode=false;ah._.currentFocusIndex=-1;U(true);V=1;}if(V){ac.stop(); -ac.data.preventDefault();}};function X(ac){V&&ac.data.preventDefault();};var Y=this._.element;this.on('show',function(){Y.on('keydown',W,this,null,0);if(b.opera||b.gecko&&b.mac)Y.on('keypress',X,this);});this.on('hide',function(){Y.removeListener('keydown',W);if(b.opera||b.gecko&&b.mac)Y.removeListener('keypress',X);});this.on('iframeAdded',function(ac){var ad=new g(ac.data.iframe.$.contentWindow.document);ad.on('keydown',W,this,null,0);});this.on('show',function(){var ag=this;T();if(M.config.dialog_startupFocusTab&&R._.tabIdList.length>1){R._.tabBarMode=true;R._.tabs[R._.currentTabId][0].focus();}else if(!ag._.hasFocus){ag._.currentFocusIndex=-1;if(O.onFocus){var ac=O.onFocus.call(ag);ac&&ac.focus();}else U(true);if(ag._.editor.mode=='wysiwyg'&&c){var ad=M.document.$.selection,ae=ad.createRange();if(ae)if(ae.parentElement&&ae.parentElement().ownerDocument==M.document.$||ae.item&&ae.item(0).ownerDocument==M.document.$){var af=document.body.createTextRange();af.moveToElementText(ag.getElement().getFirst().$);af.collapse(true);af.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(ac){var ad=this.getElement(),ae=ad.getFirst();ae.remove();ae.appendTo(ad);},this);v(this);w(this);new d.text(O.title,a.document).appendTo(this.parts.title);for(var Z=0;Z0?N:0)+'px',top:(O>0?O:0)+'px'});};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){var M=this._.editor;if(M.mode=='wysiwyg'&&c){var N=M.getSelection();N&&N.lock();}var O=this._.element,P=this.definition;if(!(O.getParent()&&O.getParent().equals(a.document.getBody())))O.appendTo(a.document.getBody());else O.setStyle('display','block');if(b.gecko&&b.version<10900){var Q=this.parts.dialog;Q.setStyle('position','absolute');setTimeout(function(){Q.setStyle('position','fixed');},0);}this.resize(P.minWidth,P.minHeight);this.selectPage(this.definition.contents[0].id);this.reset();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;A(this._.editor);O.on('keydown',E);O.on(b.opera?'keypress':'keyup',F);for(var R in {keyup:1,keydown:1,keypress:1})O.on(R,L);}else{this._.parentDialog=a.dialog._.currentTop;var S=this._.parentDialog.getElement().getFirst();S.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}G(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;e.setTimeout(function(){var T=a.document.getWindow().getViewPaneSize(),U=this.getSize();this.move((T.width-P.minWidth)/2,(T.height-U.height)/2);this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(V){V.setInitValue&&V.setInitValue();});},100,this);},foreach:function(M){var P=this;for(var N in P._.contents)for(var O in P._.contents[N])M(P._.contents[N][O]);return P;},reset:(function(){var M=function(N){if(N.reset)N.reset(); -};return function(){this.foreach(M);return this;};})(),setupContent:function(){var M=arguments;this.foreach(function(N){if(N.setup)N.setup.apply(N,M);});},commitContent:function(){var M=arguments;this.foreach(function(N){if(N.commit)N.commit.apply(N,M);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var M=this._.element;M.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');H(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)B();else{var N=this._.parentDialog.getElement().getFirst();N.setStyle('z-index',parseInt(N.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;M.removeListener('keydown',E);M.removeListener(b.opera?'keypress':'keyup',F);for(var O in {keyup:1,keydown:1,keypress:1})M.removeListener(O,L);var P=this._.editor;P.focus();if(P.mode=='wysiwyg'&&c){var Q=P.getSelection();Q&&Q.unlock(true);}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(R){R.resetInitValue&&R.resetInitValue();});},addPage:function(M){var Y=this;var N=[],O=M.label?' title="'+e.htmlEncode(M.label)+'"':'',P=M.elements,Q=a.dialog._.uiElementBuilders.vbox.build(Y,{type:'vbox',className:'cke_dialog_page_contents',children:M.elements,expand:!!M.expand,padding:M.padding,style:M.style||'width: 100%; height: 100%;'},N),R=h.createFromHtml(N.join(''));R.setAttribute('role','tabpanel');var S=b,T=M.id+'_'+e.getNextNumber(),U=h.createFromHtml(['0?' cke_last':'cke_first',O,!!M.hidden?' style="display:none"':'',' id="',T,'"',S.gecko&&S.version>=10900&&!S.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',M.label,''].join(''));R.setAttribute('aria-labelledby',T);Y._.tabs[M.id]=[U,R];Y._.tabIdList.push(M.id);!M.hidden&&Y._.pageCount++;Y._.lastTab=U;Y.updateStyle();var V=Y._.contents[M.id]={},W,X=Q.getChild();while(W=X.shift()){V[W.id]=W;if(typeof W.getChild=='function')X.push.apply(X,W.getChild());}R.setAttribute('name',M.id);R.appendTo(Y.parts.contents);U.unselectable();Y.parts.tabs.append(U);if(M.accessKey){G(Y,Y,'CTRL+'+M.accessKey,J,I);Y._.accessKeyMap['CTRL+'+M.accessKey]=M.id;}},selectPage:function(M){var R=this;for(var N in R._.tabs){var O=R._.tabs[N][0],P=R._.tabs[N][1];if(N!=M){O.removeClass('cke_dialog_tab_selected');P.hide(); -}P.setAttribute('aria-hidden',N!=M);}var Q=R._.tabs[M];Q[0].addClass('cke_dialog_tab_selected');Q[1].show();R._.currentTabId=M;R._.currentTabIndex=e.indexOf(R._.tabIdList,M);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(M){var O=this;var N=O._.tabs[M]&&O._.tabs[M][0];if(!N||O._.pageCount==1)return;else if(M==O._.currentTabId)O.selectPage(m.call(O));N.hide();O._.pageCount--;O.updateStyle();},showPage:function(M){var O=this;var N=O._.tabs[M]&&O._.tabs[M][0];if(!N)return;N.show();O._.pageCount++;O.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(M,N){var O=this._.contents[M];return O&&O[N];},getValueOf:function(M,N){return this.getContentElement(M,N).getValue();},setValueOf:function(M,N,O){return this.getContentElement(M,N).setValue(O);},getButton:function(M){return this._.buttons[M];},click:function(M){return this._.buttons[M].click();},disableButton:function(M){return this._.buttons[M].disable();},enableButton:function(M){return this._.buttons[M].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(M,N){var P=this;if(typeof N=='undefined'){N=P._.focusList.length;P._.focusList.push(new o(P,M,N));}else{P._.focusList.splice(N,0,new o(P,M,N));for(var O=N+1;OX.width-W.width-R)ac=X.width-W.width+S[1];else ac=O.x;if(O.y+S[0]X.height-W.height-R)ad=X.height-W.height+S[2];else ad=O.y;M.move(ac,ad);V.data.preventDefault();};function U(V){a.document.removeListener('mousemove',T);a.document.removeListener('mouseup',U);if(b.ie6Compat){var W=z.getChild(0).getFrameDocument();W.removeListener('mousemove',T);W.removeListener('mouseup',U);}};M.parts.title.on('mousedown',function(V){M._.updateSize=true;N={x:V.data.$.screenX,y:V.data.$.screenY};a.document.on('mousemove',T);a.document.on('mouseup',U);O=M.getPosition();if(b.ie6Compat){var W=z.getChild(0).getFrameDocument(); -W.on('mousemove',T);W.on('mouseup',U);}V.data.preventDefault();},M);};function w(M){var N=M.definition,O=N.minWidth||0,P=N.minHeight||0,Q=N.resizable,R=M.getParentEditor().skin.margins||[0,0,0,0];function S(ad,ae){ad.y+=ae;};function T(ad,ae){ad.x2+=ae;};function U(ad,ae){ad.y2+=ae;};function V(ad,ae){ad.x+=ae;};var W=null,X=null,Y=M._.editor.config.magnetDistance,Z=['tl','t','tr','l','r','bl','b','br'];function aa(ad){var ae=ad.listenerData.part,af=M.getSize();X=M.getPosition();e.extend(X,{x2:X.x+af.width,y2:X.y+af.height});W={x:ad.data.$.screenX,y:ad.data.$.screenY};a.document.on('mousemove',ab,M,{part:ae});a.document.on('mouseup',ac,M,{part:ae});if(b.ie6Compat){var ag=z.getChild(0).getFrameDocument();ag.on('mousemove',ab,M,{part:ae});ag.on('mouseup',ac,M,{part:ae});}ad.data.preventDefault();};function ab(ad){var ae=ad.data.$.screenX,af=ad.data.$.screenY,ag=ae-W.x,ah=af-W.y,ai=a.document.getWindow().getViewPaneSize(),aj=ad.listenerData.part;if(aj.search('t')!=-1)S(X,ah);if(aj.search('l')!=-1)V(X,ag);if(aj.search('b')!=-1)U(X,ah);if(aj.search('r')!=-1)T(X,ag);W={x:ae,y:af};var ak,al,am,an;if(X.x+R[3]ai.width-Y)am=ai.width+R[1];else if(aj.search('r')!=-1&&X.x2-X.xai.height-Y)an=ai.height+R[2];else if(aj.search('b')!=-1&&X.y2-X.y'];if(b.ie6Compat){var U=b.isCustomDomain(),V="";T.push('');}T.push('');S=h.createFromHtml(T.join(''));S.setOpacity(P!=undefined?P:0.5);S.appendTo(a.document.getBody());y[R]=S;}else S.show();z=S;var W=function(){var Z=N.getViewPaneSize();S.setStyles({width:Z.width+'px',height:Z.height+'px'});},X=function(){var Z=N.getScrollPosition(),aa=a.dialog._.currentTop;S.setStyles({left:Z.x+'px',top:Z.y+'px'});do{var ab=aa.getPosition();aa.move(ab.x,ab.y);}while(aa=aa._.parentDialog)};x=W;N.on('resize',W);W();if(b.ie6Compat){var Y=function(){X();arguments.callee.prevScrollHandler.apply(this,arguments);};N.$.setTimeout(function(){Y.prevScrollHandler=window.onscroll||(function(){});window.onscroll=Y;},0);X();}};function B(){if(!z)return;var M=a.document.getWindow();z.hide();M.removeListener('resize',x);if(b.ie6Compat)M.$.setTimeout(function(){var N=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=N||null;},0);x=null;};function C(){for(var M in y)y[M].remove();y={};};var D={},E=function(M){var N=M.data.$.ctrlKey||M.data.$.metaKey,O=M.data.$.altKey,P=M.data.$.shiftKey,Q=String.fromCharCode(M.data.$.keyCode),R=D[(N?'CTRL+':'')+(O?'ALT+':'')+(P?'SHIFT+':'')+Q];if(!R||!R.length)return;R=R[R.length-1];R.keydown&&R.keydown.call(R.uiElement,R.dialog,R.key);M.data.preventDefault();},F=function(M){var N=M.data.$.ctrlKey||M.data.$.metaKey,O=M.data.$.altKey,P=M.data.$.shiftKey,Q=String.fromCharCode(M.data.$.keyCode),R=D[(N?'CTRL+':'')+(O?'ALT+':'')+(P?'SHIFT+':'')+Q];if(!R||!R.length)return;R=R[R.length-1];if(R.keyup){R.keyup.call(R.uiElement,R.dialog,R.key);M.data.preventDefault();}},G=function(M,N,O,P,Q){var R=D[O]||(D[O]=[]);R.push({uiElement:M,dialog:N,key:O,keyup:Q||M.accessKeyUp,keydown:P||M.accessKeyDown});},H=function(M){for(var N in D){var O=D[N];for(var P=O.length-1;P>=0;P--){if(O[P].dialog==M||O[P].uiElement==M)O.splice(P,1);}if(O.length===0)delete D[N];}},I=function(M,N){if(M._.accessKeyMap[N])M.selectPage(M._.accessKeyMap[N]);},J=function(M,N){},K={27:1,13:1},L=function(M){if(M.data.getKeystroke() in K)M.data.stopPropagation();};(function(){k.dialog={uiElement:function(M,N,O,P,Q,R,S){if(arguments.length<4)return;var T=(P.call?P(N):P)||'div',U=['<',T,' '],V=(Q&&Q.call?Q(N):Q)||{},W=(R&&R.call?R(N):R)||{},X=(S&&S.call?S.call(this,M,N):S)||'',Y=this.domId=W.id||e.getNextNumber()+'_uiElement',Z=this.id=N.id,aa;W.id=Y;var ab={};if(N.type)ab['cke_dialog_ui_'+N.type]=1;if(N.className)ab[N.className]=1; -var ac=W['class']&&W['class'].split?W['class'].split(' '):[];for(aa=0;aa=0;aa--){if(ae[aa]==='')ae.splice(aa,1);}if(ae.length>0)W.style=(W.style?W.style+'; ':'')+ae.join('; ');for(aa in W)U.push(aa+'="'+e.htmlEncode(W[aa])+'" ');U.push('>',X,'');O.push(U.join(''));(this._||(this._={})).dialog=M;if(typeof N.isChanged=='boolean')this.isChanged=function(){return N.isChanged;};if(typeof N.isChanged=='function')this.isChanged=N.isChanged;a.event.implementOn(this);this.registerEvents(N);if(this.accessKeyUp&&this.accessKeyDown&&N.accessKey)G(this,M,'CTRL+'+N.accessKey);var af=this;M.on('load',function(){if(af.getInputElement())af.getInputElement().on('focus',function(){M._.tabBarMode=false;M._.hasFocus=true;af.fire('focus');},af);});if(this.keyboardFocusable){this.tabIndex=N.tabIndex||0;this.focusIndex=M._.focusList.push(this)-1;this.on('focus',function(){M._.currentFocusIndex=af.focusIndex;});}e.extend(this,N);},hbox:function(M,N,O,P,Q){if(arguments.length<4)return;this._||(this._={});var R=this._.children=N,S=Q&&Q.widths||null,T=Q&&Q.height||null,U={},V,W=function(){var Y=[''];for(V=0;V0)Y.push('style="'+aa.join('; ')+'" ');Y.push('>',O[V],'');}Y.push('');return Y.join('');},X={role:'presentation'};Q&&Q.align&&(X.align=Q.align);k.dialog.uiElement.call(this,M,Q||{type:'hbox'},P,'table',U,X,W);},vbox:function(M,N,O,P,Q){if(arguments.length<3)return;this._||(this._={});var R=this._.children=N,S=Q&&Q.width||null,T=Q&&Q.heights||null,U=function(){var V=['');for(var W=0;W');}V.push('
0)V.push('style="',X.join('; '),'" ');V.push(' class="cke_dialog_ui_vbox_child">',O[W],'
');return V.join('');};k.dialog.uiElement.call(this,M,Q||{type:'vbox'},P,'div',null,{role:'presentation'},U);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(M){this.getInputElement().setValue(M);this.fire('change',{value:M});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var P=this;var M=P.getInputElement(),N=M,O;while((N=N.getParent())&&N.$.className.search('cke_dialog_page_contents')==-1){}if(!N)return P;O=N.getAttribute('name');if(P._.dialog._.currentTabId!=O)P._.dialog.selectPage(O);return P;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(M){var N=/^on([A-Z]\w+)/,O,P=function(R,S,T,U){S.on('load',function(){R.getInputElement().on(T,U,R);});};for(var Q in M){if(!(O=Q.match(N)))continue;if(this.eventProcessors[Q])this.eventProcessors[Q].call(this,this._.dialog,M[Q]);else P(this,this._.dialog,O[1].toLowerCase(),M[Q]);}return this;},eventProcessors:{onLoad:function(M,N){M.on('load',N,this);},onShow:function(M,N){M.on('show',N,this);},onHide:function(M,N){M.on('hide',N,this);}},accessKeyDown:function(M,N){this.focus();},accessKeyUp:function(M,N){},disable:function(){var M=this.getInputElement();M.setAttribute('disabled','true');M.addClass('cke_disabled');},enable:function(){var M=this.getInputElement();M.removeAttribute('disabled');M.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(M){var N=this;if(arguments.length<1)return N._.children.concat();if(!M.splice)M=[M];if(M.length<2)return N._.children[M[0]];else return N._.children[M[0]]&&N._.children[M[0]].getChild?N._.children[M[0]].getChild(M.slice(1,M.length)):null; -}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var M={build:function(N,O,P){var Q=O.children,R,S=[],T=[];for(var U=0;U',N.name,'');return O.join('');}};a.style.getStyleText=function(N){var O=N._ST;if(O)return O;O=N.styles;var P=N.attributes&&N.attributes.style||'',Q='';if(P.length)P=P.replace(n,';');for(var R in O){var S=O[R],T=(R+':'+S).replace(n,';');if(S=='inherit')Q+=T;else P+=T;}if(P.length)P=J(P);P+=Q;return N._ST=P;};function o(N){var ak=this;var O=N.document;if(N.collapsed){var P=C(ak,O);N.insertNode(P);N.moveToPosition(P,2);return;}var Q=ak.element,R=ak._.definition,S,T=f[Q]||(S=true,f.span),U=N.createBookmark();N.enlarge(1);N.trim();var V=N.createBookmark(),W=V.startNode,X=V.endNode,Y=W,Z;while(Y){var aa=false;if(Y.equals(X)){Y=null;aa=true;}else{var ab=Y.type,ac=ab==1?Y.getName():null;if(ac&&Y.getAttribute('_fck_bookmark')){Y=Y.getNextSourceNode(true);continue;}if(!ac||T[ac]&&(Y.getPosition(X)|4|0|8)==4+0+8&&(!R.childRule||R.childRule(Y))){var ad=Y.getParent();if(ad&&((ad.getDtd()||f.span)[Q]||S)&&(!R.parentRule||R.parentRule(ad))){if(!Z&&(!ac||!f.$removeEmpty[ac]||(Y.getPosition(X)|4|0|8)==4+0+8)){Z=new d.range(O);Z.setStartBefore(Y);}if(ab==3||ab==1&&!Y.getChildCount()){var ae=Y,af;while(!ae.$.nextSibling&&(af=ae.getParent(),T[af.getName()])&&(af.getPosition(W)|2|0|8)==2+0+8&&(!R.childRule||R.childRule(af)))ae=af;Z.setEndAfter(ae);if(!ae.$.nextSibling)aa=true;}}else aa=true;}else aa=true;Y=Y.getNextSourceNode();}if(aa&&Z&&!Z.collapsed){var ag=C(ak,O),ah=Z.getCommonAncestor();while(ag&&ah){if(ah.getName()==Q){for(var ai in R.attributes){if(ag.getAttribute(ai)==ah.getAttribute(ai))ag.removeAttribute(ai);}for(var aj in R.styles){if(ag.getStyle(aj)==ah.getStyle(aj))ag.removeStyle(aj);}if(!ag.hasAttributes()){ag=null;break;}}ah=ah.getParent();}if(ag){Z.extractContents().appendTo(ag);z(ak,ag);Z.insertNode(ag);ag.mergeSiblings();if(!c)ag.$.normalize();}Z=null;}}W.remove();X.remove();N.moveToBookmark(U);N.shrink(a.SHRINK_TEXT);};function p(N){N.enlarge(1);var O=N.createBookmark(),P=O.startNode;if(N.collapsed){var Q=new d.elementPath(P.getParent()),R;for(var S=0,T;S'+P+'';else N.setHtml(P);O.remove();};function u(N){var O=/(\S\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,P=N.getName(),Q=v(N.getOuterHtml(),O,function(S,T,U){return T+''+U+'
';}),R=[];Q.replace(/([\s\S]*?)<\/pre>/gi,function(S,T){R.push(T);});return R;};function v(N,O,P){var Q='',R='';N=N.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(S,T,U){T&&(Q=T);U&&(R=U);return '';});return Q+N.replace(O,P)+R;};function w(N,O){var P=new d.documentFragment(O.getDocument());for(var Q=0;Q');R=R.replace(/[ \t]{2,}/g,function(T){return e.repeat(' ',T.length-1)+' ';});var S=O.clone();S.setHtml(R);P.append(S);}return P;};function x(N,O){var P=N.getHtml();
-P=v(P,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');P=P.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');P=P.replace(/([ \t\n\r]+| )/g,' ');P=P.replace(/]*>/gi,'\n');if(c){var Q=N.getDocument().createElement('div');Q.append(O);O.$.outerHTML='
'+P+'
';O=Q.getFirst().remove();}else O.setHtml(P);return O;};function y(N,O){var P=N._.definition,Q=e.extend({},P.attributes,H(N)[O.getName()]),R=P.styles,S=e.isEmpty(Q)&&e.isEmpty(R);for(var T in Q){if((T=='class'||N._.definition.fullMatch)&&O.getAttribute(T)!=I(T,Q[T]))continue;S=O.hasAttribute(T);O.removeAttribute(T);}for(var U in R){if(N._.definition.fullMatch&&O.getStyle(U)!=I(U,R[U],true))continue;S=S||!!O.getStyle(U);O.removeStyle(U);}S&&B(O);};function z(N,O){var P=N._.definition,Q=P.attributes,R=P.styles,S=H(N),T=O.getElementsByTag(N.element);for(var U=T.count();--U>=0;)y(N,T.getItem(U));for(var V in S){if(V!=N.element){T=O.getElementsByTag(V);for(U=T.count()-1;U>=0;U--){var W=T.getItem(U);A(W,S[V]);}}}};function A(N,O){var P=O&&O.attributes;if(P)for(var Q=0;Q0)G+=(E.$.offsetWidth||0)-(E.$.clientWidth||0);G+=4;E.setStyle('width',G+'px');u.element.addClass('cke_frameLoaded');var H=u.element.$.scrollHeight;if(c&&b.quirks&&H>0)H+=(E.$.offsetHeight||0)-(E.$.clientHeight||0);E.setStyle('height',H+'px');t._.currentBlock.element.setStyle('display','none').removeStyle('display');}else E.removeStyle('height');var I=t.element,J=I.getWindow(),K=J.getScrollPosition(),L=J.getViewPaneSize(),M={height:I.$.offsetHeight,width:I.$.offsetWidth};if(z?A<0:A+M.width>L.width+K.x)A+=M.width*(z?1:-1);if(B+M.height>L.height+K.y)B-=M.height;v.setStyles({top:B+'px',left:A+'px',opacity:'1'});},this);t.isLoaded?D():t.onLoad=D;e.setTimeout(function(){w.$.contentWindow.focus();this.allowBlur(true);},0,this);},0,this);this.visible=1;if(this.onShow)this.onShow.call(this);m=false;},hide:function(){var o=this;if(o.visible&&(!o.onHide||o.onHide.call(o)!==true)){o.hideChild();o.element.setStyle('display','none');o.visible=0;}},allowBlur:function(o){var p=this._.panel;if(o!=undefined)p.allowBlur=o;return p.allowBlur;},showAsChild:function(o,p,q,r,s,t){if(this._.activeChild==o&&o._.panel._.offsetParentId==q.getId())return;this.hideChild();o.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=o;this._.focused=false;o.showBlock(p,q,r,s,t);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){o.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var o=this._.activeChild;if(o){delete o.onHide;delete this._.activeChild;o.hide();}}}});a.on('instanceDestroyed',function(){var o=e.isEmpty(a.instances);for(var p in l){var q=l[p];if(o)q.destroy();else q.element.hide();}o&&(l={});});})();j.add('menu',{beforeInit:function(l){var m=l.config.menu_groups.split(','),n=l._.menuGroups={},o=l._.menuItems={};for(var p=0;p'],y=q.length,z=y&&q[0].group;for(var A=0;A');z=B.group;}B.render(this,A,x);}x.push('');t.setHtml(x.join(''));if(this.parent)this.parent._.panel.showAsChild(s,this.id,m,n,o,p); -else s.showBlock(this.id,m,n,o,p);r.fire('menuShow',[s]);},hide:function(){this._.panel&&this._.panel.hide();}}});function l(m){m.sort(function(n,o){if(n.groupo.group)return 1;return n.ordero.order?1:0;});};})();a.menuItem=e.createClass({$:function(l,m,n){var o=this;e.extend(o,n,{order:0,className:'cke_button_'+m});o.group=l._.menuGroups[o.group];o.editor=l;o.name=m;},proto:{render:function(l,m,n){var u=this;var o=l.id+String(m),p=typeof u.state=='undefined'?2:u.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=u.label;if(u.className)q+=' '+u.className;var s=u.getItems;n.push(''+'');if(s)n.push('','&#',u.editor.lang.dir=='rtl'?'9668':'9658',';','');n.push(r,'');}}});i.menu_subMenuDelay=400;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 l=function(n,o){return n._.modes&&n._.modes[o||n.mode];},m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;l(n).loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){o();n.removeListener('mode',arguments.callee);});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(l(n).getData()); -m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=l(n).getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)l(n).loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);});});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=l(this);o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=l(this,n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.focus=function(){var n=l(this);if(n)n.focus();};})();i.startupMode='wysiwyg';i.startupFocus=false;i.editingBlock=true;(function(){function l(){var v=this;try{var s=v.getSelection();if(!s)return;var t=s.getStartElement(),u=new d.elementPath(t);if(!u.compare(v._.selectionPreviousPath)){v._.selectionPreviousPath=u;v.fire('selectionChange',{selection:s,path:u,element:t});}}catch(w){}};var m,n;function o(){n=true;if(m)return;p.call(this);m=e.setTimeout(p,200,this);};function p(){m=null;if(n){e.setTimeout(l,0,this);n=false;}};var q={modes:{wysiwyg:1,source:1},exec:function(s){switch(s.mode){case 'wysiwyg':s.document.$.execCommand('SelectAll',false,null);break;case 'source':var t=s.textarea.$;if(c)t.createTextRange().execCommand('SelectAll');else{t.selectionStart=0;t.selectionEnd=t.value.length;}t.focus();}},canUndo:false};j.add('selection',{init:function(s){s.on('contentDom',function(){var t=s.document,u=t.getBody();if(c){var v,w;u.on('focusin',function(z){if(z.data.$.srcElement.nodeName!='BODY')return;if(v){try{v.select();}catch(A){}v=null;}});u.on('focus',function(){w=true;y();});u.on('beforedeactivate',function(z){if(z.data.$.toElement)return;w=false;});if(c&&b.version<8)t.getWindow().on('blur',function(z){s.document.$.selection.empty();});u.on('mousedown',x);u.on('mouseup',function(){w=true;setTimeout(function(){y(true);},0);});u.on('keydown',x);u.on('keyup',function(){w=true;y();});t.on('selectionchange',y);function x(){w=false;};function y(z){if(w){var A=s.document,B=s.getSelection(),C=B&&B.getNative();if(z&&C&&C.type=='None')if(!A.$.queryCommandEnabled('InsertImage')){e.setTimeout(y,50,this,true); -return;}var D;if(C.type=='Text'&&(D=C.createRange().parentElement().nodeName.toLowerCase())&&D in {input:1,textarea:1})return;v=C&&B.getRanges()[0];o.call(s);}};}else{t.on('mouseup',o,s);t.on('keyup',o,s);}});s.addCommand('selectAll',q);s.ui.addButton('SelectAll',{label:s.lang.selectAll,command:'selectAll'});s.selectionChange=o;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var s=new d.selection(this);return!s||s.isInvalid?null:s;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(s){var v=this;var t=s.getCustomData('cke_locked_selection');if(t)return t;v.document=s;v.isLocked=false;v._={cache:{}};if(c){var u=v.getNative().createRange();if(!u||u.item&&u.item(0).ownerDocument!=v.document.$||u.parentElement&&u.parentElement().ownerDocument!=v.document.$)v.isInvalid=true;}return v;};var r={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 s=this._.cache;if(s.type)return s.type;var t=1;try{var u=this.getNative(),v=u.type;if(v=='Text')t=2;if(v=='Control')t=3;if(u.createRange().parentElement)t=2;}catch(w){}return s.type=t;}:function(){var s=this._.cache;if(s.type)return s.type;var t=2,u=this.getNative();if(!u)t=1;else if(u.rangeCount==1){var v=u.getRangeAt(0),w=v.startContainer;if(w==v.endContainer&&w.nodeType==1&&v.endOffset-v.startOffset==1&&r[w.childNodes[v.startOffset].nodeName.toLowerCase()])t=3;}return s.type=t;},getRanges:c?(function(){var s=function(t,u){t=t.duplicate();t.collapse(u);var v=t.parentElement(),w=v.childNodes,x;for(var y=0;y0)break;else if(!A||B==1&&A==-1)return{container:v,offset:y};else if(!B)return{container:v,offset:y+1};x=null;}}if(!x){x=t.duplicate();x.moveToElementText(v);x.collapse(false);}x.setEndPoint('StartToStart',t);var C=x.text.replace(/(\r\n|\r)/g,'\n').length;try{while(C>0)C-=w[--y].nodeValue.length; -}catch(D){C=0;}if(C===0)return{container:v,offset:y};else return{container:w[y],offset:-C};};return function(){var E=this;var t=E._.cache;if(t.ranges)return t.ranges;var u=E.getNative(),v=u&&u.createRange(),w=E.getType(),x;if(!u)return[];if(w==2){x=new d.range(E.document);var y=s(v,true);x.setStart(new d.node(y.container),y.offset);y=s(v);x.setEnd(new d.node(y.container),y.offset);return t.ranges=[x];}else if(w==3){var z=E._.cache.ranges=[];for(var A=0;A=0){r.collapse(true);p.setEnd(r.endContainer.$,r.endOffset);}else throw s;}var q=r.document.getSelection().getNative();q.removeAllRanges();q.addRange(p);};})();(function(){var l={elements:{$:function(m){var n=m.attributes,o=n&&n._cke_realelement,p=o&&new a.htmlParser.fragment.fromHtml(decodeURIComponent(o)),q=p&&p.children[0];if(q&&m.attributes._cke_resizable){var r=m.attributes.style;if(r){var s=/(?:^|\s)width\s*:\s*(\d+)/i.exec(r),t=s&&s[1];s=/(?:^|\s)height\s*:\s*(\d+)/i.exec(r);var u=s&&s[1];if(t)q.attributes.width=t;if(u)q.attributes.height=u;}}return q;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(m){var n=m.dataProcessor,o=n&&n.htmlFilter;if(o)o.addRules(l);}});})();a.editor.prototype.createFakeElement=function(l,m,n,o){var p=this.lang.fakeobjects,q={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(l.getOuterHtml()),_cke_real_node_type:l.type,alt:p[n]||p.unknown,align:l.getAttribute('align')||''};if(n)q._cke_real_element_type=n;if(o)q._cke_resizable=o;return this.document.createElement('img',{attributes:q});};a.editor.prototype.createFakeParserElement=function(l,m,n,o){var p=this.lang.fakeobjects,q,r=new a.htmlParser.basicWriter();l.writeHtml(r);q=r.getHtml();var s={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(q),_cke_real_node_type:l.type,alt:p[n]||p.unknown,align:l.attributes.align||''};if(n)s._cke_real_element_type=n; -if(o)s._cke_resizable=o;return new a.htmlParser.element('img',s);};a.editor.prototype.restoreRealElement=function(l){if(l.getAttribute('_cke_real_node_type')!=1)return null;return h.createFromHtml(decodeURIComponent(l.getAttribute('_cke_realelement')),this.document);};j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(l){l.ui.addHandler(3,k.richCombo.handler);}});a.UI_RICHCOMBO=3;k.richCombo=e.createClass({$:function(l){var n=this;e.extend(n,l,{title:l.label,modes:{wysiwyg:1}});var m=n.panel||{};delete n.panel;n.id=e.getNextNumber();n.document=m&&m.parent&&m.parent.getDocument()||a.document;m.className=(m.className||'')+' cke_rcombopanel';m.block={multiSelect:m.multiSelect,attributes:m.attributes};n._={panelDefinition:m,items:{},state:2};},statics:{handler:{create:function(l){return new k.richCombo(l);}}},proto:{renderHtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var n=b,o='cke_'+this.id,p=e.addFunction(function(s){var v=this;var t=v._;if(t.state==0)return;v.createPanel(l);if(t.on){t.panel.hide();return;}if(!t.committed){t.list.commit();t.committed=1;}var u=v.getValue();if(u)t.list.mark(u);else t.list.unmarkAll();t.panel.showBlock(v.id,new h(s),4);},this),q={id:o,combo:this,focus:function(){var s=a.document.getById(o).getChild(1);s.focus();},clickFn:p};l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);var r=e.addFunction(function(s,t){s=new d.event(s);var u=s.getKeystroke();switch(u){case 13:case 32:case 40:e.callFunction(p,t);break;default:q.onkey(q,u);}s.preventDefault();});q.keyDownFn=r;m.push('','','',this.label,'','=10900&&!n.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',o,'_label" aria-describedby="',o,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)m.push(' onkeypress="return false;"');if(b.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="CKEDITOR.tools.callFunction( ',r,', event, this );" onclick="CKEDITOR.tools.callFunction(',p,', this); return false;">'+this.label+''+''+''+(b.hc?'':'')+''+''+''+''); -if(this.onRender)this.onRender();return q;},createPanel:function(l){if(this._.panel)return;var m=this._.panelDefinition,n=this._.panelDefinition.block,o=m.parent||a.document.getBody(),p=new k.floatPanel(l,o,m),q=p.addListBlock(this.id,n),r=this;p.onShow=function(){if(r.className)this.element.getFirst().addClass(r.className+'_panel');r.setState(1);q.focus(!r.multiSelect&&r.getValue());r._.on=1;if(r.onOpen)r.onOpen();};p.onHide=function(){if(r.className)this.element.getFirst().removeClass(r.className+'_panel');r.setState(2);r._.on=0;if(r.onClose)r.onClose();};p.onEscape=function(){p.hide();r.document.getById('cke_'+r.id).getFirst().getNext().focus();};q.onClick=function(s,t){r.document.getWindow().focus();if(r.onClick)r.onClick.call(r,s,t);if(t)r.setValue(s,r._.items[s]);else r.setValue('');p.hide();};this._.panel=p;this._.list=q;p.getBlock(this.id).onHide=function(){r._.on=0;r.setState(2);};if(this.init)this.init();},setValue:function(l,m){var o=this;o._.value=l;var n=o.document.getById('cke_'+o.id+'_text');if(!(l||m)){m=o.label;n.addClass('cke_inline_label');}else n.removeClass('cke_inline_label');n.setHtml(typeof m!='undefined'?m:l);},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(l){this._.list.mark(l);},hideItem:function(l){this._.list.hideItem(l);},hideGroup:function(l){this._.list.hideGroup(l);},showAll:function(){this._.list.showAll();},add:function(l,m,n){this._.items[l]=n||l;this._.list.add(l,m,n);},startGroup:function(l){this._.list.startGroup(l);},commit:function(){this._.list.commit();},setState:function(l){var m=this;if(m._.state==l)return;m.document.getById('cke_'+m.id).setState(l);m._.state=l;}}});k.prototype.addRichCombo=function(l,m){this.add(l,3,m);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var n=this;n.base();n.indentationChars='\t';n.selfClosingEnd=' />';n.lineBreakChars='\n';n.forceSimpleAmpersand=false;n.sortAttributes=true;n._.indent=false;n._.indentation='';n._.rules={};var l=f;for(var m in e.extend({},l.$nonBodyContent,l.$block,l.$listItem,l.$tableContent))n.setRules(m,{indent:true,breakBeforeOpen:true,breakAfterOpen:true,breakBeforeClose:!l[m]['#'],breakAfterClose:true});n.setRules('br',{breakAfterOpen:true});n.setRules('title',{indent:false,breakAfterOpen:false});n.setRules('style',{indent:false,breakBeforeClose:true});n.setRules('pre',{indent:false});},proto:{openTag:function(l,m){var o=this;var n=o._.rules[l];if(o._.indent)o.indentation(); -else if(n&&n.breakBeforeOpen){o.lineBreak();o.indentation();}o._.output.push('<',l);},openTagClose:function(l,m){var o=this;var n=o._.rules[l];if(m)o._.output.push(o.selfClosingEnd);else{o._.output.push('>');if(n&&n.indent)o._.indentation+=o.indentationChars;}if(n&&n.breakAfterOpen)o.lineBreak();},attribute:function(l,m){if(typeof m=='string'){this.forceSimpleAmpersand&&(m=m.replace(/&/g,'&'));m=e.htmlEncodeAttr(m);}this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){var n=this;var m=n._.rules[l];if(m&&m.indent)n._.indentation=n._.indentation.substr(n.indentationChars.length);if(n._.indent)n.indentation();else if(m&&m.breakBeforeClose){n.lineBreak();n.indentation();}n._.output.push('');if(m&&m.breakAfterClose)n.lineBreak();},text:function(l){if(this._.indent){this.indentation();l=e.ltrim(l);}this._.output.push(l);},comment:function(l){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var l=this;if(l._.output.length>0)l._.output.push(l.lineBreakChars);l._.indent=true;},indentation:function(){this._.output.push(this._.indentation);this._.indent=false;},setRules:function(l,m){var n=this._.rules[l];if(n)e.extend(n,m,true);else this._.rules[l]=m;}}});j.add('menubutton',{requires:['button','contextmenu'],beforeInit:function(l){l.ui.addHandler(5,k.menuButton.handler);}});a.UI_MENUBUTTON=5;(function(){var l=function(m){var n=this._;if(n.state===0)return;n.previousState=n.state;var o=n.menu;if(!o){o=n.menu=new j.contextMenu(m);o.definition.panel.attributes['aria-label']=m.lang.common.options;o.onHide=e.bind(function(){this.setState(n.previousState);},this);if(this.onMenu)o.addListener(this.onMenu);}if(n.on){o.hide();return;}this.setState(1);o.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(m){var n=m.panel;delete m.panel;this.base(m);this.hasArrow=true;this.click=l;},statics:{handler:{create:function(m){return new k.menuButton(m);}}}});})();j.add('dialogui');(function(){var l=function(t){var w=this;w._||(w._={});w._['default']=w._.initValue=t['default']||'';w._.required=t.required||false;var u=[w._];for(var v=1;v',u.label,'','');else{var B={type:'hbox',widths:u.widths,padding:0,children:[{type:'html',html:'
';else N.setHtml(P);O.remove();};function u(N){var O=/(\S\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,P=N.getName(),Q=v(N.getOuterHtml(),O,function(S,T,U){return T+''+U+'
';
+}),R=[];Q.replace(/([\s\S]*?)<\/pre>/gi,function(S,T){R.push(T);});return R;};function v(N,O,P){var Q='',R='';N=N.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(S,T,U){T&&(Q=T);U&&(R=U);return '';});return Q+N.replace(O,P)+R;};function w(N,O){var P=new d.documentFragment(O.getDocument());for(var Q=0;Q');R=R.replace(/[ \t]{2,}/g,function(T){return e.repeat(' ',T.length-1)+' ';});var S=O.clone();S.setHtml(R);P.append(S);}return P;};function x(N,O){var P=N.getHtml();P=v(P,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');P=P.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');P=P.replace(/([ \t\n\r]+| )/g,' ');P=P.replace(/]*>/gi,'\n');if(c){var Q=N.getDocument().createElement('div');Q.append(O);O.$.outerHTML='
'+P+'
';O=Q.getFirst().remove();}else O.setHtml(P);return O;};function y(N,O){var P=N._.definition,Q=e.extend({},P.attributes,H(N)[O.getName()]),R=P.styles,S=e.isEmpty(Q)&&e.isEmpty(R);for(var T in Q){if((T=='class'||N._.definition.fullMatch)&&O.getAttribute(T)!=I(T,Q[T]))continue;S=O.hasAttribute(T);O.removeAttribute(T);}for(var U in R){if(N._.definition.fullMatch&&O.getStyle(U)!=I(U,R[U],true))continue;S=S||!!O.getStyle(U);O.removeStyle(U);}S&&B(O);};function z(N,O){var P=N._.definition,Q=P.attributes,R=P.styles,S=H(N),T=O.getElementsByTag(N.element);for(var U=T.count();--U>=0;)y(N,T.getItem(U));for(var V in S){if(V!=N.element){T=O.getElementsByTag(V);for(U=T.count()-1;U>=0;U--){var W=T.getItem(U);A(W,S[V]);}}}};function A(N,O){var P=O&&O.attributes;if(P)for(var Q=0;Q0)G+=(E.$.offsetWidth||0)-(E.$.clientWidth||0);G+=4;E.setStyle('width',G+'px');u.element.addClass('cke_frameLoaded');var H=u.element.$.scrollHeight;if(c&&b.quirks&&H>0)H+=(E.$.offsetHeight||0)-(E.$.clientHeight||0);E.setStyle('height',H+'px');t._.currentBlock.element.setStyle('display','none').removeStyle('display');}else E.removeStyle('height');var I=t.element,J=I.getWindow(),K=J.getScrollPosition(),L=J.getViewPaneSize(),M={height:I.$.offsetHeight,width:I.$.offsetWidth};if(z?A<0:A+M.width>L.width+K.x)A+=M.width*(z?1:-1);if(B+M.height>L.height+K.y)B-=M.height;v.setStyles({top:B+'px',left:A+'px',opacity:'1'});},this);t.isLoaded?D():t.onLoad=D;e.setTimeout(function(){w.$.contentWindow.focus();this.allowBlur(true);},0,this);},0,this);this.visible=1;if(this.onShow)this.onShow.call(this);m=false;},hide:function(){var o=this;if(o.visible&&(!o.onHide||o.onHide.call(o)!==true)){o.hideChild();o.element.setStyle('display','none');o.visible=0;}},allowBlur:function(o){var p=this._.panel;if(o!=undefined)p.allowBlur=o;return p.allowBlur;},showAsChild:function(o,p,q,r,s,t){if(this._.activeChild==o&&o._.panel._.offsetParentId==q.getId())return;this.hideChild();o.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=o; +this._.focused=false;o.showBlock(p,q,r,s,t);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){o.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var o=this._.activeChild;if(o){delete o.onHide;delete this._.activeChild;o.hide();}}}});a.on('instanceDestroyed',function(){var o=e.isEmpty(a.instances);for(var p in l){var q=l[p];if(o)q.destroy();else q.element.hide();}o&&(l={});});})();j.add('menu',{beforeInit:function(l){var m=l.config.menu_groups.split(','),n=l._.menuGroups={},o=l._.menuItems={};for(var p=0;p'],y=q.length,z=y&&q[0].group;for(var A=0;A');z=B.group;}B.render(this,A,x);}x.push('');t.setHtml(x.join(''));if(this.parent)this.parent._.panel.showAsChild(s,this.id,m,n,o,p);else s.showBlock(this.id,m,n,o,p);r.fire('menuShow',[s]);},hide:function(){this._.panel&&this._.panel.hide();}}});function l(m){m.sort(function(n,o){if(n.groupo.group)return 1;return n.ordero.order?1:0;});};})();a.menuItem=e.createClass({$:function(l,m,n){var o=this;e.extend(o,n,{order:0,className:'cke_button_'+m});o.group=l._.menuGroups[o.group];o.editor=l;o.name=m;},proto:{render:function(l,m,n){var u=this;var o=l.id+String(m),p=typeof u.state=='undefined'?2:u.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=u.label;if(u.className)q+=' '+u.className;var s=u.getItems;n.push(''+'');if(s)n.push('','&#',u.editor.lang.dir=='rtl'?'9668':'9658',';','');n.push(r,'');}}});i.menu_subMenuDelay=400;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 l=function(n,o){return n._.modes&&n._.modes[o||n.mode];},m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;l(n).loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){o();n.removeListener('mode',arguments.callee);});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(l(n).getData());m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=l(n).getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)l(n).loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();b.webkit&&n.container.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);});});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=l(this);o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=l(this,n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.focus=function(){var n=l(this);if(n)n.focus();};})();i.startupMode='wysiwyg';i.startupFocus=false;i.editingBlock=true;(function(){function l(){var v=this;try{var s=v.getSelection();if(!s)return;var t=s.getStartElement(),u=new d.elementPath(t);if(!u.compare(v._.selectionPreviousPath)){v._.selectionPreviousPath=u;v.fire('selectionChange',{selection:s,path:u,element:t});}}catch(w){}};var m,n;function o(){n=true;if(m)return;p.call(this);m=e.setTimeout(p,200,this);};function p(){m=null;if(n){e.setTimeout(l,0,this);n=false;}};var q={modes:{wysiwyg:1,source:1},exec:function(s){switch(s.mode){case 'wysiwyg':s.document.$.execCommand('SelectAll',false,null);break;case 'source':var t=s.textarea.$;if(c)t.createTextRange().execCommand('SelectAll');else{t.selectionStart=0;t.selectionEnd=t.value.length;}t.focus();}},canUndo:false};j.add('selection',{init:function(s){s.on('contentDom',function(){var t=s.document,u=t.getBody(); +if(c){var v,w;u.on('focusin',function(z){if(z.data.$.srcElement.nodeName!='BODY')return;if(v){try{v.select();}catch(A){}v=null;}});u.on('focus',function(){w=true;y();});u.on('beforedeactivate',function(z){if(z.data.$.toElement)return;w=false;});if(c&&b.version<8)t.getWindow().on('blur',function(z){s.document.$.selection.empty();});u.on('mousedown',x);u.on('mouseup',function(){w=true;setTimeout(function(){y(true);},0);});u.on('keydown',x);u.on('keyup',function(){w=true;y();});t.on('selectionchange',y);function x(){w=false;};function y(z){if(w){var A=s.document,B=s.getSelection(),C=B&&B.getNative();if(z&&C&&C.type=='None')if(!A.$.queryCommandEnabled('InsertImage')){e.setTimeout(y,50,this,true);return;}var D;if(C.type=='Text'&&(D=C.createRange().parentElement().nodeName.toLowerCase())&&D in {input:1,textarea:1})return;v=C&&B.getRanges()[0];o.call(s);}};}else{t.on('mouseup',o,s);t.on('keyup',o,s);}});s.addCommand('selectAll',q);s.ui.addButton('SelectAll',{label:s.lang.selectAll,command:'selectAll'});s.selectionChange=o;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var s=new d.selection(this);return!s||s.isInvalid?null:s;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(s){var v=this;var t=s.getCustomData('cke_locked_selection');if(t)return t;v.document=s;v.isLocked=false;v._={cache:{}};if(c){var u=v.getNative().createRange();if(!u||u.item&&u.item(0).ownerDocument!=v.document.$||u.parentElement&&u.parentElement().ownerDocument!=v.document.$)v.isInvalid=true;}return v;};var r={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 s=this._.cache;if(s.type)return s.type;var t=1;try{var u=this.getNative(),v=u.type;if(v=='Text')t=2;if(v=='Control')t=3;if(u.createRange().parentElement)t=2;}catch(w){}return s.type=t;}:function(){var s=this._.cache;if(s.type)return s.type;var t=2,u=this.getNative();if(!u)t=1;else if(u.rangeCount==1){var v=u.getRangeAt(0),w=v.startContainer;if(w==v.endContainer&&w.nodeType==1&&v.endOffset-v.startOffset==1&&r[w.childNodes[v.startOffset].nodeName.toLowerCase()])t=3; +}return s.type=t;},getRanges:c?(function(){var s=function(t,u){t=t.duplicate();t.collapse(u);var v=t.parentElement(),w=v.childNodes,x;for(var y=0;y0)break;else if(!A||B==1&&A==-1)return{container:v,offset:y};else if(!B)return{container:v,offset:y+1};x=null;}}if(!x){x=t.duplicate();x.moveToElementText(v);x.collapse(false);}x.setEndPoint('StartToStart',t);var C=x.text.replace(/(\r\n|\r)/g,'\n').length;try{while(C>0)C-=w[--y].nodeValue.length;}catch(D){C=0;}if(C===0)return{container:v,offset:y};else return{container:w[y],offset:-C};};return function(){var E=this;var t=E._.cache;if(t.ranges)return t.ranges;var u=E.getNative(),v=u&&u.createRange(),w=E.getType(),x;if(!u)return[];if(w==2){x=new d.range(E.document);var y=s(v,true);x.setStart(new d.node(y.container),y.offset);y=s(v);x.setEnd(new d.node(y.container),y.offset);return t.ranges=[x];}else if(w==3){var z=E._.cache.ranges=[];for(var A=0;A=0){r.collapse(true);p.setEnd(r.endContainer.$,r.endOffset);}else throw s;}var q=r.document.getSelection().getNative();q.removeAllRanges();q.addRange(p);};})();(function(){var l={elements:{$:function(m){var n=m.attributes,o=n&&n._cke_realelement,p=o&&new a.htmlParser.fragment.fromHtml(decodeURIComponent(o)),q=p&&p.children[0];if(q&&m.attributes._cke_resizable){var r=m.attributes.style;if(r){var s=/(?:^|\s)width\s*:\s*(\d+)/i.exec(r),t=s&&s[1];s=/(?:^|\s)height\s*:\s*(\d+)/i.exec(r);var u=s&&s[1];if(t)q.attributes.width=t;if(u)q.attributes.height=u;}}return q;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(m){var n=m.dataProcessor,o=n&&n.htmlFilter;if(o)o.addRules(l);}});})();a.editor.prototype.createFakeElement=function(l,m,n,o){var p=this.lang.fakeobjects,q={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(l.getOuterHtml()),_cke_real_node_type:l.type,alt:p[n]||p.unknown,align:l.getAttribute('align')||''}; +if(n)q._cke_real_element_type=n;if(o)q._cke_resizable=o;return this.document.createElement('img',{attributes:q});};a.editor.prototype.createFakeParserElement=function(l,m,n,o){var p=this.lang.fakeobjects,q,r=new a.htmlParser.basicWriter();l.writeHtml(r);q=r.getHtml();var s={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(q),_cke_real_node_type:l.type,alt:p[n]||p.unknown,align:l.attributes.align||''};if(n)s._cke_real_element_type=n;if(o)s._cke_resizable=o;return new a.htmlParser.element('img',s);};a.editor.prototype.restoreRealElement=function(l){if(l.getAttribute('_cke_real_node_type')!=1)return null;return h.createFromHtml(decodeURIComponent(l.getAttribute('_cke_realelement')),this.document);};j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(l){l.ui.addHandler(3,k.richCombo.handler);}});a.UI_RICHCOMBO=3;k.richCombo=e.createClass({$:function(l){var n=this;e.extend(n,l,{title:l.label,modes:{wysiwyg:1}});var m=n.panel||{};delete n.panel;n.id=e.getNextNumber();n.document=m&&m.parent&&m.parent.getDocument()||a.document;m.className=(m.className||'')+' cke_rcombopanel';m.block={multiSelect:m.multiSelect,attributes:m.attributes};n._={panelDefinition:m,items:{},state:2};},statics:{handler:{create:function(l){return new k.richCombo(l);}}},proto:{renderHtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var n=b,o='cke_'+this.id,p=e.addFunction(function(s){var v=this;var t=v._;if(t.state==0)return;v.createPanel(l);if(t.on){t.panel.hide();return;}if(!t.committed){t.list.commit();t.committed=1;}var u=v.getValue();if(u)t.list.mark(u);else t.list.unmarkAll();t.panel.showBlock(v.id,new h(s),4);},this),q={id:o,combo:this,focus:function(){var s=a.document.getById(o).getChild(1);s.focus();},clickFn:p};l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);var r=e.addFunction(function(s,t){s=new d.event(s);var u=s.getKeystroke();switch(u){case 13:case 32:case 40:e.callFunction(p,t);break;default:q.onkey(q,u);}s.preventDefault();});q.keyDownFn=r;m.push('','','',this.label,'','=10900&&!n.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',o,'_label" aria-describedby="',o,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)m.push(' onkeypress="return false;"'); +if(b.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="CKEDITOR.tools.callFunction( ',r,', event, this );" onclick="CKEDITOR.tools.callFunction(',p,', this); return false;">'+this.label+''+''+''+(b.hc?'':'')+''+''+''+'');if(this.onRender)this.onRender();return q;},createPanel:function(l){if(this._.panel)return;var m=this._.panelDefinition,n=this._.panelDefinition.block,o=m.parent||a.document.getBody(),p=new k.floatPanel(l,o,m),q=p.addListBlock(this.id,n),r=this;p.onShow=function(){if(r.className)this.element.getFirst().addClass(r.className+'_panel');r.setState(1);q.focus(!r.multiSelect&&r.getValue());r._.on=1;if(r.onOpen)r.onOpen();};p.onHide=function(){if(r.className)this.element.getFirst().removeClass(r.className+'_panel');r.setState(2);r._.on=0;if(r.onClose)r.onClose();};p.onEscape=function(){p.hide();r.document.getById('cke_'+r.id).getFirst().getNext().focus();};q.onClick=function(s,t){r.document.getWindow().focus();if(r.onClick)r.onClick.call(r,s,t);if(t)r.setValue(s,r._.items[s]);else r.setValue('');p.hide();};this._.panel=p;this._.list=q;p.getBlock(this.id).onHide=function(){r._.on=0;r.setState(2);};if(this.init)this.init();},setValue:function(l,m){var o=this;o._.value=l;var n=o.document.getById('cke_'+o.id+'_text');if(!(l||m)){m=o.label;n.addClass('cke_inline_label');}else n.removeClass('cke_inline_label');n.setHtml(typeof m!='undefined'?m:l);},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(l){this._.list.mark(l);},hideItem:function(l){this._.list.hideItem(l);},hideGroup:function(l){this._.list.hideGroup(l);},showAll:function(){this._.list.showAll();},add:function(l,m,n){this._.items[l]=n||l;this._.list.add(l,m,n);},startGroup:function(l){this._.list.startGroup(l);},commit:function(){this._.list.commit();},setState:function(l){var m=this;if(m._.state==l)return;m.document.getById('cke_'+m.id).setState(l);m._.state=l;}}});k.prototype.addRichCombo=function(l,m){this.add(l,3,m);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var n=this;n.base();n.indentationChars='\t';n.selfClosingEnd=' />';n.lineBreakChars='\n';n.forceSimpleAmpersand=false;n.sortAttributes=true;n._.indent=false;n._.indentation='';n._.rules={};var l=f;for(var m in e.extend({},l.$nonBodyContent,l.$block,l.$listItem,l.$tableContent))n.setRules(m,{indent:true,breakBeforeOpen:true,breakAfterOpen:true,breakBeforeClose:!l[m]['#'],breakAfterClose:true}); +n.setRules('br',{breakAfterOpen:true});n.setRules('title',{indent:false,breakAfterOpen:false});n.setRules('style',{indent:false,breakBeforeClose:true});n.setRules('pre',{indent:false});},proto:{openTag:function(l,m){var o=this;var n=o._.rules[l];if(o._.indent)o.indentation();else if(n&&n.breakBeforeOpen){o.lineBreak();o.indentation();}o._.output.push('<',l);},openTagClose:function(l,m){var o=this;var n=o._.rules[l];if(m)o._.output.push(o.selfClosingEnd);else{o._.output.push('>');if(n&&n.indent)o._.indentation+=o.indentationChars;}if(n&&n.breakAfterOpen)o.lineBreak();},attribute:function(l,m){if(typeof m=='string'){this.forceSimpleAmpersand&&(m=m.replace(/&/g,'&'));m=e.htmlEncodeAttr(m);}this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){var n=this;var m=n._.rules[l];if(m&&m.indent)n._.indentation=n._.indentation.substr(n.indentationChars.length);if(n._.indent)n.indentation();else if(m&&m.breakBeforeClose){n.lineBreak();n.indentation();}n._.output.push('');if(m&&m.breakAfterClose)n.lineBreak();},text:function(l){if(this._.indent){this.indentation();l=e.ltrim(l);}this._.output.push(l);},comment:function(l){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var l=this;if(l._.output.length>0)l._.output.push(l.lineBreakChars);l._.indent=true;},indentation:function(){this._.output.push(this._.indentation);this._.indent=false;},setRules:function(l,m){var n=this._.rules[l];if(n)e.extend(n,m,true);else this._.rules[l]=m;}}});j.add('menubutton',{requires:['button','contextmenu'],beforeInit:function(l){l.ui.addHandler(5,k.menuButton.handler);}});a.UI_MENUBUTTON=5;(function(){var l=function(m){var n=this._;if(n.state===0)return;n.previousState=n.state;var o=n.menu;if(!o){o=n.menu=new j.contextMenu(m);o.definition.panel.attributes['aria-label']=m.lang.common.options;o.onHide=e.bind(function(){this.setState(n.previousState);},this);if(this.onMenu)o.addListener(this.onMenu);}if(n.on){o.hide();return;}this.setState(1);o.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(m){var n=m.panel;delete m.panel;this.base(m);this.hasArrow=true;this.click=l;},statics:{handler:{create:function(m){return new k.menuButton(m);}}}});})();j.add('dialogui');(function(){var l=function(t){var w=this;w._||(w._={});w._['default']=w._.initValue=t['default']||'';w._.required=t.required||false;var u=[w._];for(var v=1;v',u.label,'','');else{var B={type:'hbox',widths:u.widths,padding:0,children:[{type:'html',html:'