From 4625dba05116026713fee9008dd93306be0d1553 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Sat, 29 Jun 2013 18:38:43 -0400 Subject: [PATCH] vanilla ckeditor-4.0_full --- .htaccess | 24 - CHANGES.html | 1598 ---------- CHANGES.md | 12 + INSTALL.html | 92 - LICENSE.html | 1327 -------- LICENSE.md | 1264 ++++++++ README.md | 39 + _samples/adobeair/application.xml | 32 - _samples/adobeair/run.bat | 9 - _samples/adobeair/run.sh | 8 - _samples/adobeair/sample.html | 45 - _samples/ajax.html | 98 - _samples/api.html | 192 -- _samples/api_dialog.html | 198 -- _samples/api_dialog/my_dialog.js | 28 - _samples/asp/advanced.asp | 105 - _samples/asp/events.asp | 136 - _samples/asp/index.html | 103 - _samples/asp/replace.asp | 72 - _samples/asp/replaceall.asp | 77 - _samples/asp/sample_posteddata.asp | 46 - _samples/asp/standalone.asp | 72 - _samples/assets/_posteddata.php | 59 - _samples/assets/output_for_flash.fla | Bin 85504 -> 0 bytes _samples/assets/output_for_flash.swf | Bin 15571 -> 0 bytes _samples/assets/output_xhtml.css | 204 -- _samples/assets/parsesample.css | 70 - _samples/assets/swfobject.js | 18 - _samples/autogrow.html | 108 - _samples/bbcode.html | 125 - _samples/devtools.html | 94 - _samples/divreplace.html | 154 - _samples/enterkey.html | 115 - _samples/fullpage.html | 82 - _samples/index.html | 116 - _samples/jqueryadapter.html | 99 - _samples/output_for_flash.html | 275 -- _samples/output_html.html | 285 -- _samples/output_xhtml.html | 181 -- _samples/php/advanced.php | 120 - _samples/php/events.php | 153 - _samples/php/index.html | 47 - _samples/php/replace.php | 87 - _samples/php/replaceall.php | 88 - _samples/php/standalone.php | 83 - _samples/placeholder.html | 81 - _samples/readonly.html | 91 - _samples/replacebyclass.html | 64 - _samples/replacebycode.html | 97 - _samples/sample.css | 157 - _samples/sample.js | 65 - _samples/sample_posteddata.php | 21 - _samples/sharedspaces.html | 153 - _samples/skins.html | 110 - _samples/stylesheetparser.html | 93 - _samples/tableresize.html | 115 - _samples/ui_color.html | 129 - _samples/ui_languages.html | 134 - _source/adapters/jquery.js | 306 -- _source/core/_bootstrap.js | 87 - _source/core/ckeditor.js | 141 - _source/core/ckeditor_base.js | 235 -- _source/core/ckeditor_basic.js | 238 -- _source/core/command.js | 225 -- _source/core/commanddefinition.js | 129 - _source/core/config.js | 447 --- _source/core/dataprocessor.js | 65 - _source/core/dom.js | 20 - _source/core/dom/comment.js | 44 - _source/core/dom/document.js | 251 -- _source/core/dom/documentfragment.js | 49 - _source/core/dom/domobject.js | 258 -- _source/core/dom/element.js | 1844 ----------- _source/core/dom/elementpath.js | 117 - _source/core/dom/event.js | 165 - _source/core/dom/node.js | 692 ---- _source/core/dom/nodelist.js | 26 - _source/core/dom/range.js | 2118 ------------- _source/core/dom/rangelist.js | 213 -- _source/core/dom/text.js | 128 - _source/core/dom/walker.js | 520 --- _source/core/dom/window.js | 96 - _source/core/dtd.js | 266 -- _source/core/editor.js | 1059 ------- _source/core/editor_basic.js | 186 -- _source/core/env.js | 308 -- _source/core/event.js | 342 -- _source/core/eventInfo.js | 132 - _source/core/focusmanager.js | 152 - _source/core/htmlparser.js | 224 -- _source/core/htmlparser/basicwriter.js | 145 - _source/core/htmlparser/cdata.js | 43 - _source/core/htmlparser/comment.js | 60 - _source/core/htmlparser/element.js | 306 -- _source/core/htmlparser/filter.js | 288 -- _source/core/htmlparser/fragment.js | 537 ---- _source/core/htmlparser/text.js | 53 - _source/core/lang.js | 159 - _source/core/loader.js | 240 -- _source/core/plugindefinition.js | 83 - _source/core/plugins.js | 103 - _source/core/resourcemanager.js | 238 -- _source/core/scriptloader.js | 180 -- _source/core/skins.js | 184 -- _source/core/themes.js | 19 - _source/core/tools.js | 838 ----- _source/core/ui.js | 128 - _source/lang/_languages.js | 86 - _source/lang/_translationstatus.txt | 65 - _source/lang/af.js | 817 ----- _source/lang/ar.js | 817 ----- _source/lang/bg.js | 817 ----- _source/lang/bn.js | 817 ----- _source/lang/bs.js | 817 ----- _source/lang/ca.js | 817 ----- _source/lang/cs.js | 817 ----- _source/lang/cy.js | 817 ----- _source/lang/da.js | 817 ----- _source/lang/de.js | 817 ----- _source/lang/el.js | 817 ----- _source/lang/en-au.js | 817 ----- _source/lang/en-ca.js | 817 ----- _source/lang/en-gb.js | 817 ----- _source/lang/en.js | 817 ----- _source/lang/eo.js | 817 ----- _source/lang/es.js | 817 ----- _source/lang/et.js | 817 ----- _source/lang/eu.js | 817 ----- _source/lang/fa.js | 817 ----- _source/lang/fi.js | 817 ----- _source/lang/fo.js | 817 ----- _source/lang/fr-ca.js | 817 ----- _source/lang/fr.js | 817 ----- _source/lang/gl.js | 817 ----- _source/lang/gu.js | 817 ----- _source/lang/he.js | 817 ----- _source/lang/hi.js | 817 ----- _source/lang/hr.js | 817 ----- _source/lang/hu.js | 817 ----- _source/lang/id.js | 816 ----- _source/lang/is.js | 817 ----- _source/lang/it.js | 817 ----- _source/lang/ja.js | 817 ----- _source/lang/ka.js | 817 ----- _source/lang/km.js | 817 ----- _source/lang/ko.js | 817 ----- _source/lang/ku.js | 816 ----- _source/lang/lt.js | 817 ----- _source/lang/lv.js | 817 ----- _source/lang/mk.js | 816 ----- _source/lang/mn.js | 817 ----- _source/lang/ms.js | 817 ----- _source/lang/nb.js | 817 ----- _source/lang/nl.js | 817 ----- _source/lang/no.js | 817 ----- _source/lang/pl.js | 817 ----- _source/lang/pt-br.js | 816 ----- _source/lang/pt.js | 817 ----- _source/lang/ro.js | 817 ----- _source/lang/ru.js | 817 ----- _source/lang/sk.js | 817 ----- _source/lang/sl.js | 817 ----- _source/lang/sr-latn.js | 817 ----- _source/lang/sr.js | 817 ----- _source/lang/sv.js | 816 ----- _source/lang/th.js | 817 ----- _source/lang/tr.js | 816 ----- _source/lang/ug.js | 816 ----- _source/lang/uk.js | 817 ----- _source/lang/vi.js | 817 ----- _source/lang/zh-cn.js | 817 ----- _source/lang/zh.js | 817 ----- _source/plugins/a11yhelp/dialogs/a11yhelp.js | 222 -- .../plugins/a11yhelp/lang/_translationstatus.txt | 28 - _source/plugins/a11yhelp/lang/cs.js | 89 - _source/plugins/a11yhelp/lang/cy.js | 89 - _source/plugins/a11yhelp/lang/da.js | 89 - _source/plugins/a11yhelp/lang/de.js | 89 - _source/plugins/a11yhelp/lang/el.js | 89 - _source/plugins/a11yhelp/lang/en.js | 108 - _source/plugins/a11yhelp/lang/eo.js | 89 - _source/plugins/a11yhelp/lang/fa.js | 89 - _source/plugins/a11yhelp/lang/fi.js | 89 - _source/plugins/a11yhelp/lang/fr.js | 89 - _source/plugins/a11yhelp/lang/gu.js | 89 - _source/plugins/a11yhelp/lang/he.js | 89 - _source/plugins/a11yhelp/lang/it.js | 89 - _source/plugins/a11yhelp/lang/ku.js | 89 - _source/plugins/a11yhelp/lang/lv.js | 89 - _source/plugins/a11yhelp/lang/mk.js | 89 - _source/plugins/a11yhelp/lang/nb.js | 89 - _source/plugins/a11yhelp/lang/nl.js | 89 - _source/plugins/a11yhelp/lang/no.js | 89 - _source/plugins/a11yhelp/lang/pt-br.js | 89 - _source/plugins/a11yhelp/lang/ro.js | 89 - _source/plugins/a11yhelp/lang/sk.js | 89 - _source/plugins/a11yhelp/lang/tr.js | 89 - _source/plugins/a11yhelp/lang/ug.js | 89 - _source/plugins/a11yhelp/lang/vi.js | 89 - _source/plugins/a11yhelp/lang/zh-cn.js | 89 - _source/plugins/a11yhelp/plugin.js | 49 - _source/plugins/about/dialogs/about.js | 76 - _source/plugins/about/dialogs/logo_ckeditor.png | Bin 2759 -> 0 bytes _source/plugins/about/plugin.js | 24 - _source/plugins/adobeair/plugin.js | 228 -- _source/plugins/ajax/plugin.js | 152 - _source/plugins/autogrow/plugin.js | 161 - _source/plugins/basicstyles/plugin.js | 129 - _source/plugins/bbcode/plugin.js | 945 ------ _source/plugins/bidi/plugin.js | 334 -- _source/plugins/blockquote/plugin.js | 305 -- _source/plugins/button/plugin.js | 290 -- _source/plugins/clipboard/dialogs/paste.js | 223 -- _source/plugins/clipboard/plugin.js | 509 --- _source/plugins/colorbutton/plugin.js | 300 -- _source/plugins/colordialog/dialogs/colordialog.js | 387 --- _source/plugins/colordialog/plugin.js | 16 - _source/plugins/contextmenu/plugin.js | 179 -- .../plugins/devtools/lang/_translationstatus.txt | 31 - _source/plugins/devtools/lang/bg.js | 16 - _source/plugins/devtools/lang/cs.js | 16 - _source/plugins/devtools/lang/cy.js | 16 - _source/plugins/devtools/lang/da.js | 16 - _source/plugins/devtools/lang/de.js | 16 - _source/plugins/devtools/lang/el.js | 16 - _source/plugins/devtools/lang/en.js | 16 - _source/plugins/devtools/lang/eo.js | 16 - _source/plugins/devtools/lang/et.js | 16 - _source/plugins/devtools/lang/fa.js | 16 - _source/plugins/devtools/lang/fi.js | 16 - _source/plugins/devtools/lang/fr.js | 16 - _source/plugins/devtools/lang/gu.js | 16 - _source/plugins/devtools/lang/he.js | 16 - _source/plugins/devtools/lang/hr.js | 16 - _source/plugins/devtools/lang/it.js | 16 - _source/plugins/devtools/lang/ku.js | 16 - _source/plugins/devtools/lang/lv.js | 16 - _source/plugins/devtools/lang/nb.js | 16 - _source/plugins/devtools/lang/nl.js | 16 - _source/plugins/devtools/lang/no.js | 16 - _source/plugins/devtools/lang/pl.js | 16 - _source/plugins/devtools/lang/pt-br.js | 16 - _source/plugins/devtools/lang/sk.js | 16 - _source/plugins/devtools/lang/tr.js | 16 - _source/plugins/devtools/lang/ug.js | 16 - _source/plugins/devtools/lang/uk.js | 16 - _source/plugins/devtools/lang/vi.js | 16 - _source/plugins/devtools/lang/zh-cn.js | 16 - _source/plugins/devtools/plugin.js | 173 - _source/plugins/dialog/dialogDefinition.js | 1166 ------- _source/plugins/dialog/plugin.js | 3353 -------------------- _source/plugins/dialogadvtab/plugin.js | 197 -- _source/plugins/dialogui/plugin.js | 1532 --------- _source/plugins/div/dialogs/div.js | 535 ---- _source/plugins/div/plugin.js | 121 - _source/plugins/docprops/dialogs/docprops.js | 674 ---- _source/plugins/docprops/plugin.js | 22 - _source/plugins/domiterator/plugin.js | 366 --- _source/plugins/editingblock/plugin.js | 278 -- _source/plugins/elementspath/plugin.js | 218 -- _source/plugins/enterkey/plugin.js | 433 --- _source/plugins/entities/plugin.js | 254 -- _source/plugins/fakeobjects/plugin.js | 181 -- _source/plugins/filebrowser/plugin.js | 533 ---- _source/plugins/find/dialogs/find.js | 922 ------ _source/plugins/find/plugin.js | 48 - _source/plugins/flash/dialogs/flash.js | 665 ---- _source/plugins/flash/images/placeholder.png | Bin 256 -> 0 bytes _source/plugins/flash/plugin.js | 154 - _source/plugins/floatpanel/plugin.js | 469 --- _source/plugins/font/plugin.js | 234 -- _source/plugins/format/plugin.js | 197 -- _source/plugins/forms/dialogs/button.js | 118 - _source/plugins/forms/dialogs/checkbox.js | 153 - _source/plugins/forms/dialogs/form.js | 177 -- _source/plugins/forms/dialogs/hiddenfield.js | 100 - _source/plugins/forms/dialogs/radio.js | 135 - _source/plugins/forms/dialogs/select.js | 558 ---- _source/plugins/forms/dialogs/textarea.js | 135 - _source/plugins/forms/dialogs/textfield.js | 199 -- _source/plugins/forms/images/hiddenfield.gif | Bin 105 -> 0 bytes _source/plugins/forms/plugin.js | 289 -- _source/plugins/horizontalrule/plugin.js | 37 - _source/plugins/htmldataprocessor/plugin.js | 622 ---- _source/plugins/htmlwriter/plugin.js | 319 -- _source/plugins/iframe/dialogs/iframe.js | 229 -- _source/plugins/iframe/images/placeholder.png | Bin 449 -> 0 bytes _source/plugins/iframe/plugin.js | 87 - _source/plugins/iframedialog/plugin.js | 188 -- _source/plugins/image/dialogs/image.js | 1402 -------- _source/plugins/image/plugin.js | 166 - _source/plugins/indent/plugin.js | 464 --- _source/plugins/justify/plugin.js | 251 -- _source/plugins/keystrokes/plugin.js | 225 -- _source/plugins/link/dialogs/anchor.js | 145 - _source/plugins/link/dialogs/link.js | 1432 --------- _source/plugins/link/images/anchor.gif | Bin 184 -> 0 bytes _source/plugins/link/plugin.js | 373 --- _source/plugins/list/plugin.js | 1128 ------- _source/plugins/listblock/plugin.js | 260 -- _source/plugins/liststyle/dialogs/liststyle.js | 225 -- _source/plugins/liststyle/plugin.js | 66 - _source/plugins/maximize/plugin.js | 353 --- _source/plugins/menu/plugin.js | 547 ---- _source/plugins/menubutton/plugin.js | 98 - _source/plugins/newpage/plugin.js | 55 - _source/plugins/pagebreak/images/pagebreak.gif | Bin 54 -> 0 bytes _source/plugins/pagebreak/plugin.js | 164 - _source/plugins/panel/plugin.js | 396 --- _source/plugins/panelbutton/plugin.js | 144 - _source/plugins/pastefromword/filter/default.js | 1367 -------- _source/plugins/pastefromword/plugin.js | 141 - _source/plugins/pastetext/dialogs/pastetext.js | 67 - _source/plugins/pastetext/plugin.js | 98 - _source/plugins/placeholder/dialogs/placeholder.js | 71 - .../placeholder/lang/_translationstatus.txt | 30 - _source/plugins/placeholder/lang/bg.js | 16 - _source/plugins/placeholder/lang/cs.js | 16 - _source/plugins/placeholder/lang/cy.js | 16 - _source/plugins/placeholder/lang/da.js | 16 - _source/plugins/placeholder/lang/de.js | 16 - _source/plugins/placeholder/lang/el.js | 16 - _source/plugins/placeholder/lang/en.js | 16 - _source/plugins/placeholder/lang/eo.js | 16 - _source/plugins/placeholder/lang/et.js | 16 - _source/plugins/placeholder/lang/fa.js | 16 - _source/plugins/placeholder/lang/fi.js | 16 - _source/plugins/placeholder/lang/fr.js | 16 - _source/plugins/placeholder/lang/he.js | 16 - _source/plugins/placeholder/lang/hr.js | 16 - _source/plugins/placeholder/lang/it.js | 16 - _source/plugins/placeholder/lang/ku.js | 16 - _source/plugins/placeholder/lang/lv.js | 16 - _source/plugins/placeholder/lang/nb.js | 16 - _source/plugins/placeholder/lang/nl.js | 16 - _source/plugins/placeholder/lang/no.js | 16 - _source/plugins/placeholder/lang/pl.js | 16 - _source/plugins/placeholder/lang/pt-br.js | 16 - _source/plugins/placeholder/lang/sk.js | 16 - _source/plugins/placeholder/lang/tr.js | 16 - _source/plugins/placeholder/lang/ug.js | 16 - _source/plugins/placeholder/lang/uk.js | 16 - _source/plugins/placeholder/lang/vi.js | 16 - _source/plugins/placeholder/lang/zh-cn.js | 16 - _source/plugins/placeholder/placeholder.gif | Bin 96 -> 0 bytes _source/plugins/placeholder/plugin.js | 171 - _source/plugins/popup/plugin.js | 69 - _source/plugins/preview/plugin.js | 125 - _source/plugins/preview/preview.html | 10 - _source/plugins/print/plugin.js | 42 - _source/plugins/removeformat/plugin.js | 185 -- _source/plugins/resize/plugin.js | 169 - _source/plugins/richcombo/plugin.js | 381 --- _source/plugins/save/plugin.js | 56 - _source/plugins/scayt/dialogs/options.js | 537 ---- _source/plugins/scayt/dialogs/toolbar.css | 71 - _source/plugins/scayt/plugin.js | 981 ------ _source/plugins/selection/plugin.js | 1902 ----------- .../plugins/showblocks/images/block_address.png | Bin 171 -> 0 bytes .../plugins/showblocks/images/block_blockquote.png | Bin 181 -> 0 bytes _source/plugins/showblocks/images/block_div.png | Bin 136 -> 0 bytes _source/plugins/showblocks/images/block_h1.png | Bin 127 -> 0 bytes _source/plugins/showblocks/images/block_h2.png | Bin 134 -> 0 bytes _source/plugins/showblocks/images/block_h3.png | Bin 131 -> 0 bytes _source/plugins/showblocks/images/block_h4.png | Bin 133 -> 0 bytes _source/plugins/showblocks/images/block_h5.png | Bin 133 -> 0 bytes _source/plugins/showblocks/images/block_h6.png | Bin 129 -> 0 bytes _source/plugins/showblocks/images/block_p.png | Bin 119 -> 0 bytes _source/plugins/showblocks/images/block_pre.png | Bin 136 -> 0 bytes _source/plugins/showblocks/plugin.js | 160 - _source/plugins/showborders/plugin.js | 207 -- _source/plugins/smiley/dialogs/smiley.js | 220 -- _source/plugins/smiley/images/angel_smile.gif | Bin 465 -> 0 bytes _source/plugins/smiley/images/angry_smile.gif | Bin 443 -> 0 bytes _source/plugins/smiley/images/broken_heart.gif | Bin 192 -> 0 bytes _source/plugins/smiley/images/confused_smile.gif | Bin 464 -> 0 bytes _source/plugins/smiley/images/cry_smile.gif | Bin 468 -> 0 bytes _source/plugins/smiley/images/devil_smile.gif | Bin 436 -> 0 bytes _source/plugins/smiley/images/embaressed_smile.gif | Bin 442 -> 0 bytes _source/plugins/smiley/images/envelope.gif | Bin 426 -> 0 bytes _source/plugins/smiley/images/heart.gif | Bin 183 -> 0 bytes _source/plugins/smiley/images/kiss.gif | Bin 241 -> 0 bytes _source/plugins/smiley/images/lightbulb.gif | Bin 368 -> 0 bytes _source/plugins/smiley/images/omg_smile.gif | Bin 451 -> 0 bytes _source/plugins/smiley/images/regular_smile.gif | Bin 450 -> 0 bytes _source/plugins/smiley/images/sad_smile.gif | Bin 460 -> 0 bytes _source/plugins/smiley/images/shades_smile.gif | Bin 449 -> 0 bytes _source/plugins/smiley/images/teeth_smile.gif | Bin 442 -> 0 bytes _source/plugins/smiley/images/thumbs_down.gif | Bin 408 -> 0 bytes _source/plugins/smiley/images/thumbs_up.gif | Bin 396 -> 0 bytes _source/plugins/smiley/images/tounge_smile.gif | Bin 446 -> 0 bytes .../smiley/images/whatchutalkingabout_smile.gif | Bin 452 -> 0 bytes _source/plugins/smiley/images/wink_smile.gif | Bin 458 -> 0 bytes _source/plugins/smiley/plugin.js | 94 - _source/plugins/sourcearea/plugin.js | 209 -- _source/plugins/specialchar/dialogs/specialchar.js | 346 -- .../specialchar/lang/_translationstatus.txt | 25 - _source/plugins/specialchar/lang/cs.js | 126 - _source/plugins/specialchar/lang/cy.js | 126 - _source/plugins/specialchar/lang/de.js | 126 - _source/plugins/specialchar/lang/el.js | 126 - _source/plugins/specialchar/lang/en.js | 126 - _source/plugins/specialchar/lang/eo.js | 126 - _source/plugins/specialchar/lang/et.js | 126 - _source/plugins/specialchar/lang/fa.js | 126 - _source/plugins/specialchar/lang/fi.js | 126 - _source/plugins/specialchar/lang/fr.js | 126 - _source/plugins/specialchar/lang/he.js | 126 - _source/plugins/specialchar/lang/hr.js | 126 - _source/plugins/specialchar/lang/it.js | 126 - _source/plugins/specialchar/lang/ku.js | 126 - _source/plugins/specialchar/lang/lv.js | 126 - _source/plugins/specialchar/lang/nb.js | 126 - _source/plugins/specialchar/lang/nl.js | 126 - _source/plugins/specialchar/lang/no.js | 126 - _source/plugins/specialchar/lang/pt-br.js | 126 - _source/plugins/specialchar/lang/sk.js | 126 - _source/plugins/specialchar/lang/tr.js | 126 - _source/plugins/specialchar/lang/ug.js | 126 - _source/plugins/specialchar/lang/zh-cn.js | 126 - _source/plugins/specialchar/plugin.js | 72 - _source/plugins/styles/plugin.js | 1728 ---------- _source/plugins/styles/styles/default.js | 88 - _source/plugins/stylescombo/plugin.js | 218 -- _source/plugins/stylesheetparser/plugin.js | 148 - _source/plugins/tab/plugin.js | 369 --- _source/plugins/table/dialogs/table.js | 618 ---- _source/plugins/table/plugin.js | 79 - _source/plugins/tableresize/plugin.js | 445 --- _source/plugins/tabletools/dialogs/tableCell.js | 520 --- _source/plugins/tabletools/plugin.js | 1190 ------- _source/plugins/templates/dialogs/templates.js | 234 -- _source/plugins/templates/plugin.js | 100 - _source/plugins/templates/templates/default.js | 94 - .../templates/templates/images/template1.gif | Bin 375 -> 0 bytes .../templates/templates/images/template2.gif | Bin 333 -> 0 bytes .../templates/templates/images/template3.gif | Bin 422 -> 0 bytes _source/plugins/toolbar/plugin.js | 546 ---- _source/plugins/uicolor/dialogs/uicolor.js | 205 -- .../plugins/uicolor/lang/_translationstatus.txt | 31 - _source/plugins/uicolor/lang/bg.js | 15 - _source/plugins/uicolor/lang/cs.js | 15 - _source/plugins/uicolor/lang/cy.js | 15 - _source/plugins/uicolor/lang/da.js | 15 - _source/plugins/uicolor/lang/de.js | 15 - _source/plugins/uicolor/lang/el.js | 15 - _source/plugins/uicolor/lang/en.js | 15 - _source/plugins/uicolor/lang/eo.js | 15 - _source/plugins/uicolor/lang/et.js | 15 - _source/plugins/uicolor/lang/fa.js | 15 - _source/plugins/uicolor/lang/fi.js | 15 - _source/plugins/uicolor/lang/fr.js | 15 - _source/plugins/uicolor/lang/he.js | 15 - _source/plugins/uicolor/lang/hr.js | 15 - _source/plugins/uicolor/lang/it.js | 15 - _source/plugins/uicolor/lang/ku.js | 15 - _source/plugins/uicolor/lang/lv.js | 15 - _source/plugins/uicolor/lang/mk.js | 15 - _source/plugins/uicolor/lang/nb.js | 15 - _source/plugins/uicolor/lang/nl.js | 15 - _source/plugins/uicolor/lang/no.js | 15 - _source/plugins/uicolor/lang/pl.js | 15 - _source/plugins/uicolor/lang/pt-br.js | 15 - _source/plugins/uicolor/lang/sk.js | 15 - _source/plugins/uicolor/lang/tr.js | 15 - _source/plugins/uicolor/lang/ug.js | 15 - _source/plugins/uicolor/lang/uk.js | 15 - _source/plugins/uicolor/lang/vi.js | 15 - _source/plugins/uicolor/lang/zh-cn.js | 15 - _source/plugins/uicolor/plugin.js | 37 - _source/plugins/uicolor/uicolor.gif | Bin 1108 -> 0 bytes _source/plugins/uicolor/yui/assets/hue_bg.png | Bin 1120 -> 0 bytes _source/plugins/uicolor/yui/assets/hue_thumb.png | Bin 195 -> 0 bytes _source/plugins/uicolor/yui/assets/picker_mask.png | Bin 12174 -> 0 bytes .../plugins/uicolor/yui/assets/picker_thumb.png | Bin 192 -> 0 bytes _source/plugins/uicolor/yui/assets/yui.css | 15 - _source/plugins/uicolor/yui/yui.js | 71 - _source/plugins/undo/plugin.js | 593 ---- _source/plugins/wsc/dialogs/ciframe.html | 49 - _source/plugins/wsc/dialogs/tmpFrameset.html | 52 - _source/plugins/wsc/dialogs/wsc.css | 82 - _source/plugins/wsc/dialogs/wsc.js | 192 -- _source/plugins/wsc/plugin.js | 33 - _source/plugins/wysiwygarea/plugin.js | 1404 -------- _source/plugins/xml/plugin.js | 170 - _source/skins/kama/dialog.css | 1000 ------ _source/skins/kama/editor.css | 25 - _source/skins/kama/elementspath.css | 73 - _source/skins/kama/icons.css | 366 --- _source/skins/kama/icons.png | Bin 5598 -> 0 bytes _source/skins/kama/icons_rtl.png | Bin 5600 -> 0 bytes _source/skins/kama/images/dialog_sides.gif | Bin 48 -> 0 bytes _source/skins/kama/images/dialog_sides.png | Bin 178 -> 0 bytes _source/skins/kama/images/dialog_sides_rtl.png | Bin 181 -> 0 bytes _source/skins/kama/images/mini.gif | Bin 183 -> 0 bytes _source/skins/kama/images/noimage.png | Bin 2115 -> 0 bytes _source/skins/kama/images/sprites.png | Bin 7086 -> 0 bytes _source/skins/kama/images/sprites_ie6.png | Bin 2724 -> 0 bytes _source/skins/kama/images/toolbar_start.gif | Bin 105 -> 0 bytes _source/skins/kama/mainui.css | 206 -- _source/skins/kama/menu.css | 232 -- _source/skins/kama/panel.css | 217 -- _source/skins/kama/presets.css | 49 - _source/skins/kama/reset.css | 85 - _source/skins/kama/richcombo.css | 287 -- _source/skins/kama/skin.js | 236 -- _source/skins/kama/templates.css | 88 - _source/skins/kama/toolbar.css | 410 --- _source/skins/office2003/dialog.css | 908 ------ _source/skins/office2003/editor.css | 25 - _source/skins/office2003/elementspath.css | 74 - _source/skins/office2003/icons.css | 363 --- _source/skins/office2003/icons.png | Bin 5598 -> 0 bytes _source/skins/office2003/icons_rtl.png | Bin 5600 -> 0 bytes _source/skins/office2003/images/dialog_sides.gif | Bin 48 -> 0 bytes _source/skins/office2003/images/dialog_sides.png | Bin 178 -> 0 bytes .../skins/office2003/images/dialog_sides_rtl.png | Bin 181 -> 0 bytes _source/skins/office2003/images/mini.gif | Bin 183 -> 0 bytes _source/skins/office2003/images/noimage.png | Bin 2115 -> 0 bytes _source/skins/office2003/images/sprites.png | Bin 6119 -> 0 bytes _source/skins/office2003/images/sprites_ie6.png | Bin 2715 -> 0 bytes _source/skins/office2003/mainui.css | 153 - _source/skins/office2003/menu.css | 229 -- _source/skins/office2003/panel.css | 212 -- _source/skins/office2003/presets.css | 49 - _source/skins/office2003/reset.css | 85 - _source/skins/office2003/richcombo.css | 309 -- _source/skins/office2003/skin.js | 74 - _source/skins/office2003/templates.css | 87 - _source/skins/office2003/toolbar.css | 524 --- _source/skins/v2/dialog.css | 924 ------ _source/skins/v2/editor.css | 25 - _source/skins/v2/elementspath.css | 74 - _source/skins/v2/icons.css | 363 --- _source/skins/v2/icons.png | Bin 5598 -> 0 bytes _source/skins/v2/icons_rtl.png | Bin 5600 -> 0 bytes _source/skins/v2/images/dialog_sides.gif | Bin 48 -> 0 bytes _source/skins/v2/images/dialog_sides.png | Bin 178 -> 0 bytes _source/skins/v2/images/dialog_sides_rtl.png | Bin 181 -> 0 bytes _source/skins/v2/images/mini.gif | Bin 183 -> 0 bytes _source/skins/v2/images/noimage.png | Bin 2115 -> 0 bytes _source/skins/v2/images/sprites.png | Bin 5389 -> 0 bytes _source/skins/v2/images/sprites_ie6.png | Bin 492 -> 0 bytes _source/skins/v2/images/toolbar_start.gif | Bin 105 -> 0 bytes _source/skins/v2/mainui.css | 162 - _source/skins/v2/menu.css | 232 -- _source/skins/v2/panel.css | 212 -- _source/skins/v2/presets.css | 50 - _source/skins/v2/reset.css | 85 - _source/skins/v2/richcombo.css | 302 -- _source/skins/v2/skin.js | 70 - _source/skins/v2/templates.css | 87 - _source/skins/v2/toolbar.css | 467 --- _source/themes/default/theme.js | 407 --- adapters/jquery.js | 6 - build-config.js | 158 + ckeditor.asp | 955 ------ ckeditor.js | 1000 +++++- ckeditor.pack | 211 -- ckeditor.php | 29 - ckeditor_basic.js | 8 - ckeditor_basic_source.js | 20 - ckeditor_php4.php | 566 ---- ckeditor_php5.php | 556 ---- ckeditor_source.js | 35 - config.js | 21 +- contents.css | 78 +- images/spacer.gif | Bin 43 -> 0 bytes lang/_languages.js | 6 - lang/_translationstatus.txt | 65 - lang/af.js | 7 +- lang/ar.js | 7 +- lang/bg.js | 7 +- lang/bn.js | 7 +- lang/bs.js | 7 +- lang/ca.js | 7 +- lang/cs.js | 7 +- lang/cy.js | 7 +- lang/da.js | 7 +- lang/de.js | 7 +- lang/el.js | 7 +- lang/en-au.js | 7 +- lang/en-ca.js | 7 +- lang/en-gb.js | 7 +- lang/en.js | 7 +- lang/eo.js | 7 +- lang/es.js | 7 +- lang/et.js | 7 +- lang/eu.js | 7 +- lang/fa.js | 823 +---- lang/fi.js | 7 +- lang/fo.js | 7 +- lang/fr-ca.js | 7 +- lang/fr.js | 7 +- lang/gl.js | 7 +- lang/gu.js | 7 +- lang/he.js | 7 +- lang/hi.js | 7 +- lang/hr.js | 7 +- lang/hu.js | 7 +- lang/id.js | 6 - lang/is.js | 7 +- lang/it.js | 7 +- lang/ja.js | 7 +- lang/ka.js | 7 +- lang/km.js | 7 +- lang/ko.js | 7 +- lang/ku.js | 822 +---- lang/lt.js | 7 +- lang/lv.js | 7 +- lang/mk.js | 7 +- lang/mn.js | 7 +- lang/ms.js | 7 +- lang/nb.js | 7 +- lang/nl.js | 7 +- lang/no.js | 7 +- lang/pl.js | 7 +- lang/pt-br.js | 7 +- lang/pt.js | 7 +- lang/ro.js | 7 +- lang/ru.js | 7 +- lang/sk.js | 7 +- lang/sl.js | 7 +- lang/sr-latn.js | 7 +- lang/sr.js | 7 +- lang/sv.js | 7 +- lang/th.js | 7 +- lang/tr.js | 7 +- lang/ug.js | 7 +- lang/uk.js | 7 +- lang/vi.js | 7 +- lang/zh-cn.js | 7 +- lang/zh.js | 7 +- plugins/a11yhelp/dialogs/a11yhelp.js | 17 +- .../a11yhelp/dialogs/lang/_translationstatus.txt | 25 + plugins/a11yhelp/dialogs/lang/ar.js | 8 + plugins/a11yhelp/dialogs/lang/bg.js | 8 + plugins/a11yhelp/dialogs/lang/ca.js | 8 + plugins/a11yhelp/dialogs/lang/cs.js | 9 + plugins/a11yhelp/dialogs/lang/cy.js | 8 + plugins/a11yhelp/dialogs/lang/da.js | 8 + plugins/a11yhelp/dialogs/lang/de.js | 9 + plugins/a11yhelp/dialogs/lang/el.js | 9 + plugins/a11yhelp/dialogs/lang/en.js | 8 + plugins/a11yhelp/dialogs/lang/eo.js | 9 + plugins/a11yhelp/dialogs/lang/et.js | 8 + plugins/a11yhelp/dialogs/lang/fa.js | 8 + plugins/a11yhelp/dialogs/lang/fi.js | 9 + plugins/a11yhelp/dialogs/lang/fr.js | 9 + plugins/a11yhelp/dialogs/lang/gu.js | 8 + plugins/a11yhelp/dialogs/lang/he.js | 8 + plugins/a11yhelp/dialogs/lang/hi.js | 8 + plugins/a11yhelp/dialogs/lang/hr.js | 8 + plugins/a11yhelp/dialogs/lang/hu.js | 8 + plugins/a11yhelp/dialogs/lang/it.js | 9 + plugins/a11yhelp/dialogs/lang/ku.js | 9 + plugins/a11yhelp/dialogs/lang/lt.js | 8 + plugins/a11yhelp/dialogs/lang/lv.js | 9 + plugins/a11yhelp/dialogs/lang/mk.js | 8 + plugins/a11yhelp/dialogs/lang/mn.js | 8 + plugins/a11yhelp/dialogs/lang/nb.js | 8 + plugins/a11yhelp/dialogs/lang/nl.js | 9 + plugins/a11yhelp/dialogs/lang/no.js | 8 + plugins/a11yhelp/dialogs/lang/pl.js | 8 + plugins/a11yhelp/dialogs/lang/pt-br.js | 8 + plugins/a11yhelp/dialogs/lang/pt.js | 8 + plugins/a11yhelp/dialogs/lang/ro.js | 8 + plugins/a11yhelp/dialogs/lang/ru.js | 8 + plugins/a11yhelp/dialogs/lang/sk.js | 9 + plugins/a11yhelp/dialogs/lang/sl.js | 8 + plugins/a11yhelp/dialogs/lang/tr.js | 9 + plugins/a11yhelp/dialogs/lang/ug.js | 8 + plugins/a11yhelp/dialogs/lang/uk.js | 8 + plugins/a11yhelp/dialogs/lang/vi.js | 8 + plugins/a11yhelp/dialogs/lang/zh-cn.js | 7 + plugins/a11yhelp/lang/_translationstatus.txt | 28 - plugins/a11yhelp/lang/cs.js | 6 - plugins/a11yhelp/lang/cy.js | 6 - plugins/a11yhelp/lang/da.js | 6 - plugins/a11yhelp/lang/de.js | 6 - plugins/a11yhelp/lang/el.js | 6 - plugins/a11yhelp/lang/en.js | 6 - plugins/a11yhelp/lang/eo.js | 6 - plugins/a11yhelp/lang/fa.js | 94 - plugins/a11yhelp/lang/fi.js | 6 - plugins/a11yhelp/lang/fr.js | 6 - plugins/a11yhelp/lang/gu.js | 6 - plugins/a11yhelp/lang/he.js | 6 - plugins/a11yhelp/lang/it.js | 6 - plugins/a11yhelp/lang/ku.js | 94 - plugins/a11yhelp/lang/lv.js | 6 - plugins/a11yhelp/lang/mk.js | 6 - plugins/a11yhelp/lang/nb.js | 6 - plugins/a11yhelp/lang/nl.js | 6 - plugins/a11yhelp/lang/no.js | 6 - plugins/a11yhelp/lang/pt-br.js | 6 - plugins/a11yhelp/lang/ro.js | 6 - plugins/a11yhelp/lang/sk.js | 6 - plugins/a11yhelp/lang/tr.js | 6 - plugins/a11yhelp/lang/ug.js | 6 - plugins/a11yhelp/lang/vi.js | 6 - plugins/a11yhelp/lang/zh-cn.js | 6 - plugins/about/dialogs/about.js | 12 +- plugins/adobeair/plugin.js | 6 - plugins/ajax/plugin.js | 6 - plugins/autogrow/plugin.js | 6 - plugins/bbcode/plugin.js | 9 - plugins/clipboard/dialogs/paste.js | 18 +- plugins/colordialog/dialogs/colordialog.js | 20 +- plugins/devtools/lang/_translationstatus.txt | 31 - plugins/devtools/lang/bg.js | 6 - plugins/devtools/lang/cs.js | 6 - plugins/devtools/lang/cy.js | 6 - plugins/devtools/lang/da.js | 6 - plugins/devtools/lang/de.js | 6 - plugins/devtools/lang/el.js | 6 - plugins/devtools/lang/en.js | 6 - plugins/devtools/lang/eo.js | 6 - plugins/devtools/lang/et.js | 6 - plugins/devtools/lang/fa.js | 21 - plugins/devtools/lang/fi.js | 6 - plugins/devtools/lang/fr.js | 6 - plugins/devtools/lang/gu.js | 6 - plugins/devtools/lang/he.js | 6 - plugins/devtools/lang/hr.js | 6 - plugins/devtools/lang/it.js | 6 - plugins/devtools/lang/ku.js | 21 - plugins/devtools/lang/lv.js | 6 - plugins/devtools/lang/nb.js | 6 - plugins/devtools/lang/nl.js | 6 - plugins/devtools/lang/no.js | 6 - plugins/devtools/lang/pl.js | 6 - plugins/devtools/lang/pt-br.js | 6 - plugins/devtools/lang/sk.js | 6 - plugins/devtools/lang/tr.js | 6 - plugins/devtools/lang/ug.js | 6 - plugins/devtools/lang/uk.js | 6 - plugins/devtools/lang/vi.js | 6 - plugins/devtools/lang/zh-cn.js | 6 - plugins/devtools/plugin.js | 6 - plugins/dialog/dialogDefinition.js | 8 +- plugins/div/dialogs/div.js | 17 +- plugins/docprops/dialogs/docprops.js | 10 - plugins/docprops/plugin.js | 6 - plugins/fakeobjects/images/spacer.gif | Bin 0 -> 43 bytes plugins/find/dialogs/find.js | 34 +- plugins/flash/dialogs/flash.js | 32 +- plugins/forms/dialogs/button.js | 14 +- plugins/forms/dialogs/checkbox.js | 14 +- plugins/forms/dialogs/form.js | 14 +- plugins/forms/dialogs/hiddenfield.js | 14 +- plugins/forms/dialogs/radio.js | 14 +- plugins/forms/dialogs/select.js | 29 +- plugins/forms/dialogs/textarea.js | 14 +- plugins/forms/dialogs/textfield.js | 16 +- plugins/icons.png | Bin 0 -> 20831 bytes plugins/iframe/dialogs/iframe.js | 17 +- plugins/iframedialog/plugin.js | 6 - plugins/image/dialogs/image.js | 54 +- plugins/image/images/noimage.png | Bin 0 -> 2115 bytes plugins/link/dialogs/anchor.js | 14 +- plugins/link/dialogs/link.js | 48 +- plugins/link/images/anchor.gif | Bin 184 -> 0 bytes plugins/link/images/anchor.png | Bin 0 -> 566 bytes plugins/liststyle/dialogs/liststyle.js | 17 +- plugins/magicline/images/icon.png | Bin 0 -> 172 bytes plugins/pastefromword/filter/default.js | 41 +- plugins/pastetext/dialogs/pastetext.js | 6 - plugins/placeholder/dialogs/placeholder.js | 6 - plugins/placeholder/lang/_translationstatus.txt | 30 - plugins/placeholder/lang/bg.js | 6 - plugins/placeholder/lang/cs.js | 6 - plugins/placeholder/lang/cy.js | 6 - plugins/placeholder/lang/da.js | 6 - plugins/placeholder/lang/de.js | 6 - plugins/placeholder/lang/el.js | 6 - plugins/placeholder/lang/en.js | 6 - plugins/placeholder/lang/eo.js | 6 - plugins/placeholder/lang/et.js | 6 - plugins/placeholder/lang/fa.js | 21 - plugins/placeholder/lang/fi.js | 6 - plugins/placeholder/lang/fr.js | 6 - plugins/placeholder/lang/he.js | 6 - plugins/placeholder/lang/hr.js | 6 - plugins/placeholder/lang/it.js | 6 - plugins/placeholder/lang/ku.js | 21 - plugins/placeholder/lang/lv.js | 6 - plugins/placeholder/lang/nb.js | 6 - plugins/placeholder/lang/nl.js | 6 - plugins/placeholder/lang/no.js | 6 - plugins/placeholder/lang/pl.js | 6 - plugins/placeholder/lang/pt-br.js | 6 - plugins/placeholder/lang/sk.js | 6 - plugins/placeholder/lang/tr.js | 6 - plugins/placeholder/lang/ug.js | 6 - plugins/placeholder/lang/uk.js | 6 - plugins/placeholder/lang/vi.js | 6 - plugins/placeholder/lang/zh-cn.js | 6 - plugins/placeholder/placeholder.gif | Bin 96 -> 0 bytes plugins/placeholder/plugin.js | 6 - plugins/scayt/dialogs/options.js | 8 - plugins/scayt/dialogs/toolbar.css | 6 - plugins/smiley/dialogs/smiley.js | 17 +- plugins/smiley/images/embarrassed_smile.gif | Bin 0 -> 442 bytes plugins/smiley/images/tongue_smile.gif | Bin 0 -> 446 bytes .../dialogs/lang/_translationstatus.txt | 20 + plugins/specialchar/dialogs/lang/ca.js | 13 + plugins/specialchar/dialogs/lang/cs.js | 13 + plugins/specialchar/dialogs/lang/cy.js | 14 + plugins/specialchar/dialogs/lang/de.js | 13 + plugins/specialchar/dialogs/lang/el.js | 13 + plugins/specialchar/dialogs/lang/en.js | 13 + plugins/specialchar/dialogs/lang/eo.js | 12 + plugins/specialchar/dialogs/lang/et.js | 13 + plugins/specialchar/dialogs/lang/fa.js | 13 + plugins/specialchar/dialogs/lang/fi.js | 13 + plugins/specialchar/dialogs/lang/fr.js | 11 + plugins/specialchar/dialogs/lang/he.js | 13 + plugins/specialchar/dialogs/lang/hr.js | 13 + plugins/specialchar/dialogs/lang/it.js | 14 + plugins/specialchar/dialogs/lang/ku.js | 14 + plugins/specialchar/dialogs/lang/lv.js | 13 + plugins/specialchar/dialogs/lang/nb.js | 11 + plugins/specialchar/dialogs/lang/nl.js | 13 + plugins/specialchar/dialogs/lang/no.js | 11 + plugins/specialchar/dialogs/lang/pt-br.js | 11 + plugins/specialchar/dialogs/lang/sk.js | 13 + plugins/specialchar/dialogs/lang/tr.js | 12 + plugins/specialchar/dialogs/lang/ug.js | 13 + plugins/specialchar/dialogs/lang/zh-cn.js | 9 + plugins/specialchar/dialogs/specialchar.js | 21 +- plugins/specialchar/lang/_translationstatus.txt | 25 - plugins/specialchar/lang/cs.js | 6 - plugins/specialchar/lang/cy.js | 6 - plugins/specialchar/lang/de.js | 6 - plugins/specialchar/lang/el.js | 6 - plugins/specialchar/lang/en.js | 6 - plugins/specialchar/lang/eo.js | 6 - plugins/specialchar/lang/et.js | 6 - plugins/specialchar/lang/fa.js | 131 - plugins/specialchar/lang/fi.js | 6 - plugins/specialchar/lang/fr.js | 6 - plugins/specialchar/lang/he.js | 6 - plugins/specialchar/lang/hr.js | 6 - plugins/specialchar/lang/it.js | 6 - plugins/specialchar/lang/ku.js | 131 - plugins/specialchar/lang/lv.js | 6 - plugins/specialchar/lang/nb.js | 6 - plugins/specialchar/lang/nl.js | 6 - plugins/specialchar/lang/no.js | 6 - plugins/specialchar/lang/pt-br.js | 6 - plugins/specialchar/lang/sk.js | 6 - plugins/specialchar/lang/tr.js | 6 - plugins/specialchar/lang/ug.js | 6 - plugins/specialchar/lang/zh-cn.js | 6 - plugins/styles/styles/default.js | 6 - plugins/stylesheetparser/plugin.js | 6 - plugins/table/dialogs/table.js | 29 +- plugins/tableresize/plugin.js | 7 - plugins/tabletools/dialogs/tableCell.js | 24 +- plugins/templates/dialogs/templates.css | 84 + plugins/templates/dialogs/templates.js | 17 +- plugins/templates/templates/default.js | 12 +- plugins/uicolor/dialogs/uicolor.js | 7 - plugins/uicolor/lang/_translationstatus.txt | 31 - plugins/uicolor/lang/bg.js | 6 - plugins/uicolor/lang/cs.js | 6 - plugins/uicolor/lang/cy.js | 6 - plugins/uicolor/lang/da.js | 6 - plugins/uicolor/lang/de.js | 6 - plugins/uicolor/lang/el.js | 6 - plugins/uicolor/lang/en.js | 6 - plugins/uicolor/lang/eo.js | 6 - plugins/uicolor/lang/et.js | 6 - plugins/uicolor/lang/fa.js | 20 - plugins/uicolor/lang/fi.js | 6 - plugins/uicolor/lang/fr.js | 6 - plugins/uicolor/lang/he.js | 6 - plugins/uicolor/lang/hr.js | 6 - plugins/uicolor/lang/it.js | 6 - plugins/uicolor/lang/ku.js | 20 - plugins/uicolor/lang/lv.js | 6 - plugins/uicolor/lang/mk.js | 6 - plugins/uicolor/lang/nb.js | 6 - plugins/uicolor/lang/nl.js | 6 - plugins/uicolor/lang/no.js | 6 - plugins/uicolor/lang/pl.js | 6 - plugins/uicolor/lang/pt-br.js | 6 - plugins/uicolor/lang/sk.js | 6 - plugins/uicolor/lang/tr.js | 6 - plugins/uicolor/lang/ug.js | 6 - plugins/uicolor/lang/uk.js | 6 - plugins/uicolor/lang/vi.js | 6 - plugins/uicolor/lang/zh-cn.js | 6 - plugins/uicolor/plugin.js | 6 - plugins/uicolor/uicolor.gif | Bin 1108 -> 0 bytes plugins/uicolor/yui/assets/hue_bg.png | Bin 1120 -> 0 bytes plugins/uicolor/yui/assets/hue_thumb.png | Bin 195 -> 0 bytes plugins/uicolor/yui/assets/picker_mask.png | Bin 12174 -> 0 bytes plugins/uicolor/yui/assets/picker_thumb.png | Bin 192 -> 0 bytes plugins/uicolor/yui/assets/yui.css | 6 - plugins/uicolor/yui/yui.js | 76 - plugins/wsc/dialogs/ciframe.html | 49 - plugins/wsc/dialogs/tmpFrameset.html | 52 - plugins/wsc/dialogs/wsc.css | 6 - plugins/wsc/dialogs/wsc.js | 7 - plugins/xml/plugin.js | 6 - samples/ajax.html | 82 + samples/api.html | 207 ++ samples/appendto.html | 57 + samples/assets/inlineall/logo.png | Bin 0 -> 4411 bytes samples/assets/outputxhtml/outputxhtml.css | 204 ++ samples/assets/posteddata.php | 59 + samples/assets/sample.css | 3 + samples/assets/sample.jpg | Bin 0 -> 17932 bytes samples/assets/uilanguages/languages.js | 7 + samples/divreplace.html | 141 + samples/index.html | 119 + samples/inlineall.html | 311 ++ samples/inlinebycode.html | 122 + samples/plugins/dialog/assets/my_dialog.js | 5 + samples/plugins/dialog/dialog.html | 187 ++ samples/plugins/enterkey/enterkey.html | 103 + .../assets/outputforflash/outputforflash.fla | Bin 0 -> 85504 bytes .../assets/outputforflash/outputforflash.swf | Bin 0 -> 15571 bytes .../htmlwriter/assets/outputforflash/swfobject.js | 18 + samples/plugins/htmlwriter/outputforflash.html | 280 ++ samples/plugins/htmlwriter/outputhtml.html | 237 ++ samples/plugins/magicline/magicline.html | 203 ++ samples/plugins/toolbar/toolbar.html | 200 ++ samples/plugins/wysiwygarea/fullpage.html | 71 + samples/readonly.html | 73 + samples/replacebyclass.html | 57 + samples/replacebycode.html | 56 + samples/sample.css | 333 ++ samples/sample.js | 5 + samples/sample_posteddata.php | 16 + samples/tabindex.html | 75 + samples/uicolor.html | 70 + samples/uilanguages.html | 119 + samples/xhtmlstyle.html | 219 ++ skins/kama/dialog.css | 10 - skins/kama/editor.css | 13 - skins/kama/icons.png | Bin 5598 -> 0 bytes skins/kama/icons_rtl.png | Bin 5600 -> 0 bytes skins/kama/images/dialog_sides.gif | Bin 48 -> 0 bytes skins/kama/images/dialog_sides.png | Bin 178 -> 0 bytes skins/kama/images/dialog_sides_rtl.png | Bin 181 -> 0 bytes skins/kama/images/mini.gif | Bin 183 -> 0 bytes skins/kama/images/noimage.png | Bin 2115 -> 0 bytes skins/kama/images/sprites.png | Bin 7086 -> 0 bytes skins/kama/images/sprites_ie6.png | Bin 2724 -> 0 bytes skins/kama/images/toolbar_start.gif | Bin 105 -> 0 bytes skins/kama/skin.js | 7 - skins/kama/templates.css | 6 - skins/moono/dialog.css | 5 + skins/moono/dialog_ie.css | 5 + skins/moono/dialog_ie7.css | 5 + skins/moono/dialog_ie8.css | 5 + skins/moono/dialog_opera.css | 5 + skins/moono/editor.css | 5 + skins/moono/editor_gecko.css | 5 + skins/moono/editor_ie.css | 5 + skins/moono/editor_ie7.css | 5 + skins/moono/editor_ie8.css | 5 + skins/moono/icons.png | Bin 0 -> 20831 bytes skins/moono/images/arrow.png | Bin 0 -> 261 bytes skins/moono/images/close.png | Bin 0 -> 389 bytes skins/moono/images/mini.png | Bin 0 -> 818 bytes skins/moono/readme.md | 51 + skins/office2003/dialog.css | 10 - skins/office2003/editor.css | 14 - skins/office2003/icons.png | Bin 5598 -> 0 bytes skins/office2003/icons_rtl.png | Bin 5600 -> 0 bytes skins/office2003/images/dialog_sides.gif | Bin 48 -> 0 bytes skins/office2003/images/dialog_sides.png | Bin 178 -> 0 bytes skins/office2003/images/dialog_sides_rtl.png | Bin 181 -> 0 bytes skins/office2003/images/mini.gif | Bin 183 -> 0 bytes skins/office2003/images/noimage.png | Bin 2115 -> 0 bytes skins/office2003/images/sprites.png | Bin 6119 -> 0 bytes skins/office2003/images/sprites_ie6.png | Bin 2715 -> 0 bytes skins/office2003/skin.js | 6 - skins/office2003/templates.css | 6 - skins/v2/dialog.css | 9 - skins/v2/editor.css | 13 - skins/v2/icons.png | Bin 5598 -> 0 bytes skins/v2/icons_rtl.png | Bin 5600 -> 0 bytes skins/v2/images/dialog_sides.gif | Bin 48 -> 0 bytes skins/v2/images/dialog_sides.png | Bin 178 -> 0 bytes skins/v2/images/dialog_sides_rtl.png | Bin 181 -> 0 bytes skins/v2/images/mini.gif | Bin 183 -> 0 bytes skins/v2/images/noimage.png | Bin 2115 -> 0 bytes skins/v2/images/sprites.png | Bin 5389 -> 0 bytes skins/v2/images/sprites_ie6.png | Bin 492 -> 0 bytes skins/v2/images/toolbar_start.gif | Bin 105 -> 0 bytes skins/v2/skin.js | 6 - skins/v2/templates.css | 6 - styles.js | 112 + themes/default/theme.js | 8 - 999 files changed, 7591 insertions(+), 143135 deletions(-) delete mode 100644 .htaccess delete mode 100644 CHANGES.html create mode 100644 CHANGES.md delete mode 100644 INSTALL.html delete mode 100644 LICENSE.html create mode 100644 LICENSE.md create mode 100644 README.md delete mode 100644 _samples/adobeair/application.xml delete mode 100755 _samples/adobeair/run.bat delete mode 100755 _samples/adobeair/run.sh delete mode 100644 _samples/adobeair/sample.html delete mode 100644 _samples/ajax.html delete mode 100644 _samples/api.html delete mode 100644 _samples/api_dialog.html delete mode 100644 _samples/api_dialog/my_dialog.js delete mode 100644 _samples/asp/advanced.asp delete mode 100644 _samples/asp/events.asp delete mode 100644 _samples/asp/index.html delete mode 100644 _samples/asp/replace.asp delete mode 100644 _samples/asp/replaceall.asp delete mode 100644 _samples/asp/sample_posteddata.asp delete mode 100644 _samples/asp/standalone.asp delete mode 100644 _samples/assets/_posteddata.php delete mode 100644 _samples/assets/output_for_flash.fla delete mode 100644 _samples/assets/output_for_flash.swf delete mode 100644 _samples/assets/output_xhtml.css delete mode 100644 _samples/assets/parsesample.css delete mode 100644 _samples/assets/swfobject.js delete mode 100644 _samples/autogrow.html delete mode 100644 _samples/bbcode.html delete mode 100644 _samples/devtools.html delete mode 100644 _samples/divreplace.html delete mode 100644 _samples/enterkey.html delete mode 100644 _samples/fullpage.html delete mode 100644 _samples/index.html delete mode 100644 _samples/jqueryadapter.html delete mode 100644 _samples/output_for_flash.html delete mode 100644 _samples/output_html.html delete mode 100644 _samples/output_xhtml.html delete mode 100644 _samples/php/advanced.php delete mode 100644 _samples/php/events.php delete mode 100644 _samples/php/index.html delete mode 100644 _samples/php/replace.php delete mode 100644 _samples/php/replaceall.php delete mode 100644 _samples/php/standalone.php delete mode 100644 _samples/placeholder.html delete mode 100644 _samples/readonly.html delete mode 100644 _samples/replacebyclass.html delete mode 100644 _samples/replacebycode.html delete mode 100644 _samples/sample.css delete mode 100644 _samples/sample.js delete mode 100644 _samples/sample_posteddata.php delete mode 100644 _samples/sharedspaces.html delete mode 100644 _samples/skins.html delete mode 100644 _samples/stylesheetparser.html delete mode 100644 _samples/tableresize.html delete mode 100644 _samples/ui_color.html delete mode 100644 _samples/ui_languages.html delete mode 100644 _source/adapters/jquery.js delete mode 100644 _source/core/_bootstrap.js delete mode 100644 _source/core/ckeditor.js delete mode 100644 _source/core/ckeditor_base.js delete mode 100644 _source/core/ckeditor_basic.js delete mode 100644 _source/core/command.js delete mode 100644 _source/core/commanddefinition.js delete mode 100644 _source/core/config.js delete mode 100644 _source/core/dataprocessor.js delete mode 100644 _source/core/dom.js delete mode 100644 _source/core/dom/comment.js delete mode 100644 _source/core/dom/document.js delete mode 100644 _source/core/dom/documentfragment.js delete mode 100644 _source/core/dom/domobject.js delete mode 100644 _source/core/dom/element.js delete mode 100644 _source/core/dom/elementpath.js delete mode 100644 _source/core/dom/event.js delete mode 100644 _source/core/dom/node.js delete mode 100644 _source/core/dom/nodelist.js delete mode 100644 _source/core/dom/range.js delete mode 100644 _source/core/dom/rangelist.js delete mode 100644 _source/core/dom/text.js delete mode 100644 _source/core/dom/walker.js delete mode 100644 _source/core/dom/window.js delete mode 100644 _source/core/dtd.js delete mode 100644 _source/core/editor.js delete mode 100644 _source/core/editor_basic.js delete mode 100644 _source/core/env.js delete mode 100644 _source/core/event.js delete mode 100644 _source/core/eventInfo.js delete mode 100644 _source/core/focusmanager.js delete mode 100644 _source/core/htmlparser.js delete mode 100644 _source/core/htmlparser/basicwriter.js delete mode 100644 _source/core/htmlparser/cdata.js delete mode 100644 _source/core/htmlparser/comment.js delete mode 100644 _source/core/htmlparser/element.js delete mode 100644 _source/core/htmlparser/filter.js delete mode 100644 _source/core/htmlparser/fragment.js delete mode 100644 _source/core/htmlparser/text.js delete mode 100644 _source/core/lang.js delete mode 100644 _source/core/loader.js delete mode 100644 _source/core/plugindefinition.js delete mode 100644 _source/core/plugins.js delete mode 100644 _source/core/resourcemanager.js delete mode 100644 _source/core/scriptloader.js delete mode 100644 _source/core/skins.js delete mode 100644 _source/core/themes.js delete mode 100644 _source/core/tools.js delete mode 100644 _source/core/ui.js delete mode 100644 _source/lang/_languages.js delete mode 100644 _source/lang/_translationstatus.txt delete mode 100644 _source/lang/af.js delete mode 100644 _source/lang/ar.js delete mode 100644 _source/lang/bg.js delete mode 100644 _source/lang/bn.js delete mode 100644 _source/lang/bs.js delete mode 100644 _source/lang/ca.js delete mode 100644 _source/lang/cs.js delete mode 100644 _source/lang/cy.js delete mode 100644 _source/lang/da.js delete mode 100644 _source/lang/de.js delete mode 100644 _source/lang/el.js delete mode 100644 _source/lang/en-au.js delete mode 100644 _source/lang/en-ca.js delete mode 100644 _source/lang/en-gb.js delete mode 100644 _source/lang/en.js delete mode 100644 _source/lang/eo.js delete mode 100644 _source/lang/es.js delete mode 100644 _source/lang/et.js delete mode 100644 _source/lang/eu.js delete mode 100644 _source/lang/fa.js delete mode 100644 _source/lang/fi.js delete mode 100644 _source/lang/fo.js delete mode 100644 _source/lang/fr-ca.js delete mode 100644 _source/lang/fr.js delete mode 100644 _source/lang/gl.js delete mode 100644 _source/lang/gu.js delete mode 100644 _source/lang/he.js delete mode 100644 _source/lang/hi.js delete mode 100644 _source/lang/hr.js delete mode 100644 _source/lang/hu.js delete mode 100644 _source/lang/id.js delete mode 100644 _source/lang/is.js delete mode 100644 _source/lang/it.js delete mode 100644 _source/lang/ja.js delete mode 100644 _source/lang/ka.js delete mode 100644 _source/lang/km.js delete mode 100644 _source/lang/ko.js delete mode 100644 _source/lang/ku.js delete mode 100644 _source/lang/lt.js delete mode 100644 _source/lang/lv.js delete mode 100644 _source/lang/mk.js delete mode 100644 _source/lang/mn.js delete mode 100644 _source/lang/ms.js delete mode 100644 _source/lang/nb.js delete mode 100644 _source/lang/nl.js delete mode 100644 _source/lang/no.js delete mode 100644 _source/lang/pl.js delete mode 100644 _source/lang/pt-br.js delete mode 100644 _source/lang/pt.js delete mode 100644 _source/lang/ro.js delete mode 100644 _source/lang/ru.js delete mode 100644 _source/lang/sk.js delete mode 100644 _source/lang/sl.js delete mode 100644 _source/lang/sr-latn.js delete mode 100644 _source/lang/sr.js delete mode 100644 _source/lang/sv.js delete mode 100644 _source/lang/th.js delete mode 100644 _source/lang/tr.js delete mode 100644 _source/lang/ug.js delete mode 100644 _source/lang/uk.js delete mode 100644 _source/lang/vi.js delete mode 100644 _source/lang/zh-cn.js delete mode 100644 _source/lang/zh.js delete mode 100644 _source/plugins/a11yhelp/dialogs/a11yhelp.js delete mode 100644 _source/plugins/a11yhelp/lang/_translationstatus.txt delete mode 100644 _source/plugins/a11yhelp/lang/cs.js delete mode 100644 _source/plugins/a11yhelp/lang/cy.js delete mode 100644 _source/plugins/a11yhelp/lang/da.js delete mode 100644 _source/plugins/a11yhelp/lang/de.js delete mode 100644 _source/plugins/a11yhelp/lang/el.js delete mode 100644 _source/plugins/a11yhelp/lang/en.js delete mode 100644 _source/plugins/a11yhelp/lang/eo.js delete mode 100644 _source/plugins/a11yhelp/lang/fa.js delete mode 100644 _source/plugins/a11yhelp/lang/fi.js delete mode 100644 _source/plugins/a11yhelp/lang/fr.js delete mode 100644 _source/plugins/a11yhelp/lang/gu.js delete mode 100644 _source/plugins/a11yhelp/lang/he.js delete mode 100644 _source/plugins/a11yhelp/lang/it.js delete mode 100644 _source/plugins/a11yhelp/lang/ku.js delete mode 100644 _source/plugins/a11yhelp/lang/lv.js delete mode 100644 _source/plugins/a11yhelp/lang/mk.js delete mode 100644 _source/plugins/a11yhelp/lang/nb.js delete mode 100644 _source/plugins/a11yhelp/lang/nl.js delete mode 100644 _source/plugins/a11yhelp/lang/no.js delete mode 100644 _source/plugins/a11yhelp/lang/pt-br.js delete mode 100644 _source/plugins/a11yhelp/lang/ro.js delete mode 100644 _source/plugins/a11yhelp/lang/sk.js delete mode 100644 _source/plugins/a11yhelp/lang/tr.js delete mode 100644 _source/plugins/a11yhelp/lang/ug.js delete mode 100644 _source/plugins/a11yhelp/lang/vi.js delete mode 100644 _source/plugins/a11yhelp/lang/zh-cn.js delete mode 100644 _source/plugins/a11yhelp/plugin.js delete mode 100644 _source/plugins/about/dialogs/about.js delete mode 100644 _source/plugins/about/dialogs/logo_ckeditor.png delete mode 100644 _source/plugins/about/plugin.js delete mode 100644 _source/plugins/adobeair/plugin.js delete mode 100644 _source/plugins/ajax/plugin.js delete mode 100644 _source/plugins/autogrow/plugin.js delete mode 100644 _source/plugins/basicstyles/plugin.js delete mode 100644 _source/plugins/bbcode/plugin.js delete mode 100644 _source/plugins/bidi/plugin.js delete mode 100644 _source/plugins/blockquote/plugin.js delete mode 100644 _source/plugins/button/plugin.js delete mode 100644 _source/plugins/clipboard/dialogs/paste.js delete mode 100644 _source/plugins/clipboard/plugin.js delete mode 100644 _source/plugins/colorbutton/plugin.js delete mode 100644 _source/plugins/colordialog/dialogs/colordialog.js delete mode 100644 _source/plugins/colordialog/plugin.js delete mode 100644 _source/plugins/contextmenu/plugin.js delete mode 100644 _source/plugins/devtools/lang/_translationstatus.txt delete mode 100644 _source/plugins/devtools/lang/bg.js delete mode 100644 _source/plugins/devtools/lang/cs.js delete mode 100644 _source/plugins/devtools/lang/cy.js delete mode 100644 _source/plugins/devtools/lang/da.js delete mode 100644 _source/plugins/devtools/lang/de.js delete mode 100644 _source/plugins/devtools/lang/el.js delete mode 100644 _source/plugins/devtools/lang/en.js delete mode 100644 _source/plugins/devtools/lang/eo.js delete mode 100644 _source/plugins/devtools/lang/et.js delete mode 100644 _source/plugins/devtools/lang/fa.js delete mode 100644 _source/plugins/devtools/lang/fi.js delete mode 100644 _source/plugins/devtools/lang/fr.js delete mode 100644 _source/plugins/devtools/lang/gu.js delete mode 100644 _source/plugins/devtools/lang/he.js delete mode 100644 _source/plugins/devtools/lang/hr.js delete mode 100644 _source/plugins/devtools/lang/it.js delete mode 100644 _source/plugins/devtools/lang/ku.js delete mode 100644 _source/plugins/devtools/lang/lv.js delete mode 100644 _source/plugins/devtools/lang/nb.js delete mode 100644 _source/plugins/devtools/lang/nl.js delete mode 100644 _source/plugins/devtools/lang/no.js delete mode 100644 _source/plugins/devtools/lang/pl.js delete mode 100644 _source/plugins/devtools/lang/pt-br.js delete mode 100644 _source/plugins/devtools/lang/sk.js delete mode 100644 _source/plugins/devtools/lang/tr.js delete mode 100644 _source/plugins/devtools/lang/ug.js delete mode 100644 _source/plugins/devtools/lang/uk.js delete mode 100644 _source/plugins/devtools/lang/vi.js delete mode 100644 _source/plugins/devtools/lang/zh-cn.js delete mode 100644 _source/plugins/devtools/plugin.js delete mode 100644 _source/plugins/dialog/dialogDefinition.js delete mode 100644 _source/plugins/dialog/plugin.js delete mode 100644 _source/plugins/dialogadvtab/plugin.js delete mode 100644 _source/plugins/dialogui/plugin.js delete mode 100644 _source/plugins/div/dialogs/div.js delete mode 100644 _source/plugins/div/plugin.js delete mode 100644 _source/plugins/docprops/dialogs/docprops.js delete mode 100644 _source/plugins/docprops/plugin.js delete mode 100644 _source/plugins/domiterator/plugin.js delete mode 100644 _source/plugins/editingblock/plugin.js delete mode 100644 _source/plugins/elementspath/plugin.js delete mode 100644 _source/plugins/enterkey/plugin.js delete mode 100644 _source/plugins/entities/plugin.js delete mode 100644 _source/plugins/fakeobjects/plugin.js delete mode 100644 _source/plugins/filebrowser/plugin.js delete mode 100644 _source/plugins/find/dialogs/find.js delete mode 100644 _source/plugins/find/plugin.js delete mode 100644 _source/plugins/flash/dialogs/flash.js delete mode 100644 _source/plugins/flash/images/placeholder.png delete mode 100644 _source/plugins/flash/plugin.js delete mode 100644 _source/plugins/floatpanel/plugin.js delete mode 100644 _source/plugins/font/plugin.js delete mode 100644 _source/plugins/format/plugin.js delete mode 100644 _source/plugins/forms/dialogs/button.js delete mode 100644 _source/plugins/forms/dialogs/checkbox.js delete mode 100644 _source/plugins/forms/dialogs/form.js delete mode 100644 _source/plugins/forms/dialogs/hiddenfield.js delete mode 100644 _source/plugins/forms/dialogs/radio.js delete mode 100644 _source/plugins/forms/dialogs/select.js delete mode 100644 _source/plugins/forms/dialogs/textarea.js delete mode 100644 _source/plugins/forms/dialogs/textfield.js delete mode 100644 _source/plugins/forms/images/hiddenfield.gif delete mode 100644 _source/plugins/forms/plugin.js delete mode 100644 _source/plugins/horizontalrule/plugin.js delete mode 100644 _source/plugins/htmldataprocessor/plugin.js delete mode 100644 _source/plugins/htmlwriter/plugin.js delete mode 100644 _source/plugins/iframe/dialogs/iframe.js delete mode 100644 _source/plugins/iframe/images/placeholder.png delete mode 100644 _source/plugins/iframe/plugin.js delete mode 100644 _source/plugins/iframedialog/plugin.js delete mode 100644 _source/plugins/image/dialogs/image.js delete mode 100644 _source/plugins/image/plugin.js delete mode 100644 _source/plugins/indent/plugin.js delete mode 100644 _source/plugins/justify/plugin.js delete mode 100644 _source/plugins/keystrokes/plugin.js delete mode 100644 _source/plugins/link/dialogs/anchor.js delete mode 100644 _source/plugins/link/dialogs/link.js delete mode 100644 _source/plugins/link/images/anchor.gif delete mode 100644 _source/plugins/link/plugin.js delete mode 100644 _source/plugins/list/plugin.js delete mode 100644 _source/plugins/listblock/plugin.js delete mode 100644 _source/plugins/liststyle/dialogs/liststyle.js delete mode 100644 _source/plugins/liststyle/plugin.js delete mode 100644 _source/plugins/maximize/plugin.js delete mode 100644 _source/plugins/menu/plugin.js delete mode 100644 _source/plugins/menubutton/plugin.js delete mode 100644 _source/plugins/newpage/plugin.js delete mode 100644 _source/plugins/pagebreak/images/pagebreak.gif delete mode 100644 _source/plugins/pagebreak/plugin.js delete mode 100644 _source/plugins/panel/plugin.js delete mode 100644 _source/plugins/panelbutton/plugin.js delete mode 100644 _source/plugins/pastefromword/filter/default.js delete mode 100644 _source/plugins/pastefromword/plugin.js delete mode 100644 _source/plugins/pastetext/dialogs/pastetext.js delete mode 100644 _source/plugins/pastetext/plugin.js delete mode 100644 _source/plugins/placeholder/dialogs/placeholder.js delete mode 100644 _source/plugins/placeholder/lang/_translationstatus.txt delete mode 100644 _source/plugins/placeholder/lang/bg.js delete mode 100644 _source/plugins/placeholder/lang/cs.js delete mode 100644 _source/plugins/placeholder/lang/cy.js delete mode 100644 _source/plugins/placeholder/lang/da.js delete mode 100644 _source/plugins/placeholder/lang/de.js delete mode 100644 _source/plugins/placeholder/lang/el.js delete mode 100644 _source/plugins/placeholder/lang/en.js delete mode 100644 _source/plugins/placeholder/lang/eo.js delete mode 100644 _source/plugins/placeholder/lang/et.js delete mode 100644 _source/plugins/placeholder/lang/fa.js delete mode 100644 _source/plugins/placeholder/lang/fi.js delete mode 100644 _source/plugins/placeholder/lang/fr.js delete mode 100644 _source/plugins/placeholder/lang/he.js delete mode 100644 _source/plugins/placeholder/lang/hr.js delete mode 100644 _source/plugins/placeholder/lang/it.js delete mode 100644 _source/plugins/placeholder/lang/ku.js delete mode 100644 _source/plugins/placeholder/lang/lv.js delete mode 100644 _source/plugins/placeholder/lang/nb.js delete mode 100644 _source/plugins/placeholder/lang/nl.js delete mode 100644 _source/plugins/placeholder/lang/no.js delete mode 100644 _source/plugins/placeholder/lang/pl.js delete mode 100644 _source/plugins/placeholder/lang/pt-br.js delete mode 100644 _source/plugins/placeholder/lang/sk.js delete mode 100644 _source/plugins/placeholder/lang/tr.js delete mode 100644 _source/plugins/placeholder/lang/ug.js delete mode 100644 _source/plugins/placeholder/lang/uk.js delete mode 100644 _source/plugins/placeholder/lang/vi.js delete mode 100644 _source/plugins/placeholder/lang/zh-cn.js delete mode 100644 _source/plugins/placeholder/placeholder.gif delete mode 100644 _source/plugins/placeholder/plugin.js delete mode 100644 _source/plugins/popup/plugin.js delete mode 100644 _source/plugins/preview/plugin.js delete mode 100644 _source/plugins/preview/preview.html delete mode 100644 _source/plugins/print/plugin.js delete mode 100644 _source/plugins/removeformat/plugin.js delete mode 100644 _source/plugins/resize/plugin.js delete mode 100644 _source/plugins/richcombo/plugin.js delete mode 100644 _source/plugins/save/plugin.js delete mode 100644 _source/plugins/scayt/dialogs/options.js delete mode 100644 _source/plugins/scayt/dialogs/toolbar.css delete mode 100644 _source/plugins/scayt/plugin.js delete mode 100644 _source/plugins/selection/plugin.js delete mode 100644 _source/plugins/showblocks/images/block_address.png delete mode 100644 _source/plugins/showblocks/images/block_blockquote.png delete mode 100644 _source/plugins/showblocks/images/block_div.png delete mode 100644 _source/plugins/showblocks/images/block_h1.png delete mode 100644 _source/plugins/showblocks/images/block_h2.png delete mode 100644 _source/plugins/showblocks/images/block_h3.png delete mode 100644 _source/plugins/showblocks/images/block_h4.png delete mode 100644 _source/plugins/showblocks/images/block_h5.png delete mode 100644 _source/plugins/showblocks/images/block_h6.png delete mode 100644 _source/plugins/showblocks/images/block_p.png delete mode 100644 _source/plugins/showblocks/images/block_pre.png delete mode 100644 _source/plugins/showblocks/plugin.js delete mode 100644 _source/plugins/showborders/plugin.js delete mode 100644 _source/plugins/smiley/dialogs/smiley.js delete mode 100644 _source/plugins/smiley/images/angel_smile.gif delete mode 100644 _source/plugins/smiley/images/angry_smile.gif delete mode 100644 _source/plugins/smiley/images/broken_heart.gif delete mode 100644 _source/plugins/smiley/images/confused_smile.gif delete mode 100644 _source/plugins/smiley/images/cry_smile.gif delete mode 100644 _source/plugins/smiley/images/devil_smile.gif delete mode 100644 _source/plugins/smiley/images/embaressed_smile.gif delete mode 100644 _source/plugins/smiley/images/envelope.gif delete mode 100644 _source/plugins/smiley/images/heart.gif delete mode 100644 _source/plugins/smiley/images/kiss.gif delete mode 100644 _source/plugins/smiley/images/lightbulb.gif delete mode 100644 _source/plugins/smiley/images/omg_smile.gif delete mode 100644 _source/plugins/smiley/images/regular_smile.gif delete mode 100644 _source/plugins/smiley/images/sad_smile.gif delete mode 100644 _source/plugins/smiley/images/shades_smile.gif delete mode 100644 _source/plugins/smiley/images/teeth_smile.gif delete mode 100644 _source/plugins/smiley/images/thumbs_down.gif delete mode 100644 _source/plugins/smiley/images/thumbs_up.gif delete mode 100644 _source/plugins/smiley/images/tounge_smile.gif delete mode 100644 _source/plugins/smiley/images/whatchutalkingabout_smile.gif delete mode 100644 _source/plugins/smiley/images/wink_smile.gif delete mode 100644 _source/plugins/smiley/plugin.js delete mode 100644 _source/plugins/sourcearea/plugin.js delete mode 100644 _source/plugins/specialchar/dialogs/specialchar.js delete mode 100644 _source/plugins/specialchar/lang/_translationstatus.txt delete mode 100644 _source/plugins/specialchar/lang/cs.js delete mode 100644 _source/plugins/specialchar/lang/cy.js delete mode 100644 _source/plugins/specialchar/lang/de.js delete mode 100644 _source/plugins/specialchar/lang/el.js delete mode 100644 _source/plugins/specialchar/lang/en.js delete mode 100644 _source/plugins/specialchar/lang/eo.js delete mode 100644 _source/plugins/specialchar/lang/et.js delete mode 100644 _source/plugins/specialchar/lang/fa.js delete mode 100644 _source/plugins/specialchar/lang/fi.js delete mode 100644 _source/plugins/specialchar/lang/fr.js delete mode 100644 _source/plugins/specialchar/lang/he.js delete mode 100644 _source/plugins/specialchar/lang/hr.js delete mode 100644 _source/plugins/specialchar/lang/it.js delete mode 100644 _source/plugins/specialchar/lang/ku.js delete mode 100644 _source/plugins/specialchar/lang/lv.js delete mode 100644 _source/plugins/specialchar/lang/nb.js delete mode 100644 _source/plugins/specialchar/lang/nl.js delete mode 100644 _source/plugins/specialchar/lang/no.js delete mode 100644 _source/plugins/specialchar/lang/pt-br.js delete mode 100644 _source/plugins/specialchar/lang/sk.js delete mode 100644 _source/plugins/specialchar/lang/tr.js delete mode 100644 _source/plugins/specialchar/lang/ug.js delete mode 100644 _source/plugins/specialchar/lang/zh-cn.js delete mode 100644 _source/plugins/specialchar/plugin.js delete mode 100644 _source/plugins/styles/plugin.js delete mode 100644 _source/plugins/styles/styles/default.js delete mode 100644 _source/plugins/stylescombo/plugin.js delete mode 100644 _source/plugins/stylesheetparser/plugin.js delete mode 100644 _source/plugins/tab/plugin.js delete mode 100644 _source/plugins/table/dialogs/table.js delete mode 100644 _source/plugins/table/plugin.js delete mode 100644 _source/plugins/tableresize/plugin.js delete mode 100644 _source/plugins/tabletools/dialogs/tableCell.js delete mode 100644 _source/plugins/tabletools/plugin.js delete mode 100644 _source/plugins/templates/dialogs/templates.js delete mode 100644 _source/plugins/templates/plugin.js delete mode 100644 _source/plugins/templates/templates/default.js delete mode 100644 _source/plugins/templates/templates/images/template1.gif delete mode 100644 _source/plugins/templates/templates/images/template2.gif delete mode 100644 _source/plugins/templates/templates/images/template3.gif delete mode 100644 _source/plugins/toolbar/plugin.js delete mode 100644 _source/plugins/uicolor/dialogs/uicolor.js delete mode 100644 _source/plugins/uicolor/lang/_translationstatus.txt delete mode 100644 _source/plugins/uicolor/lang/bg.js delete mode 100644 _source/plugins/uicolor/lang/cs.js delete mode 100644 _source/plugins/uicolor/lang/cy.js delete mode 100644 _source/plugins/uicolor/lang/da.js delete mode 100644 _source/plugins/uicolor/lang/de.js delete mode 100644 _source/plugins/uicolor/lang/el.js delete mode 100644 _source/plugins/uicolor/lang/en.js delete mode 100644 _source/plugins/uicolor/lang/eo.js delete mode 100644 _source/plugins/uicolor/lang/et.js delete mode 100644 _source/plugins/uicolor/lang/fa.js delete mode 100644 _source/plugins/uicolor/lang/fi.js delete mode 100644 _source/plugins/uicolor/lang/fr.js delete mode 100644 _source/plugins/uicolor/lang/he.js delete mode 100644 _source/plugins/uicolor/lang/hr.js delete mode 100644 _source/plugins/uicolor/lang/it.js delete mode 100644 _source/plugins/uicolor/lang/ku.js delete mode 100644 _source/plugins/uicolor/lang/lv.js delete mode 100644 _source/plugins/uicolor/lang/mk.js delete mode 100644 _source/plugins/uicolor/lang/nb.js delete mode 100644 _source/plugins/uicolor/lang/nl.js delete mode 100644 _source/plugins/uicolor/lang/no.js delete mode 100644 _source/plugins/uicolor/lang/pl.js delete mode 100644 _source/plugins/uicolor/lang/pt-br.js delete mode 100644 _source/plugins/uicolor/lang/sk.js delete mode 100644 _source/plugins/uicolor/lang/tr.js delete mode 100644 _source/plugins/uicolor/lang/ug.js delete mode 100644 _source/plugins/uicolor/lang/uk.js delete mode 100644 _source/plugins/uicolor/lang/vi.js delete mode 100644 _source/plugins/uicolor/lang/zh-cn.js delete mode 100644 _source/plugins/uicolor/plugin.js delete mode 100644 _source/plugins/uicolor/uicolor.gif delete mode 100644 _source/plugins/uicolor/yui/assets/hue_bg.png delete mode 100644 _source/plugins/uicolor/yui/assets/hue_thumb.png delete mode 100644 _source/plugins/uicolor/yui/assets/picker_mask.png delete mode 100644 _source/plugins/uicolor/yui/assets/picker_thumb.png delete mode 100644 _source/plugins/uicolor/yui/assets/yui.css delete mode 100644 _source/plugins/uicolor/yui/yui.js delete mode 100644 _source/plugins/undo/plugin.js delete mode 100644 _source/plugins/wsc/dialogs/ciframe.html delete mode 100644 _source/plugins/wsc/dialogs/tmpFrameset.html delete mode 100644 _source/plugins/wsc/dialogs/wsc.css delete mode 100644 _source/plugins/wsc/dialogs/wsc.js delete mode 100644 _source/plugins/wsc/plugin.js delete mode 100644 _source/plugins/wysiwygarea/plugin.js delete mode 100644 _source/plugins/xml/plugin.js delete mode 100644 _source/skins/kama/dialog.css delete mode 100644 _source/skins/kama/editor.css delete mode 100644 _source/skins/kama/elementspath.css delete mode 100644 _source/skins/kama/icons.css delete mode 100644 _source/skins/kama/icons.png delete mode 100644 _source/skins/kama/icons_rtl.png delete mode 100644 _source/skins/kama/images/dialog_sides.gif delete mode 100644 _source/skins/kama/images/dialog_sides.png delete mode 100644 _source/skins/kama/images/dialog_sides_rtl.png delete mode 100644 _source/skins/kama/images/mini.gif delete mode 100644 _source/skins/kama/images/noimage.png delete mode 100644 _source/skins/kama/images/sprites.png delete mode 100644 _source/skins/kama/images/sprites_ie6.png delete mode 100644 _source/skins/kama/images/toolbar_start.gif delete mode 100644 _source/skins/kama/mainui.css delete mode 100644 _source/skins/kama/menu.css delete mode 100644 _source/skins/kama/panel.css delete mode 100644 _source/skins/kama/presets.css delete mode 100644 _source/skins/kama/reset.css delete mode 100644 _source/skins/kama/richcombo.css delete mode 100644 _source/skins/kama/skin.js delete mode 100644 _source/skins/kama/templates.css delete mode 100644 _source/skins/kama/toolbar.css delete mode 100644 _source/skins/office2003/dialog.css delete mode 100644 _source/skins/office2003/editor.css delete mode 100644 _source/skins/office2003/elementspath.css delete mode 100644 _source/skins/office2003/icons.css delete mode 100644 _source/skins/office2003/icons.png delete mode 100644 _source/skins/office2003/icons_rtl.png delete mode 100644 _source/skins/office2003/images/dialog_sides.gif delete mode 100644 _source/skins/office2003/images/dialog_sides.png delete mode 100644 _source/skins/office2003/images/dialog_sides_rtl.png delete mode 100644 _source/skins/office2003/images/mini.gif delete mode 100644 _source/skins/office2003/images/noimage.png delete mode 100644 _source/skins/office2003/images/sprites.png delete mode 100644 _source/skins/office2003/images/sprites_ie6.png delete mode 100644 _source/skins/office2003/mainui.css delete mode 100644 _source/skins/office2003/menu.css delete mode 100644 _source/skins/office2003/panel.css delete mode 100644 _source/skins/office2003/presets.css delete mode 100644 _source/skins/office2003/reset.css delete mode 100644 _source/skins/office2003/richcombo.css delete mode 100644 _source/skins/office2003/skin.js delete mode 100644 _source/skins/office2003/templates.css delete mode 100644 _source/skins/office2003/toolbar.css delete mode 100644 _source/skins/v2/dialog.css delete mode 100644 _source/skins/v2/editor.css delete mode 100644 _source/skins/v2/elementspath.css delete mode 100644 _source/skins/v2/icons.css delete mode 100644 _source/skins/v2/icons.png delete mode 100644 _source/skins/v2/icons_rtl.png delete mode 100644 _source/skins/v2/images/dialog_sides.gif delete mode 100644 _source/skins/v2/images/dialog_sides.png delete mode 100644 _source/skins/v2/images/dialog_sides_rtl.png delete mode 100644 _source/skins/v2/images/mini.gif delete mode 100644 _source/skins/v2/images/noimage.png delete mode 100644 _source/skins/v2/images/sprites.png delete mode 100644 _source/skins/v2/images/sprites_ie6.png delete mode 100644 _source/skins/v2/images/toolbar_start.gif delete mode 100644 _source/skins/v2/mainui.css delete mode 100644 _source/skins/v2/menu.css delete mode 100644 _source/skins/v2/panel.css delete mode 100644 _source/skins/v2/presets.css delete mode 100644 _source/skins/v2/reset.css delete mode 100644 _source/skins/v2/richcombo.css delete mode 100644 _source/skins/v2/skin.js delete mode 100644 _source/skins/v2/templates.css delete mode 100644 _source/skins/v2/toolbar.css delete mode 100644 _source/themes/default/theme.js delete mode 100644 adapters/jquery.js create mode 100644 build-config.js delete mode 100644 ckeditor.asp delete mode 100644 ckeditor.pack delete mode 100644 ckeditor.php delete mode 100644 ckeditor_basic.js delete mode 100644 ckeditor_basic_source.js delete mode 100644 ckeditor_php4.php delete mode 100644 ckeditor_php5.php delete mode 100644 ckeditor_source.js delete mode 100644 images/spacer.gif delete mode 100644 lang/_languages.js delete mode 100644 lang/_translationstatus.txt delete mode 100644 lang/id.js create mode 100644 plugins/a11yhelp/dialogs/lang/_translationstatus.txt create mode 100644 plugins/a11yhelp/dialogs/lang/ar.js create mode 100644 plugins/a11yhelp/dialogs/lang/bg.js create mode 100644 plugins/a11yhelp/dialogs/lang/ca.js create mode 100644 plugins/a11yhelp/dialogs/lang/cs.js create mode 100644 plugins/a11yhelp/dialogs/lang/cy.js create mode 100644 plugins/a11yhelp/dialogs/lang/da.js create mode 100644 plugins/a11yhelp/dialogs/lang/de.js create mode 100644 plugins/a11yhelp/dialogs/lang/el.js create mode 100644 plugins/a11yhelp/dialogs/lang/en.js create mode 100644 plugins/a11yhelp/dialogs/lang/eo.js create mode 100644 plugins/a11yhelp/dialogs/lang/et.js create mode 100644 plugins/a11yhelp/dialogs/lang/fa.js create mode 100644 plugins/a11yhelp/dialogs/lang/fi.js create mode 100644 plugins/a11yhelp/dialogs/lang/fr.js create mode 100644 plugins/a11yhelp/dialogs/lang/gu.js create mode 100644 plugins/a11yhelp/dialogs/lang/he.js create mode 100644 plugins/a11yhelp/dialogs/lang/hi.js create mode 100644 plugins/a11yhelp/dialogs/lang/hr.js create mode 100644 plugins/a11yhelp/dialogs/lang/hu.js create mode 100644 plugins/a11yhelp/dialogs/lang/it.js create mode 100644 plugins/a11yhelp/dialogs/lang/ku.js create mode 100644 plugins/a11yhelp/dialogs/lang/lt.js create mode 100644 plugins/a11yhelp/dialogs/lang/lv.js create mode 100644 plugins/a11yhelp/dialogs/lang/mk.js create mode 100644 plugins/a11yhelp/dialogs/lang/mn.js create mode 100644 plugins/a11yhelp/dialogs/lang/nb.js create mode 100644 plugins/a11yhelp/dialogs/lang/nl.js create mode 100644 plugins/a11yhelp/dialogs/lang/no.js create mode 100644 plugins/a11yhelp/dialogs/lang/pl.js create mode 100644 plugins/a11yhelp/dialogs/lang/pt-br.js create mode 100644 plugins/a11yhelp/dialogs/lang/pt.js create mode 100644 plugins/a11yhelp/dialogs/lang/ro.js create mode 100644 plugins/a11yhelp/dialogs/lang/ru.js create mode 100644 plugins/a11yhelp/dialogs/lang/sk.js create mode 100644 plugins/a11yhelp/dialogs/lang/sl.js create mode 100644 plugins/a11yhelp/dialogs/lang/tr.js create mode 100644 plugins/a11yhelp/dialogs/lang/ug.js create mode 100644 plugins/a11yhelp/dialogs/lang/uk.js create mode 100644 plugins/a11yhelp/dialogs/lang/vi.js create mode 100644 plugins/a11yhelp/dialogs/lang/zh-cn.js delete mode 100644 plugins/a11yhelp/lang/_translationstatus.txt delete mode 100644 plugins/a11yhelp/lang/cs.js delete mode 100644 plugins/a11yhelp/lang/cy.js delete mode 100644 plugins/a11yhelp/lang/da.js delete mode 100644 plugins/a11yhelp/lang/de.js delete mode 100644 plugins/a11yhelp/lang/el.js delete mode 100644 plugins/a11yhelp/lang/en.js delete mode 100644 plugins/a11yhelp/lang/eo.js delete mode 100644 plugins/a11yhelp/lang/fa.js delete mode 100644 plugins/a11yhelp/lang/fi.js delete mode 100644 plugins/a11yhelp/lang/fr.js delete mode 100644 plugins/a11yhelp/lang/gu.js delete mode 100644 plugins/a11yhelp/lang/he.js delete mode 100644 plugins/a11yhelp/lang/it.js delete mode 100644 plugins/a11yhelp/lang/ku.js delete mode 100644 plugins/a11yhelp/lang/lv.js delete mode 100644 plugins/a11yhelp/lang/mk.js delete mode 100644 plugins/a11yhelp/lang/nb.js delete mode 100644 plugins/a11yhelp/lang/nl.js delete mode 100644 plugins/a11yhelp/lang/no.js delete mode 100644 plugins/a11yhelp/lang/pt-br.js delete mode 100644 plugins/a11yhelp/lang/ro.js delete mode 100644 plugins/a11yhelp/lang/sk.js delete mode 100644 plugins/a11yhelp/lang/tr.js delete mode 100644 plugins/a11yhelp/lang/ug.js delete mode 100644 plugins/a11yhelp/lang/vi.js delete mode 100644 plugins/a11yhelp/lang/zh-cn.js delete mode 100644 plugins/adobeair/plugin.js delete mode 100644 plugins/ajax/plugin.js delete mode 100644 plugins/autogrow/plugin.js delete mode 100644 plugins/bbcode/plugin.js delete mode 100644 plugins/devtools/lang/_translationstatus.txt delete mode 100644 plugins/devtools/lang/bg.js delete mode 100644 plugins/devtools/lang/cs.js delete mode 100644 plugins/devtools/lang/cy.js delete mode 100644 plugins/devtools/lang/da.js delete mode 100644 plugins/devtools/lang/de.js delete mode 100644 plugins/devtools/lang/el.js delete mode 100644 plugins/devtools/lang/en.js delete mode 100644 plugins/devtools/lang/eo.js delete mode 100644 plugins/devtools/lang/et.js delete mode 100644 plugins/devtools/lang/fa.js delete mode 100644 plugins/devtools/lang/fi.js delete mode 100644 plugins/devtools/lang/fr.js delete mode 100644 plugins/devtools/lang/gu.js delete mode 100644 plugins/devtools/lang/he.js delete mode 100644 plugins/devtools/lang/hr.js delete mode 100644 plugins/devtools/lang/it.js delete mode 100644 plugins/devtools/lang/ku.js delete mode 100644 plugins/devtools/lang/lv.js delete mode 100644 plugins/devtools/lang/nb.js delete mode 100644 plugins/devtools/lang/nl.js delete mode 100644 plugins/devtools/lang/no.js delete mode 100644 plugins/devtools/lang/pl.js delete mode 100644 plugins/devtools/lang/pt-br.js delete mode 100644 plugins/devtools/lang/sk.js delete mode 100644 plugins/devtools/lang/tr.js delete mode 100644 plugins/devtools/lang/ug.js delete mode 100644 plugins/devtools/lang/uk.js delete mode 100644 plugins/devtools/lang/vi.js delete mode 100644 plugins/devtools/lang/zh-cn.js delete mode 100644 plugins/devtools/plugin.js delete mode 100644 plugins/docprops/dialogs/docprops.js delete mode 100644 plugins/docprops/plugin.js create mode 100644 plugins/fakeobjects/images/spacer.gif create mode 100644 plugins/icons.png delete mode 100644 plugins/iframedialog/plugin.js create mode 100644 plugins/image/images/noimage.png delete mode 100644 plugins/link/images/anchor.gif create mode 100644 plugins/link/images/anchor.png create mode 100644 plugins/magicline/images/icon.png delete mode 100644 plugins/pastetext/dialogs/pastetext.js delete mode 100644 plugins/placeholder/dialogs/placeholder.js delete mode 100644 plugins/placeholder/lang/_translationstatus.txt delete mode 100644 plugins/placeholder/lang/bg.js delete mode 100644 plugins/placeholder/lang/cs.js delete mode 100644 plugins/placeholder/lang/cy.js delete mode 100644 plugins/placeholder/lang/da.js delete mode 100644 plugins/placeholder/lang/de.js delete mode 100644 plugins/placeholder/lang/el.js delete mode 100644 plugins/placeholder/lang/en.js delete mode 100644 plugins/placeholder/lang/eo.js delete mode 100644 plugins/placeholder/lang/et.js delete mode 100644 plugins/placeholder/lang/fa.js delete mode 100644 plugins/placeholder/lang/fi.js delete mode 100644 plugins/placeholder/lang/fr.js delete mode 100644 plugins/placeholder/lang/he.js delete mode 100644 plugins/placeholder/lang/hr.js delete mode 100644 plugins/placeholder/lang/it.js delete mode 100644 plugins/placeholder/lang/ku.js delete mode 100644 plugins/placeholder/lang/lv.js delete mode 100644 plugins/placeholder/lang/nb.js delete mode 100644 plugins/placeholder/lang/nl.js delete mode 100644 plugins/placeholder/lang/no.js delete mode 100644 plugins/placeholder/lang/pl.js delete mode 100644 plugins/placeholder/lang/pt-br.js delete mode 100644 plugins/placeholder/lang/sk.js delete mode 100644 plugins/placeholder/lang/tr.js delete mode 100644 plugins/placeholder/lang/ug.js delete mode 100644 plugins/placeholder/lang/uk.js delete mode 100644 plugins/placeholder/lang/vi.js delete mode 100644 plugins/placeholder/lang/zh-cn.js delete mode 100644 plugins/placeholder/placeholder.gif delete mode 100644 plugins/placeholder/plugin.js delete mode 100644 plugins/scayt/dialogs/options.js delete mode 100644 plugins/scayt/dialogs/toolbar.css create mode 100644 plugins/smiley/images/embarrassed_smile.gif create mode 100644 plugins/smiley/images/tongue_smile.gif create mode 100644 plugins/specialchar/dialogs/lang/_translationstatus.txt create mode 100644 plugins/specialchar/dialogs/lang/ca.js create mode 100644 plugins/specialchar/dialogs/lang/cs.js create mode 100644 plugins/specialchar/dialogs/lang/cy.js create mode 100644 plugins/specialchar/dialogs/lang/de.js create mode 100644 plugins/specialchar/dialogs/lang/el.js create mode 100644 plugins/specialchar/dialogs/lang/en.js create mode 100644 plugins/specialchar/dialogs/lang/eo.js create mode 100644 plugins/specialchar/dialogs/lang/et.js create mode 100644 plugins/specialchar/dialogs/lang/fa.js create mode 100644 plugins/specialchar/dialogs/lang/fi.js create mode 100644 plugins/specialchar/dialogs/lang/fr.js create mode 100644 plugins/specialchar/dialogs/lang/he.js create mode 100644 plugins/specialchar/dialogs/lang/hr.js create mode 100644 plugins/specialchar/dialogs/lang/it.js create mode 100644 plugins/specialchar/dialogs/lang/ku.js create mode 100644 plugins/specialchar/dialogs/lang/lv.js create mode 100644 plugins/specialchar/dialogs/lang/nb.js create mode 100644 plugins/specialchar/dialogs/lang/nl.js create mode 100644 plugins/specialchar/dialogs/lang/no.js create mode 100644 plugins/specialchar/dialogs/lang/pt-br.js create mode 100644 plugins/specialchar/dialogs/lang/sk.js create mode 100644 plugins/specialchar/dialogs/lang/tr.js create mode 100644 plugins/specialchar/dialogs/lang/ug.js create mode 100644 plugins/specialchar/dialogs/lang/zh-cn.js delete mode 100644 plugins/specialchar/lang/_translationstatus.txt delete mode 100644 plugins/specialchar/lang/cs.js delete mode 100644 plugins/specialchar/lang/cy.js delete mode 100644 plugins/specialchar/lang/de.js delete mode 100644 plugins/specialchar/lang/el.js delete mode 100644 plugins/specialchar/lang/en.js delete mode 100644 plugins/specialchar/lang/eo.js delete mode 100644 plugins/specialchar/lang/et.js delete mode 100644 plugins/specialchar/lang/fa.js delete mode 100644 plugins/specialchar/lang/fi.js delete mode 100644 plugins/specialchar/lang/fr.js delete mode 100644 plugins/specialchar/lang/he.js delete mode 100644 plugins/specialchar/lang/hr.js delete mode 100644 plugins/specialchar/lang/it.js delete mode 100644 plugins/specialchar/lang/ku.js delete mode 100644 plugins/specialchar/lang/lv.js delete mode 100644 plugins/specialchar/lang/nb.js delete mode 100644 plugins/specialchar/lang/nl.js delete mode 100644 plugins/specialchar/lang/no.js delete mode 100644 plugins/specialchar/lang/pt-br.js delete mode 100644 plugins/specialchar/lang/sk.js delete mode 100644 plugins/specialchar/lang/tr.js delete mode 100644 plugins/specialchar/lang/ug.js delete mode 100644 plugins/specialchar/lang/zh-cn.js delete mode 100644 plugins/styles/styles/default.js delete mode 100644 plugins/stylesheetparser/plugin.js delete mode 100644 plugins/tableresize/plugin.js create mode 100644 plugins/templates/dialogs/templates.css delete mode 100644 plugins/uicolor/dialogs/uicolor.js delete mode 100644 plugins/uicolor/lang/_translationstatus.txt delete mode 100644 plugins/uicolor/lang/bg.js delete mode 100644 plugins/uicolor/lang/cs.js delete mode 100644 plugins/uicolor/lang/cy.js delete mode 100644 plugins/uicolor/lang/da.js delete mode 100644 plugins/uicolor/lang/de.js delete mode 100644 plugins/uicolor/lang/el.js delete mode 100644 plugins/uicolor/lang/en.js delete mode 100644 plugins/uicolor/lang/eo.js delete mode 100644 plugins/uicolor/lang/et.js delete mode 100644 plugins/uicolor/lang/fa.js delete mode 100644 plugins/uicolor/lang/fi.js delete mode 100644 plugins/uicolor/lang/fr.js delete mode 100644 plugins/uicolor/lang/he.js delete mode 100644 plugins/uicolor/lang/hr.js delete mode 100644 plugins/uicolor/lang/it.js delete mode 100644 plugins/uicolor/lang/ku.js delete mode 100644 plugins/uicolor/lang/lv.js delete mode 100644 plugins/uicolor/lang/mk.js delete mode 100644 plugins/uicolor/lang/nb.js delete mode 100644 plugins/uicolor/lang/nl.js delete mode 100644 plugins/uicolor/lang/no.js delete mode 100644 plugins/uicolor/lang/pl.js delete mode 100644 plugins/uicolor/lang/pt-br.js delete mode 100644 plugins/uicolor/lang/sk.js delete mode 100644 plugins/uicolor/lang/tr.js delete mode 100644 plugins/uicolor/lang/ug.js delete mode 100644 plugins/uicolor/lang/uk.js delete mode 100644 plugins/uicolor/lang/vi.js delete mode 100644 plugins/uicolor/lang/zh-cn.js delete mode 100644 plugins/uicolor/plugin.js delete mode 100644 plugins/uicolor/uicolor.gif delete mode 100644 plugins/uicolor/yui/assets/hue_bg.png delete mode 100644 plugins/uicolor/yui/assets/hue_thumb.png delete mode 100644 plugins/uicolor/yui/assets/picker_mask.png delete mode 100644 plugins/uicolor/yui/assets/picker_thumb.png delete mode 100644 plugins/uicolor/yui/assets/yui.css delete mode 100644 plugins/uicolor/yui/yui.js delete mode 100644 plugins/wsc/dialogs/ciframe.html delete mode 100644 plugins/wsc/dialogs/tmpFrameset.html delete mode 100644 plugins/wsc/dialogs/wsc.css delete mode 100644 plugins/wsc/dialogs/wsc.js delete mode 100644 plugins/xml/plugin.js create mode 100644 samples/ajax.html create mode 100644 samples/api.html create mode 100644 samples/appendto.html create mode 100644 samples/assets/inlineall/logo.png create mode 100644 samples/assets/outputxhtml/outputxhtml.css create mode 100644 samples/assets/posteddata.php create mode 100644 samples/assets/sample.css create mode 100644 samples/assets/sample.jpg create mode 100644 samples/assets/uilanguages/languages.js create mode 100644 samples/divreplace.html create mode 100644 samples/index.html create mode 100644 samples/inlineall.html create mode 100644 samples/inlinebycode.html create mode 100644 samples/plugins/dialog/assets/my_dialog.js create mode 100644 samples/plugins/dialog/dialog.html create mode 100644 samples/plugins/enterkey/enterkey.html create mode 100644 samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla create mode 100644 samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf create mode 100644 samples/plugins/htmlwriter/assets/outputforflash/swfobject.js create mode 100644 samples/plugins/htmlwriter/outputforflash.html create mode 100644 samples/plugins/htmlwriter/outputhtml.html create mode 100644 samples/plugins/magicline/magicline.html create mode 100644 samples/plugins/toolbar/toolbar.html create mode 100644 samples/plugins/wysiwygarea/fullpage.html create mode 100644 samples/readonly.html create mode 100644 samples/replacebyclass.html create mode 100644 samples/replacebycode.html create mode 100644 samples/sample.css create mode 100644 samples/sample.js create mode 100644 samples/sample_posteddata.php create mode 100644 samples/tabindex.html create mode 100644 samples/uicolor.html create mode 100644 samples/uilanguages.html create mode 100644 samples/xhtmlstyle.html delete mode 100644 skins/kama/dialog.css delete mode 100644 skins/kama/editor.css delete mode 100644 skins/kama/icons.png delete mode 100644 skins/kama/icons_rtl.png delete mode 100644 skins/kama/images/dialog_sides.gif delete mode 100644 skins/kama/images/dialog_sides.png delete mode 100644 skins/kama/images/dialog_sides_rtl.png delete mode 100644 skins/kama/images/mini.gif delete mode 100644 skins/kama/images/noimage.png delete mode 100644 skins/kama/images/sprites.png delete mode 100644 skins/kama/images/sprites_ie6.png delete mode 100644 skins/kama/images/toolbar_start.gif delete mode 100644 skins/kama/skin.js delete mode 100644 skins/kama/templates.css create mode 100644 skins/moono/dialog.css create mode 100644 skins/moono/dialog_ie.css create mode 100644 skins/moono/dialog_ie7.css create mode 100644 skins/moono/dialog_ie8.css create mode 100644 skins/moono/dialog_opera.css create mode 100644 skins/moono/editor.css create mode 100644 skins/moono/editor_gecko.css create mode 100644 skins/moono/editor_ie.css create mode 100644 skins/moono/editor_ie7.css create mode 100644 skins/moono/editor_ie8.css create mode 100644 skins/moono/icons.png create mode 100644 skins/moono/images/arrow.png create mode 100644 skins/moono/images/close.png create mode 100644 skins/moono/images/mini.png create mode 100644 skins/moono/readme.md delete mode 100644 skins/office2003/dialog.css delete mode 100644 skins/office2003/editor.css delete mode 100644 skins/office2003/icons.png delete mode 100644 skins/office2003/icons_rtl.png delete mode 100644 skins/office2003/images/dialog_sides.gif delete mode 100644 skins/office2003/images/dialog_sides.png delete mode 100644 skins/office2003/images/dialog_sides_rtl.png delete mode 100644 skins/office2003/images/mini.gif delete mode 100644 skins/office2003/images/noimage.png delete mode 100644 skins/office2003/images/sprites.png delete mode 100644 skins/office2003/images/sprites_ie6.png delete mode 100644 skins/office2003/skin.js delete mode 100644 skins/office2003/templates.css delete mode 100644 skins/v2/dialog.css delete mode 100644 skins/v2/editor.css delete mode 100644 skins/v2/icons.png delete mode 100644 skins/v2/icons_rtl.png delete mode 100644 skins/v2/images/dialog_sides.gif delete mode 100644 skins/v2/images/dialog_sides.png delete mode 100644 skins/v2/images/dialog_sides_rtl.png delete mode 100644 skins/v2/images/mini.gif delete mode 100644 skins/v2/images/noimage.png delete mode 100644 skins/v2/images/sprites.png delete mode 100644 skins/v2/images/sprites_ie6.png delete mode 100644 skins/v2/images/toolbar_start.gif delete mode 100644 skins/v2/skin.js delete mode 100644 skins/v2/templates.css create mode 100644 styles.js delete mode 100644 themes/default/theme.js diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 77f2be1..0000000 --- a/.htaccess +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -# For licensing, see LICENSE.html or http://ckeditor.com/license -# - -# -# On some specific Linux installations you could face problems with Firefox. -# It could give you errors when loading the editor saying that some illegal -# characters were found (three strange chars in the beginning of the file). -# This could happen if you map the .js or .css files to PHP, for example. -# -# Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. -# All FCKeditor files are Unicode encoded. -# - -AddType application/x-javascript .js -AddType text/css .css - -# -# If PHP is mapped to handle XML files, you could have some issues. The -# following will disable it. -# - -AddType text/xml .xml diff --git a/CHANGES.html b/CHANGES.html deleted file mode 100644 index 7699f1f..0000000 --- a/CHANGES.html +++ /dev/null @@ -1,1598 +0,0 @@ - - - - - Changelog — CKEditor - - - - -

- CKEditor Changelog -

-

- CKEditor 3.6.6.1

-

- Fixed issues:

- -

- CKEditor 3.6.6

-

- Fixed issues:

- -

- CKEditor 3.6.5

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.6.4

-

- Fixed issues:

- -

- CKEditor 3.6.3

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.6.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.6.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.6

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.5.4

-

- Fixed issues:

- -

- CKEditor 3.5.3

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.5.2

-

- Fixed issues:

- -

- CKEditor 3.5.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.5

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.4.3

-

- Fixed issues:

- -

- CKEditor 3.4.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.4.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.4

-

- Fixed issues:

- -

- CKEditor 3.4 Beta

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.3.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.3.1

-

- Fixed issues:

- -

- CKEditor 3.3

-

- New features:

- -

- CKEditor 3.2.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.2.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.1.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0.2

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0.1

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0

-

- New features:

- -

- Fixed issues:

- -

- CKEditor 3.0 RC

-

- Changelog starts at this release.

- - - diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..98ecdf4 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,12 @@ +CKEditor 4 Changelog +==================== + +## CKEditor 4.0 + +The first stable release of the new CKEditor 4 code line. + +The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever +possible. The list of relevant changes can be found in the [API Changes page of +the CKEditor 4 documentation][1]. + +[1]: http://docs.ckeditor.com/#!/guide/dev_api_changes "API Changes"" diff --git a/INSTALL.html b/INSTALL.html deleted file mode 100644 index 7ac30d8..0000000 --- a/INSTALL.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - Installation Guide - CKEditor - - - - -

- CKEditor Installation Guide

-

- What's CKEditor?

-

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

-

- Installation

-

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

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

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

-

- Checking Your Installation -

-

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

-

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

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

- Documentation

-

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

- - - diff --git a/LICENSE.html b/LICENSE.html deleted file mode 100644 index 87fede2..0000000 --- a/LICENSE.html +++ /dev/null @@ -1,1327 +0,0 @@ - - - - - License - CKEditor - - -

- Software License Agreement -

-

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

-

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

- -

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

-

- Sources of Intellectual Property Included in CKEditor -

-

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

-

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

-

- Trademarks -

-

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

- - diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..2a69d60 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,1264 @@ +Software License Agreement +========================== + +CKEditor - The text editor for Internet - http://ckeditor.com +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. + +Licensed under the terms of any of the following licenses at your +choice: + + - GNU General Public License Version 2 or later (the "GPL") + http://www.gnu.org/licenses/gpl.html + (See Appendix A) + + - GNU Lesser General Public License Version 2.1 or later (the "LGPL") + http://www.gnu.org/licenses/lgpl.html + (See Appendix B) + + - Mozilla Public License Version 1.1 or later (the "MPL") + http://www.mozilla.org/MPL/MPL-1.1.html + (See Appendix C) + +You are not required to, but if you want to explicitly declare the +license you have chosen to be bound to when using, reproducing, +modifying and distributing this software, just include a text file +titled "legal.txt" in your version of this software, indicating your +license choice. In any case, your choice will not restrict any +recipient of your version of this software to use, reproduce, modify +and distribute this software under any of the above licenses. + +Sources of Intellectual Property Included in CKEditor +----------------------------------------------------- + +Where not otherwise indicated, all CKEditor content is authored by +CKSource engineers and consists of CKSource-owned intellectual +property. In some specific instances, CKEditor will incorporate work +done by developers outside of CKSource with their express permission. + +Trademarks +---------- + +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand +and product names are trademarks, registered trademarks or service +marks of their respective holders. + +--- + +Appendix A: The GPL License +--------------------------- + +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software-to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + +GNU GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + +NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + + +Appendix B: The LGPL License +---------------------------- + +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + +Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software-to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages-typically libraries-of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + +GNU LESSER GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + +NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +END OF TERMS AND CONDITIONS + + +Appendix C: The MPL License +--------------------------- + +MOZILLA PUBLIC LICENSE +Version 1.1 + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the + Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to + the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally + accepted in the software development community for the electronic + transfer of data. + + 1.5. "Executable" means Covered Code in any form other than Source + Code. + + 1.6. "Initial Developer" means the individual or entity identified + as the Initial Developer in the Source Code notice required by Exhibit + A. + + 1.7. "Larger Work" means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: + A. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or + previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this + License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus + any associated interface definition files, scripts used to control + compilation and installation of an Executable, or source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, this + License or a future version of this License issued under Section 6.1. + For legal entities, "You" includes any entity which controls, is + controlled by, or is under common control with You. For purposes of + this definition, "control" means (a) the power, direct or indirect, + to cause the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty percent + (50%) of the outstanding shares or beneficial ownership of such + entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + claims: + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Code (or portions thereof) with or without Modifications, and/or + as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or + selling of Original Code, to make, have made, use, practice, + sell, and offer for sale, and/or otherwise dispose of the + Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are + effective on the date Initial Developer first distributes + Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: 1) for code that You delete from the Original Code; 2) + separate from the Original Code; or 3) for infringements caused + by: i) the modification of the Original Code or ii) the + combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor + hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor, to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof) either on an + unmodified basis, with other Modifications, as Covered Code + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either alone + and/or in combination with its Contributor Version (or portions + of such combination), to make, use, sell, offer for sale, have + made, and/or otherwise dispose of: 1) Modifications made by that + Contributor (or portions thereof); and 2) the combination of + Modifications made by that Contributor with its Contributor + Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first makes Commercial Use of + the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: 1) for any code that Contributor has deleted from the + Contributor Version; 2) separate from the Contributor Version; + 3) for infringements caused by: i) third party modifications of + Contributor Version or ii) the combination of Modifications made + by that Contributor with other software (except as part of the + Contributor Version) or other devices; or 4) under Patent Claims + infringed by Covered Code in the absence of Modifications made by + that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be + distributed only under the terms of this License or a future version + of this License released under Section 6.1, and You must include a + copy of this License with every copy of the Source Code You + distribute. You may not offer or impose any terms on any Source Code + version that alters or restricts the applicable version of this + License or the recipients' rights hereunder. However, You may include + an additional document offering the additional rights described in + Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that + the Modification is derived, directly or indirectly, from Original + Code provided by the Initial Developer and including the name of the + Initial Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's + intellectual property rights is required to exercise the rights + granted by such Contributor under Sections 2.1 or 2.2, + Contributor must include a text file with the Source Code + distribution titled "LEGAL" which describes the claim and the + party making the claim in sufficient detail that a recipient will + know whom to contact. If Contributor obtains such knowledge after + the Modification is made available as described in Section 3.2, + Contributor shall promptly modify the LEGAL file in all copies + Contributor makes available thereafter and shall take other steps + (such as notifying appropriate mailing lists or newsgroups) + reasonably calculated to inform those who received the Covered + Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming + interface and Contributor has knowledge of patent licenses which + are reasonably necessary to implement that API, Contributor must + also include this information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to + Section 3.4(a) above, Contributor believes that Contributor's + Modifications are Contributor's original creation(s) and/or + Contributor has sufficient rights to grant the rights conveyed by + this License. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source + Code. If it is not possible to put such notice in a particular Source + Code file due to its structure, then You must include such notice in a + location (such as a relevant directory) where a user would be likely + to look for such a notice. If You created one or more Modification(s) + You may add your name as a Contributor to the notice described in + Exhibit A. You must also duplicate this License in any documentation + for the Source Code where You describe recipients' rights or ownership + rights relating to Covered Code. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Code. However, You + may do so only on Your own behalf, and not on behalf of the Initial + Developer or any Contributor. You must make it absolutely clear than + any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred by the + Initial Developer or such Contributor as a result of warranty, + support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of + the Covered Code is available under the terms of this License, + including a description of how and where You have fulfilled the + obligations of Section 3.2. The notice must be conspicuously included + in any notice in an Executable version, related documentation or + collateral in which You describe recipients' rights relating to the + Covered Code. You may distribute the Executable version of Covered + Code or ownership rights under a license of Your choice, which may + contain terms different from this License, provided that You are in + compliance with the terms of this License and that the license for the + Executable version does not attempt to limit or alter the recipient's + rights in the Source Code version from the rights set forth in this + License. If You distribute the Executable version under a different + license You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial + Developer or any Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred by + the Initial Developer or such Contributor as a result of any such + terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description + must be included in the LEGAL file described in Section 3.4 and must + be included with all distributions of the Source Code. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has + attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised + and/or new versions of the License from time to time. Each version + will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), You must (a) rename Your license so that + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", + "MPL", "NPL" or any confusingly similar phrase do not appear in your + license (except to note that your license differs from this License) + and (b) otherwise make it clear that Your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial + Developer, Original Code or Contributor in the notice described in + Exhibit A shall not of themselves be deemed to be modifications of + this License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement + claim (excluding declatory judgment actions) against Initial Developer + or a Contributor (the Initial Developer or Contributor against whom + You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly + infringes any patent, then any and all rights granted by such + Participant to You under Sections 2.1 and/or 2.2 of this License + shall, upon 60 days notice from Participant terminate prospectively, + unless if within 60 days after receipt of notice You either: (i) + agree in writing to pay Participant a mutually agreeable reasonable + royalty for Your past and future use of Modifications made by such + Participant, or (ii) withdraw Your litigation claim with respect to + the Contributor Version against such Participant. If within 60 days + of notice, a reasonable royalty and payment arrangement are not + mutually agreed upon in writing by the parties or the litigation claim + is not withdrawn, the rights granted by Participant to You under + Sections 2.1 and/or 2.2 automatically terminate at the expiration of + the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's + Contributor Version, directly or indirectly infringes any patent, then + any rights granted to You by such Participant under Sections 2.1(b) + and 2.2(b) are revoked effective as of the date You first made, used, + sold, distributed, or had made, Modifications made by that + Participant. + + 8.3. If You assert a patent infringement claim against Participant + alleging that such Participant's Contributor Version directly or + indirectly infringes any patent where such claim is resolved (such as + by license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or any distributor hereunder + prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR + ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY + CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, + WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO + THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" and "commercial computer software documentation," as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if + any, provides otherwise), excluding its conflict-of-law provisions. + With respect to disputes in which at least one party is a citizen of, + or an entity chartered or registered to do business in the United + States of America, any litigation relating to this License shall be + subject to the jurisdiction of the Federal Courts of the Northern + District of California, with venue lying in Santa Clara County, + California, with the losing party responsible for costs, including + without limitation, court costs and reasonable attorneys' fees and + expenses. The application of the United Nations Convention on + Contracts for the International Sale of Goods is expressly excluded. + Any law or regulation which provides that the language of a contract + shall be construed against the drafter shall not apply to this + License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as + "Multiple-Licensed". "Multiple-Licensed" means that the Initial + Developer permits you to utilize portions of the Covered Code under + Your choice of the NPL or the alternative licenses, if any, specified + by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A -Mozilla Public License. + + ``The contents of this file are subject to the Mozilla Public License + Version 1.1 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms + of the _____ license (the "[___] License"), in which case the + provisions of [______] License are applicable instead of those + above. If you wish to allow use of your version of this file only + under the terms of the [____] License and not to allow others to use + your version of this file under the MPL, indicate your decision by + deleting the provisions above and replace them with the notice and + other provisions required by the [___] License. If you do not delete + the provisions above, a recipient may use your version of this file + under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of + the notices in the Source Code files of the Original Code. You should + use the text of this Exhibit A rather than the text found in the + Original Code Source Code for Your Modifications.] diff --git a/README.md b/README.md new file mode 100644 index 0000000..68f930b --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +CKEditor 4 +========== + +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +http://ckeditor.com - See LICENSE.md for license information. + +CKEditor is a text editor to be used inside web pages. It's not a replacement +for desktop text editors like Word or OpenOffice, but a component to be used as +part of web applications and websites. + +## Documentation + +The full editor documentation is available online at the following address: +http://docs.ckeditor.com + +## Installation + +Installing CKEditor is an easy task. Just follow these simple steps: + + 1. **Download** the latest version from the CKEditor website: + http://ckeditor.com. You should have already completed this step, but be + sure you have the very latest version. + 2. **Extract** (decompress) the downloaded file into the root of your website. + +**Note:** CKEditor is by default installed in the `ckeditor` folder. You can +place the files in whichever you want though. + +## Checking Your Installation + +The editor comes with a few sample pages that can be used to verify that +installation proceeded properly. Take a look at the `samples` directory. + +To test your installation, just call the following page at your website: + + http:////samples/index.html + +For example: + + http://www.example.com/ckeditor/samples/index.html diff --git a/_samples/adobeair/application.xml b/_samples/adobeair/application.xml deleted file mode 100644 index 135a86d..0000000 --- a/_samples/adobeair/application.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - com.ckeditor.air.sample - CKEditor - Adobe AIR Sample Application - 1.0 - CKEditor AIR Samples - This is a sample AIR application of CKEditor. - Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - - _samples/adobeair/sample.html - CKEditor - Adobe AIR Sample - standard - false - true - true - true - true - 100 - 80 - 950 - 700 - 900 600 - - CKEditor/Sample AIR Application - CKEditor/Sample AIR Application - false - false - diff --git a/_samples/adobeair/run.bat b/_samples/adobeair/run.bat deleted file mode 100755 index f2654d4..0000000 --- a/_samples/adobeair/run.bat +++ /dev/null @@ -1,9 +0,0 @@ -@ECHO OFF -:: -:: Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -:: For licensing, see LICENSE.html or http://ckeditor.com/license -:: -:: Use this file to quickly run the sample in a Windows environment. -:: - -adl application.xml ../../ diff --git a/_samples/adobeair/run.sh b/_samples/adobeair/run.sh deleted file mode 100755 index 2b01e1e..0000000 --- a/_samples/adobeair/run.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -# For licensing, see LICENSE.html or http://ckeditor.com/license - -# Use this file to quickly run the sample under Linux. - -adl application.xml ../../ diff --git a/_samples/adobeair/sample.html b/_samples/adobeair/sample.html deleted file mode 100644 index e1c3ec9..0000000 --- a/_samples/adobeair/sample.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - Replace Textarea by Code - CKEditor Sample - - - - - -

- CKEditor - Adobe AIR Sample -

-

- This is a sample HTML/JavaScript Adobe AIR application with CKEditor with default features. -

-

- - -

- - - diff --git a/_samples/ajax.html b/_samples/ajax.html deleted file mode 100644 index 82c0ea2..0000000 --- a/_samples/ajax.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - Ajax — CKEditor Sample - - - - - - - -

- CKEditor Sample — Create and Destroy Editor Instances for Ajax Applications -

-
-

- This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing - area will be displayed in a <div> element. -

-

- For details of how to create this setup check the source code of this sample page - for JavaScript code responsible for the creation and destruction of a CKEditor instance. -

-
- - -
- -
-

Click the buttons to create and remove a CKEditor instance.

-

- - -

- -
-
- - - - diff --git a/_samples/api.html b/_samples/api.html deleted file mode 100644 index a52c938..0000000 --- a/_samples/api.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - API Usage — CKEditor Sample - - - - - - - - -

- CKEditor Sample — Using CKEditor JavaScript API -

-
-

- This sample shows how to use the - CKEditor JavaScript API - to interact with the editor at runtime. -

-

- For details on how to create this setup check the source code of this sample page. -

-
- - -
- -
-
- - - - -
-
- -
- - - diff --git a/_samples/api_dialog.html b/_samples/api_dialog.html deleted file mode 100644 index af6f2a7..0000000 --- a/_samples/api_dialog.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - Using API to Customize Dialog Windows — CKEditor Sample - - - - - - - - - -

- CKEditor Sample — Using CKEditor Dialog API -

-
-

- This sample shows how to use the - CKEditor Dialog API - to customize CKEditor dialog windows without changing the original editor code. - The following customizations are being done in the example below: -

-
    -
  1. Adding dialog window tabs – "My Tab" in the "Link" dialog window.
  2. -
  3. Removing a dialog window tab – "Target" tab from the "Link" dialog window.
  4. -
  5. Adding dialog window fields – "My Custom Field" in the "Link" dialog window.
  6. -
  7. Removing dialog window fields – "Link Type" and "Browse Server" in the "Link" - dialog window.
  8. -
  9. Setting default values for dialog window fields – "URL" field in the - "Link" dialog window.
  10. -
  11. Creating a custom dialog window – "My Dialog" dialog window opened with the "My Dialog" toolbar button.
  12. -
-

-For details on how to create this setup check the source code of this sample page. -

-
- - - -
- -
- - - - - - diff --git a/_samples/api_dialog/my_dialog.js b/_samples/api_dialog/my_dialog.js deleted file mode 100644 index 2827a9c..0000000 --- a/_samples/api_dialog/my_dialog.js +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -CKEDITOR.dialog.add( 'myDialog', function( editor ) -{ - return { - title : 'My Dialog', - minWidth : 400, - minHeight : 200, - contents : [ - { - id : 'tab1', - label : 'First Tab', - title : 'First Tab', - elements : - [ - { - id : 'input1', - type : 'text', - label : 'Input 1' - } - ] - } - ] - }; -} ); diff --git a/_samples/asp/advanced.asp b/_samples/asp/advanced.asp deleted file mode 100644 index 511de91..0000000 --- a/_samples/asp/advanced.asp +++ /dev/null @@ -1,105 +0,0 @@ -<%@ codepage="65001" language="VBScript" %> -<% Option Explicit %> - -<% - - ' You must set "Enable Parent Paths" on your web site - ' in order for the above relative include to work. - ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" - -%> - - - - - Sample - CKEditor - - - - -

- CKEditor Sample -

- -
- -
- -
- Output -
-

-
-

-<% - ' Create class instance. - dim editor, initialValue, code, textareaAttributes - set editor = New CKEditor - - ' Do not print the code directly to the browser, return it instead - editor.returnOutput = true - - ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: - ' editor.basePath = "/ckeditor/" - ' If not set, CKEditor will default to /ckeditor/ - editor.basePath = "../../" - - ' Set global configuration (will be used by all instances of CKEditor). - editor.config("width") = 600 - - ' Change default textarea attributes - set textareaAttributes = CreateObject("Scripting.Dictionary") - textareaAttributes.Add "rows", 10 - textareaAttributes.Add "cols", 80 - Set editor.textareaAttributes = textareaAttributes - - ' The initial value to be displayed in the editor. - initialValue = "

This is some sample text. You are using CKEditor.

" - - ' Create first instance. - code = editor.editor("editor1", initialValue) - - response.write code -%> -

-
-

-<% -' Configuration that will be used only by the second editor. - -editor.instanceConfig("toolbar") = Array( _ - Array( "Source", "-", "Bold", "Italic", "Underline", "Strike" ), _ - Array( "Image", "Link", "Unlink", "Anchor" ) _ - ) - -editor.instanceConfig("skin") = "v2" - -' Create second instance. -response.write editor.editor("editor2", initialValue) -%> -

- -

-
-
- - - diff --git a/_samples/asp/events.asp b/_samples/asp/events.asp deleted file mode 100644 index b6e5306..0000000 --- a/_samples/asp/events.asp +++ /dev/null @@ -1,136 +0,0 @@ -<%@ codepage="65001" language="VBScript" %> -<% Option Explicit %> - -<% - - ' You must set "Enable Parent Paths" on your web site - ' in order for the above relative include to work. - ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" - -%> - - - - - Sample - CKEditor - - - - -

- CKEditor Sample -

- -
- -
- -
- Output -
-

-
-

-<% - -'' - ' Adds global event, will hide "Target" tab in Link dialog in all instances. - ' -function CKEditorHideLinkTargetTab(editor) - dim functionCode - functionCode = "function (ev) {" & vbcrlf & _ - "// Take the dialog name and its definition from the event data" & vbcrlf & _ - "var dialogName = ev.data.name;" & vbcrlf & _ - "var dialogDefinition = ev.data.definition;" & vbcrlf & _ - "" & vbcrlf & _ - "// Check if the definition is from the Link dialog." & vbcrlf & _ - "if ( dialogName == 'link' )" & vbcrlf & _ - " dialogDefinition.removeContents('target')" & vbcrlf & _ - "}" & vbcrlf - - editor.addGlobalEventHandler "dialogDefinition", functionCode -end function - -'' - ' Adds global event, will notify about opened dialog. - ' -function CKEditorNotifyAboutOpenedDialog(editor) - dim functionCode - functionCode = "function (evt) {" & vbcrlf & _ - "alert('Loading dialog: ' + evt.data.name);" & vbcrlf & _ - "}" - - editor.addGlobalEventHandler "dialogDefinition", functionCode -end function - - -dim editor, initialValue - -' Create class instance. -set editor = new CKEditor - -' Set configuration option for all editors. -editor.config("width") = 750 - -' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: -' editor.basePath = "/ckeditor/" -' If not set, CKEditor will default to /ckeditor/ -editor.basePath = "../../" - -' The initial value to be displayed in the editor. -initialValue = "

This is some sample text. You are using CKEditor.

" - -' Event that will be handled only by the first editor. -editor.addEventHandler "instanceReady", "function (evt) { alert('Loaded editor: ' + evt.editor.name );}" - -' Create first instance. -editor.editor "editor1", initialValue - -' Clear event handlers, instances that will be created later will not have -' the 'instanceReady' listener defined a couple of lines above. -editor.clearEventHandlers empty -%> -

-
-

-<% -' Configuration that will be used only by the second editor. -editor.instanceConfig("width") = 600 -editor.instanceConfig("toolbar") = "Basic" - -' Add some global event handlers (for all editors). -CKEditorHideLinkTargetTab(editor) -CKEditorNotifyAboutOpenedDialog(editor) - -' Event that will be handled only by the second editor. -editor.addInstanceEventHandler "instanceReady", "function (evt) { alert('Loaded second editor: ' + evt.editor.name );}" - -' Create second instance. -editor.editor "editor2", initialValue -%> -

- -

-
-
- - - diff --git a/_samples/asp/index.html b/_samples/asp/index.html deleted file mode 100644 index d0b737c..0000000 --- a/_samples/asp/index.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - ASP integration Samples List — CKEditor - - - -

- CKEditor Samples List for ASP — CKEditor Sample -

-

- Overview -

-

The ckeditor.asp file provides a wrapper to ease the work of creating CKEditor instances from classic Asp.

-

To use it, you must first include it into your page: - - <!-- #INCLUDE file="../../ckeditor.asp" --> - - Of course, you should adjust the path to make it point to the correct location, and maybe use a full path (with virtual="" instead of file="") -

-

After that script is included, you can use it in different ways, based on the following pattern:

- -
    -
  1. - Create an instance of the CKEditor class: -
    dim editor
    -set editor = New CKEditor
    -
  2. -
  3. - Set the path to the folder where CKEditor has been installed, by default it will use /ckeditor/ -
    editor.basePath = "../../"
    -
  4. -
  5. - Now use one of the three main methods to create the CKEditor instances: -
      -
    • - Replace textarea with id (or name) "editor1". -
      editor.replaceInstance "editor1"
      -
    • -
    • - Replace all textareas with CKEditor. -
      editor.replaceAll empty
      -
    • -
    • - Create a textarea element and attach CKEditor to it. -
      editor.editor "editor1", initialValue
      -
    • -
    -
  6. -
-

Before step 3 you can use a number of methods and properties to adjust the behavior of this class and the CKEditor instances -that will be created:

-
    -
  • returnOutput : if set to true, the functions won't dump the code with response.write, but instead they will return it so - you can do anything you want
  • -
  • basePath: location of the CKEditor scripts
  • -
  • initialized: if you set it to true, it means that you have already included the CKEditor.js file into the page and it - doesn't have to be generated again.
  • -
  • textareaAttributes: You can set here a Dictionary object with the attributes that you want to output in the call to the "editor" method.
  • - -
  • config: Allows to set config values for all the instances from now on.
  • -
  • instanceConfig: Allows to set config values just for the next instance.
  • - -
  • addEventHandler: Adds an event handler for all the instances from now on.
  • -
  • addInstanceEventHandler: Adds an event handler just for the next instance.
  • -
  • addGlobalEventHandler: Adds an event handler for the global CKEDITOR object.
  • - -
  • clearEventHandlers: Removes one or all the event handlers from all the instances from now on.
  • -
  • clearInstanceEventHandlers: Removes one or all the event handlers from the next instance.
  • -
  • clearGlobalEventHandlers: Removes one or all the event handlers from the global CKEDITOR object.
  • - -
- -

- Basic Samples -

- -

- Advanced Samples -

- - - - diff --git a/_samples/asp/replace.asp b/_samples/asp/replace.asp deleted file mode 100644 index 8191ba6..0000000 --- a/_samples/asp/replace.asp +++ /dev/null @@ -1,72 +0,0 @@ -<%@ codepage="65001" language="VBScript" %> -<% Option Explicit %> - -<% - - ' You must set "Enable Parent Paths" on your web site - ' in order for the above relative include to work. - ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" - -%> - - - - - Sample - CKEditor - - - - -

- CKEditor Sample -

- -
- -
- -
- Output -
-

-
- -

-

- -

-
-
- - <% - ' Create class instance. - dim editor - set editor = New CKEditor - ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: - ' editor.basePath = "/ckeditor/" - ' If not set, CKEditor will default to /ckeditor/ - editor.basePath = "../../" - ' Replace textarea with id (or name) "editor1". - editor.replaceInstance "editor1" - %> - - diff --git a/_samples/asp/replaceall.asp b/_samples/asp/replaceall.asp deleted file mode 100644 index de7b88a..0000000 --- a/_samples/asp/replaceall.asp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ codepage="65001" language="VBScript" %> -<% Option Explicit %> - -<% - - ' You must set "Enable Parent Paths" on your web site - ' in order for the above relative include to work. - ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" - -%> - - - - - Sample - CKEditor - - - - -

- CKEditor Sample -

- -
- -
- -
- Output -
-

-
- -

-

-
- -

-

- -

-
-
- - <% - ' Create class instance. - dim editor - set editor = New CKEditor - ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: - ' editor.basePath = "/ckeditor/" - ' If not set, CKEditor will default to /ckeditor/ - editor.basePath = "../../" - ' Replace all textareas with CKEditor. - editor.replaceAll empty - %> - - diff --git a/_samples/asp/sample_posteddata.asp b/_samples/asp/sample_posteddata.asp deleted file mode 100644 index 53650f1..0000000 --- a/_samples/asp/sample_posteddata.asp +++ /dev/null @@ -1,46 +0,0 @@ -<%@ codepage="65001" language="VBScript" %> -<% Option Explicit %> - - - - - Sample - CKEditor - - - - -

- CKEditor - Posted Data -

- - - - - - - - - <% - Dim sForm - For Each sForm in Request.Form - %> - - - - - <% Next %> -
Field NameValue
<%=Server.HTMLEncode( sForm )%>
<%=Server.HTMLEncode( Request.Form(sForm) )%>
- - - diff --git a/_samples/asp/standalone.asp b/_samples/asp/standalone.asp deleted file mode 100644 index e937dae..0000000 --- a/_samples/asp/standalone.asp +++ /dev/null @@ -1,72 +0,0 @@ -<%@ codepage="65001" language="VBScript" %> -<% Option Explicit %> - -<% - - ' You must set "Enable Parent Paths" on your web site - ' in order for the above relative include to work. - ' Or you can use #INCLUDE VIRTUAL="/full path/ckeditor.asp" - -%> - - - - - Sample - CKEditor - - - - -

- CKEditor Sample -

- -
- -
- -
- Output -
-

- Editor 1: -

-

- <% - dim initialValue, editor - ' The initial value to be displayed in the editor. - initialValue = "

This is some sample text.

" - ' Create class instance. - set editor = New CKEditor - ' Path to CKEditor directory, ideally instead of relative dir, use an absolute path: - ' editor.basePath = "/ckeditor/" - ' If not set, CKEditor will default to /ckeditor/ - editor.basePath = "../../" - ' Create textarea element and attach CKEditor to it. - editor.editor "editor1", initialValue - %> - -

-
-
- - - diff --git a/_samples/assets/_posteddata.php b/_samples/assets/_posteddata.php deleted file mode 100644 index 1f7a9d5..0000000 --- a/_samples/assets/_posteddata.php +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Sample — CKEditor - - - - -

- CKEditor — Posted Data -

- - - - - - - - - $value ) - { - if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) - continue; - - if ( get_magic_quotes_gpc() ) - $value = htmlspecialchars( stripslashes((string)$value) ); - else - $value = htmlspecialchars( (string)$value ); -?> - - - - - -
Field NameValue
- - - diff --git a/_samples/assets/output_for_flash.fla b/_samples/assets/output_for_flash.fla deleted file mode 100644 index 27e68ccd1cb7192c8bda2418d198d90f1aff10a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85504 zcmeHw2YggT*Z$pXLX+M*5u`~Agc2Y$>C%e=N(~_aDG4MXp+-@<6j3A)Kv5BuDu{@b zC|x6{DAId*Y0^6+|L2*xbNBAuWOu`>|IhFDWnpse%sF#r=FFKs_uOCh*OHPmYZ*-8K6tk2PRprjCG_WH{79A?ZYUi6>A(LS66mN!;9s=nuQk<%01ne) zSe0J?@@sxZeN#UozZlc)i(&h6O(@>6QKuF)<(E3G)v zXPdCYd7FMC&|c3g*>`eEzor(TRY&^#TT>Ev_{;Q}uKIZ(7wC%kJGq>s{5$KPGDxa% zbKTOT_7>lK^}{PogC`6Wsp$28{ln#zSpWVAjHS@<`@8BtE#)7EbZdu+|T||L>@O>OR{P^B}pp|7)&)rMFKIHwi8iqOv?0;poo{m<8?`xU6v5;IhNz zfWr`=<$@#K|BoNjsf6?@!&QL`fU62u4K5I_IviUqTTU&wAh_Cab>Qm41;f>Ys}I)z zt|1(Gz5v)5t_fUIICc%q;n;n(gnJRL6&z{X0Jeo|2iG3116)VAPH>&!UV?iWt_xgO zxNdN-z`Y9B9j*slPqkl^o?lm|zq(N|l;fBCP!2KO^ zZ)56zf*`e;qW7yM{vrvFKlDF_?o$UmMgRfzwVmGoc|-4shUu!GC)$4kuhJ&`C-{5f z`QM~(_nYqXv1k>VwuucKzwM|Xo6ScXY11-Y?U6Y;U(*BG-&#Fs^|hP{ewkWnvvc`Q zm^wXSp8t=r6S7qHpV7O0^Ir?iD|dQw(eb6G?@g{-v`q5j@S+`}Pgg7cUZoFx?9cb9 zSMgBW*qqsC1qbEKKXdQGYnT7L*I~fJ($`8iN`9`#g}lcuuKZ%8~xTmfH2ni2FaknOOYV^7l7H%xt-8)yzF#AIWm=(u%i-{jqh%(r;p7Vy@1bcyDfl z^}eSU+`cmBw{yRSS38|_^P{YXVqVDbSJ1Ohs?BV*`0B1tYpp(*r|YJPT_6A1;o_Qe z%c75TpVfYR!Y?JhTYUW1Ym0nCibP*|x9I5P#M`!r$BQG*9_aq<@Lsc@yHft$KHs(7 z-Me?y;z3uQDY`LoNp!~ieQOo?r26RVd*+udbnTs$>wH5lHQn{x@S-&;559i7)~%gG zj+W08)ppPQ<(;bC?Y(CD@m>{6-OIn{ozZQ7%-MUWf8@a&L09bcuVkx#C3F2v88#j| z+2rC^pZkA&=eK(+qqlCpJ8+_J?!(6ef`|A2u|nMID-S=HT1HXwQrP(Jl+1}^*WIu$^P*N?GL{#613*>d7q1$K5tlO?C?**T43^kTGkr3 zAJDgbpYVR1%-OWe!r!`2Ouu2~fM&z`4Av=RjL!W=M*DHrhw)rG3=jIi&Okh~k7U2b zU*qQ`Y*!r6_G$us7<9C(*EPRJn0XFBZ^%AQldTAh^hpZC#Lvgf98sTXhK{=xI^KTT zNK7Khq@UXHn>oF+6FpYCkL}9~jhkqp1IoNFWSU=4VPW)o=7w&H?(E^Sz z`VX1fJOD#ZB!-(|Vv!Jr3hJXpVQ8wX%beLAA}X#j22a+4Bc!E1wI7Bdtq+E{ei(+c z;a|$NRvBEQk=h`mKK;=#`D-QdPsR(=hJ#~YPz?~v27lzFAAC)~JsPf@;Glfvk)}=-!F^N?bbtx_|(Mgvi=U4!^jCQ4CG8liosegkw{o#M31b!Sn?Tfh$$6T)e zMpk^XcU`_}7y3^Lek1tHlgkr>$22QmC%V~R`|4J@r%gM%{gVmx3yuD;>yWj> zZ@u$fyZgJQWGGwbO1?jSKHKEt<3Dm;ynk-?CmCwZSb6E*^}}C|%RPDUf!ZT3CG5Gk zv`yEC;U|t>d7)e6=}n0Z#y=VURm3h+g>mFfmZf#(3RWga$Q_~Bl5NVyE=Zc`0S?Q zUEcQ%S+b;W$A}&qy7sKF#XtG&P0RlCX2sx`o*iR%oG4be>^^N;{<1!kW@?ju-*s5Fr;iH+MkG98!g+J)OYF>P~tF?;n9kgc9 zOD}Ey;Lo;q<}|!?y+DDVN{lT~I$u!ttVNS-L1Vr@zdbx#+cCFSFV6FsZCa-f7mOcp zq(Yvx)B4p9_{QhX-NldgX0F@q<*vC`cR9Va@_SoLR9W-m_CA|h9BbXyH~XhoGn}2? zc+K!5!@n5U@%E_h`Et(+kNv20!s##1Hi_Swsp!&%wUXz?XF3*~apQxk3-Xlk&3?^Z zc4_aU_ecC1bEred!lRGu?fG8Q<^glxDi&4c=67ZH?OD3NK%1@WZ%-)p^LuYqEqx{5 zMXlocwQCNRIrGc!89u)D#ngK@4=)>+d)5itcuL`e$fV%aK{h_h`q4qj#Kb zGGJ}}1}paLpZ4YAyqk-6dE0l)%zpWP{4(LxPYKUnegDLfyFczfxjlS#V7ASpAAeUO zwAjeMN_SuEd#wB19FuOm-{^XUMGuoQ9`egtWn%I1elfXrzFVbK*&nvNvAN{c#~b5< z-aByl=B<$9NlTtT{?ovZAGY)#zWbR~zE|=MD|z+(Z`W^rq3GP$jQiX5m{mLB*Lnp@ zwe385$Bs#7^7kra?-8FPDZ16YE44p5)1=6>nBRsC9x~=w@y%Z@ehztj*{5Z(W-}-J zJZA47lNvvMTx?@p{i25}+#a}~e*A({+X~rA?A@0zv~Ta`Rn`o?;9oWT;%kp0bDz4_ zXOwTvT36oJvcJ0G=lACh95$!O^u;e9x_9$Zmj;;w7M0zz>&40sA_tA`m;Xw>rA-S~ zm|s7>$^EZ)9lVk6o!Y%}3|euw$Lb$%Ek5?k9{WchUyTWRW9X8HUk_Ln@Z{_3%M*Ie zKJd%F6$iS-m#cK(>?gI7o-F=CWb|#{YJYY8_Q#t8zuf%7)|z939u(O6L5|opy$;>T zw=;g%p{n7-PDgH!-!o-;?TFe@9p>8iuj>-j?789>x2?HwDroGKcTd%=@@+vo+GorQ z)U_R#iVjGM8S&Dl5B_WhO@47z?R`DYZ;P{Sz1tvm+tFuEygF|1&iFj<%v(FGw}xGc+{?Vxh0!JhAr7XX72lkdq0eNe{7ZTCsV5aykOtp{p))S z?Y=eXxA7=Z=gU zJZ#C%_>1kv6x;a0t;m8=H7}g%pBNVvnsGvrxJA2fbUTA$Y<=rVn<5(vjF~bb@!R)u zOsX@g-k?$kE9B3=U_ze0_4mCSwzyd0pvOBWy;QnxNWf>|-AnA~T(0?!9_6}T>9BR& z*gTU0Us?a!;JZ&gODH+C#hA()&#gbQu1dZ6-}L|f^7fTIzx%Cu{r!)#-MqK+MB=i) z>W#{qeE!=L8|yU~yZx)z-@5x_>r&@im)M*CKZpKEc&~Pj@Pg3+SMzI7sG}vss8Hl_DdSn%bDlb4WGZ-YumT$ zm(>f}cD~{1x5qTi9(crm?#Qui?tQuPz*irI%pTq*e!-Y!`~36A-MRKf{f#%4oZdSo z|In7*AJ6Oh`-NNI249GHL(5d~_Y+f(*P6Mf$I^PQyjFb1!^q=rZvE`~=^O`&cH2Lx z(`(0K>ouQyD{|iXMxXUP7JF`6OrENZmfB9Xtb4xb>Mq3(pV@WkSlui;PBxj+bGX*^ zXoIhhuQ>B_{fVQKUjD3dk9@BN=lHb#njK$#)VpflqBr9j_~k!#{7&*S`KN6AYIVUQ zt2-6=>Gf?fLDOqT72n(A`oIR6x>v0?ed`}Rhn{KDqt%`AA#c{-9)7y_oX8nhzW!z3 z<42`>&+l4&Y*3HDo6FaCx;189mxL)N8#gHX;{Ne}wfnL`_(uy`H~zL+z0ZT9&wSDT zaPPR@bv8B)4SjCcyoXtDMy#$`uVS+%^ES13k~nmE&!{=C9-mib#E+eO|9Wv-?JPaV z6dRFv{n+(W4Qpk5wN}Gp!O@SZJ~Mj!wu1W?m8!7Mzvu4iWo~ti&GSdkL*pL48F1uG zlXFc5+}t-dCff&N|2nX*{mRdee{wwAr(;%E8`3rU^y=WfE3)SQeBhq&-v>S(F+b*= zdj}(G75lkrp`Y4bIriDiaj&l!SbV}ehr0Iqw$)D;66fFYU3@t#NBIkvHW!+ZA;M z6nU}UH^^o6UGHBTe)Yhy6^mk4Eb03DwJ*Cy*1fr)OX>WF=7#LP8Z+vheKk&Wc=Te$ zEj21v?eJ5stzqA`-#6!#V|89Gv#r*)d226ji>Y~{!TB=}f3vOr;HPf;%WnRDX3Xlv zwX|(@YR!({-TCmOIh8(M|FCbs{t@{ztVULLF23@9vl7=@&Un1zz4nh*otvEFQrk=I zH^2Pr$9ble$=>+f(W$+EeZ1)L-nQ9K)fg8(E^5ac7x!0<>2RXQPkw8A+|PQh*RUmr ziXZXc^;`CrW_9tb(%T+52h{(&;BH`)aeRI^VY5`@?nnf61N8yUfsEP z*)Mu6sCpsW^jiy)+in~mbMWS=+sC30{t)uY_XFNp)%EU=8Q%{7q~MKat!ni;-K6)> zZ>m3z?6Tq7l6mDLiWYeByE6IPlqk8lQQbQ4)x2G#!r~3Z+En~%(}RUSjh?tZBBWgR zin)7TDez#!rVBT=B=uakDP+x(I)|>tm0z>={M@OvF9*jrD7o{Sj8(S`J5W30m3)`Z z=bGF+u+r{3ed7N!vvz}sBUKyMESBY9g_+mxT)x(*NL0nPZw)Dfxzu-`HhQ@7tvW;h z{Ps?bgI`zJG3|ETz$0gOw!hJ0c|gX?t6~-g=gD5CYnP!N3RS!`uVKvIE1gzHoo>74 zv#!-2@ysJ7?6=9N|+2@0yio zK;757EgpC%;PTYHeq)0ET)uDp;YF{X^u3zznMpOv`b?|a=~CM)7wcZC`)-bHe|-GP zpE1>AW?yJqq)y)8i4&SWtUI}BRK@dG=G=<7)cru!p*bs8>G)@bmGM_IK3Z_U^!Qs_ zLS{e7@$#0Ee~zs+WKXVv#j}qIIxsG1b(anI>=#Z1XCD9Y!`wBtoc?NQm6Lz|wdKaF zPe0f{b8)uq@nr|y+qI<4=+d8^U9!Ah%-p+E_e|-ST%vB^<;@#Q#^3WFpKDs;-h!=y zuC895XWFLxm5UF|lYhcHP0N2X^^@B@TO}2~J}~fnB0IG46APZma)0@Xv2j^T%-B17 z__W&lCpA72cX9oyXMAqFKfGz_7ao7zYwRzD%T}&?cJ0pT6Nk)wc(LvqJBsDL^Zks- zGjG%h%lgNGY-P&Us`%BQppjWKPV3UKd4(<;Pks7D^ty)yChQ43dU?;_&w@)9j>6>O zY?EPqSJ(b(NY(I#rCN=z`D9ws{TJtUPkw33+xrfUp7HCdN`o65sba78)!@-P3YUF1 z&y>cW-y0X!ar?=)B9Cu7yEF1k<>fymUhvyi^4i-|cSWw=J)&FEiw7(B>$7Ib`e}y~ zzxepe!qe7tC|2jys1hjI(GSXhzvyyg-JR3xG(T{*$(_<0mls(bH2dU&^_L4?IMsE_ z_OHvf`tXBRtxL=}Tp@q<%l1hfN`(4MJF@>$aN)a)a-ZKc`KyrV$4RZX&z(_Y_{uij zy8d40+@ZizAsvQ(KkD3}+^6nG|GqPG&HU$X#h+>0DqzO=A8%glTqFO3|7_Z_c--hi z!9{1}!B{!&c=>_H8U~EsF}?P{P15S6ia4~3X)w2!P7TpzxVR2!(nI*RED0!sw!j^+(Ma9oMTjOxyQ75K6 zd#>T>iC3$B-eY^xhCUPb`IlH*DI|XI{ecgY`@MSZ!Ny~UYaCg&JLZ)S3e4T`*Gu;r zT)!IGGo;(ysVj?Yc&jlolrRZH+3!EMzSpn#(6wE*pWc4&`zaN^X?6C;h)@6e?!?Y! z>n^sR{ra=tT)f|5@cf%IUc2?)u4(ANt}h$2EuwqRnp;0T{rU1bXE(IJ+W+n!E2^9i zoYMT8YGEZNcPaZ#&+^57u3xt4%uUB`4y@aEZ;pc_T9j}5R+V4Z?ESWLVqE;e0fT28 z&D=J0%-c1e$#XT|oIIymRlk~VMxG~K#}w$={l@TN+vn}M@@msO4`%jlzCV1$ywK?r z??uNi+m|Wdw2IdzHa}3_x5~96^G_Vw?sw$5n)esJziM5@RRaz|5$crrW=*}pllJZ3 ze&UVKle^6b9#p@}Pd7)FUbB1b`X2XY|52~SUyTQ~zi?{9J9+j@sWqr}#eLxgGLM}y zzhK{I%a$3m_s@B^`rUo8eB0Y+a&|pBH}}v#qi;RgeCu$jHxmCE|LU3b->e_==GbBN zn~iuF`7ok>$sE_}J$t)!wZ9UZJbF-LIvCz9+ATcs!MmGtUq97VG{XxE2k*)CO_%=l zT3me)QsZ8mPDkpmN%&(`z2Y|pES(v<>+RKj=Z3V)yf<^-k{R}|9&z&fV+R+H?z`wn z(QZFY>bq~-n%YAPoT<=ubkmYmhAycRa_I29$<5llwsPI(S`}LPWPT?@w&6!!J@VVn zuP0>O`)!Wy7vgOtg8J^=wmyH*pS3^ustYu~@{N33H=n+Ds%w0v(QlvGK7I0oR(HdaWM5_rOM5@|M;g9IEi?pV=bockMl6dAt8AOyaMYuwKUFz0VSAxonJ;bowZ_<_uRCWyR&?H^ z#zn)L)Zbe1+r0-zpDq=$D%)q{dme)L&i>W+th2K9*7bdRmFYWUQ169-!=rkBeD2HrON#dj zs&VuD_Q(shJ1vcOc| zjthQnn|b-gwHHpEtug-5wBL6IUMSr(Td{n3etqsgTbh5g?%Mk|p36DI_jIXMQ(H}* zy7i4ikG59%VRn3%19M{4(Lm>(KEr=$(&Ox?-5qv!*N*1=HdnP;Q~NfYSLD~Bk-Lv( zt-W(^{Cn3DN6kDpuiK1?GPC2llYUhc2Sr9<8+QfR2{N{!t| zqdzY&tmv>_XUFY+GW*Qc#HgN^CnP4Xe*0XvYtM(S|211&Q0e;l7Hkh*b8UO+@ns)x z9y#)@oUip>QaSqOMH8 zBecQ&BPS!?+M4fN^BmK1Hp|xL@%ru0?V32X)wt0iu^Zp5GpA_NVlS?IE+SXp(k*4? z?jHR8SC>LV=FjWfWBs{$lZ-2~!)~{AN<4OdriH^L3xeokHH|TQltR`vsqU zd2+X~8CR?4**5>q{Nml_-pLz2XxiYLuP20G?^gW0zi*Y8+}EEw*)m~H!xbMSjMqvw zufAW?O0~xpZ3s3$xv|+Fr>Fz4_1hj>#1Ys;=Eg9$ZujZTI&*7}lh@{{a%%$4+)`yKDeww#=G9DWX%9vYqEqD;_HELrKjOb$(u{i1yUM<4eX|_Xl{bAwOIJxPown;0nVPfh!7E435V?JiAt|B>bh|o`Wk5R|c*u z98Z7B!|~WC5{~()1o(HK|C8_k)*od^*>jIS8g4k;2)NhbM#Awn*C@EraAV-c!i|F) z4;Ksfcbxz8Xo{zRlp%n}pD!rX`9JT!RD%y6^>hE}P`=RfJ^ zKk4T`>E}P`=RfJ^Kk4T`>E}P`=RfJ^Kk4T`>E}P`=RfJ^KWRAs5f}b>=D-W^DV)UE z0#Z2F>3|FW?#_sYi|g^Bc)cSU@7eL9KhKeP-U4p?$HR-hPKbe`$Zk}V2)1dtaJZbuS9r8HcsPvTGpGogcsm;X z7VE2;mg72~Om6|QDje?wwh`}EYYh=Oxg=SDgX7&m!GkF9a=al(UuSV2z#qM~9FZb$ zF3R)oaE-5D$(IKGLBm(t{BdugAN~!&lRWtk#c3*ES_?%8 zi58E`0LY2)vuW=FHC^uvYywBTa(EOSCaY49B%;SQFjyE5|4o>K37%pNpBLQ|Z!ySs z-Zky^?b}dak-=p3LOaZXuyhE&hnJ|gw5nDc>XyHZElkUcn-IA$2p7nUD-s!a#UU^H zwp%!9{<1pWFx-$q8S6co1Ax_` z6oKd_KEVBxc)$%=FeOn05GF__g2ZMZk?YA&w3WDH(jD*)n$q)t-BCL?5dRdQT@k>d z15kw!WHXS+hN9a5`Y_x}$%MSb0-it~DgoLRfy~n92(lSS#2*W$V`2Xy4)ADhP5TV6 z8nl3LEV??oB9K8-(G%JXB;qT&rJ#Qw%_JW1Q{0t2LS&< z27d!Qgo54xv?~JKWGSI(KOo3vAT{knmCmg)Ktee_LVl=6Dw9;IhnpfqR8rT3gQ+4^WPD-G+(1M0ILGN3z-u7C;~?iVkvA-P*j6kg<5mQIwtriB+92A6~EIUVyn6hxCKz<*RBXO?HW)A1RsS&@lQZi z;t=>8kjnsH0{j+GC2v;*kO@$$M0|y$tpr^}mx0`kUTqs-G;YyNrXMZCt_U>kB!XT9 z33>$`3B^;7Z4guxy-H!gDD+B7neB=I$_Z36RKLwYBL8na3#Q1_N2OrY1~4DWGZ;{1 z+pY-EDxQO#8}ZUKWcJkQrvO zG&zA8t(=tU@zI-^+1j*EGiX{uCh);8w~!I~S#&Ju8WQ+dWcDAL>kIDBq-|&9|276WA0$!}?N=phR|J~&ACe#$n}J09#bwby zB5*rkGc;)%+S-oHu(t(x8uegT1n8DQQVS)w8A!zMiTngc13{nK{6dAHX~6qgk_-5jP7JCU|+~? z6yO^uzsj~<5ul2InkBj>g~U*&9vgv2myDYB3kbph_e0o&0bhh{2IL=;vKdI2 zZBumlA-f?!hC|pvfJ%Msia^dNNMbXPkfV}Ug04HCLYLZtNF{4m1jr_I=tU73fkdyR(60bl0(v+AuoU139loK5+Z6$- z2|=Yrdr(NoQ$0QpWF{c%0_Fj11y}@7MYk&gOr?M-B={&KR7gE4e)B=Z_OTrBAu_M> zYgYuA`va9*@KHz<{e!Za_6O*X0-goT2BJHFDtWsifck;tGEg=HiKe0C_c7x6qJJ3; zxEi|Mkbd+#c0~ZaK+r@nbx=r59n_;AkX=!?zabG0y-F?ZiU1=cP;ZL*AQOrYrw7x5Jm z@x2*3TcTX*XC4Vu7$L(`9uI(wl}_vxD!Wr5*nk%bm2Ad#vefUI7BR-m3%1L10 zF#WtK(v8862*~=bG+Att1AhA7|Em&s%KcwyA+A&ZK9Mj8=R7UM=28xmZoh};skf7p zOW;(=4+9mv56Amse@Mg5mu6d3sDH-!N$_AS!`3T$8*H%pXfNl*pW<3Ztzy8*r1jh= z`%62gUC_R*u07BW+)Tcd6oB`O9%}(-IUx;btrfLt0mT)co?5_qwyuEH$;APg>IKX< zYJ*lmuBmsyub_`YID*h4Dy)Jg`EoOzd-#4-~qrffZR~DD+26DAm}WDYz7kX72WGV zGWWv)2kNjA<0}G*njzwoh)C=vsK=Bb^_<~^K8nB*gy;&Zpi+JXMJz^lG#EU3-_E(@ zbF}k&@c0+qkWp)>)eEzYLQ_ZM(*l+!=eObcKAx*eJ!E7wq5(F zN%G^Q>R7?A+mgH`iCx1F=m=(W_xxvA$ivjcUptF;7!T&vDrvWIL~}bQRcLNWLE@O zt|6$1h_8?!RgcwyTmbs=fciSZSIM7@b1n;;?*KhpD&&<+>?cpMd94{!^hT@gr< zYY4I#NW@oktw6sJ$ew_20*(Y6%=n4`yGaO|CgLk3;;Y9QK)wPbi`xcpCty>?R|J@| zBB+CiuaM|9)#F(p>j9Y+l|;p@r$f6Uz;FW+qL6$5Mn8;f*ti(3i>DnOiJr0#8Qu?^dKAHKBRRO#W@9NR|HtmC=vsS_=@fj z=x>64FJKPTG+_{+T@lEjMSO{>N4(*Bn4Mq>L8A!xebPE2W6DjDU5LgiFD8y2a3N8hT?OZ`0g>VERmclB? zYGf=0eH6kGgjnA9i|CXg9P|9=7yoxN^tP?{(E`SC_7boqsrM5c5o#YIwX1&6hgD9Ahap7|(sA)u=u@&@j#8E*IvJq&ZRwVtAhnC2mf<6l22*NU7 zVHGS0ZmeMieH6kGgm$H{R@en;GPZ&~iog+sp+yBMDg`Nz&bq7#eH20pm_fR%%~XuV zG!+!Gmb5BJk7cG}<Tf#pf5oLX;$hz}n;fudxGya*qnX6^tU1pGyZeu}_BV$*H|c?Co` zx6;XMMg#<^xGQwzV!-<#UkJ#w{1gG^lt%n7@N`-5BssHUGa`VeimRZ?mV!PCA@j*( zpy~{4ipLKD`vZOt$jSKy9r`H(>{cSECr~!+Ydj6Y6U3~O;e1qo0#Eg5M~#zLVZdm> z06QTYEKvDM;^ic>$5Mn8;Kd5;onv4vs13aojyCT5c5F|v| z3?$+!x(Pacd%!n9L|7TnPZ40=u9Mib;dtU~QIfH6uzapZ&;uElK~#qrz$Jjc>(I|Z z%cpyyP9yQO4^Nu*o=#>nA|O!3EssKwS4+UNIxNk6Dgrccoy4Y9#?w!NC&~Z9lTAcq z1PlfYAbB0N4z$8K7MeNRp}uvKdHCdqL4zp;8_NeH4LIS1KNU-ghC~!{g{D zyAW<8TrU%v!B>0egT8?C{ha7Q4&yHeP`2ud+DffrUhNln*JwxbVo7lr4n0J&mVka| zeqQZa^cWq9ss@^-TCtoWfdI%f34A&tu)r(HD{bI=O}nn0&5PdQ4ptL)@?u*8yS7^X zyxL79byKU(Zs%EaA2ssgPaYUBL3aZA;cHnS&W2dI#G#|MN$z=+#%6wI2;f=3Td0s6 zfTscPA`YRSBEZ-W6uSqTmJd%?@q__QC$||95UAq*qVw1cXh#}^Tx9qu0!=%jli0MM z@I>yCEGx)tMg%>Oamk}A;C?{1<~us{Q_Lkv8xcPd$Ub5$xJL_na5n+=5^(jPDs zkVPf~KScoL&`E4sUOWu|Qi@FWL@ELTM*+=tuV6LZub_`Y;QUob;o6XTRImzAQ@}+* zABAuPAuWYfu#z52K_7*{8cRnZE%jIoK}(Uw6A0;RKvo5zT@m2$9V8608Au37(Jj>J z2Li@|h*0!Uia^u8)JbgGbUeu(ie#?|o+<)Lq8?uZlJ~Jb0{j^8qz?TQ0pcP^_8c?t zv|DJ*DxJ(`L;z0}*M>rnS7E?afUK+pK)WK4hwLP=8A!xebPATy<0bHKHW)J__P8q%h@SHH6TPRz%NICkM%md8&G2&wj($QPg>VF6 z1W{Nkd<9O z;3s?)&`%LyS*(-TwD0jWO5~bkL-2%IlpX;*)g$2xK<)wz06e2ZKSdx(TZs5S02z!Y znGVTqMg#<^xU}*`Bqqv&H=)RsAc5ZgL{$}^JVGv zvCLFtO}~O776TkXrbk6Z*aS^SL6Jj8ETS+NC@dkz|J8uQ0C(%qPZ3B)J%F-_lj(2~ zf4xp-Ga`Vgii<^`;Dt?M0Z#%(BAQ(hU>Rq`S4eDBDzpkp39bYmh78rP?LmZViE#CqD^ zid!RxE6mCWn}}uL`XDi_36>hK<;CiyB=$T?<`hFa&rGm#=g!9=tYQvn3rU%PNDH`G za##z~4(AmgKkTEGE)bL)Y7>?j%V?ML;%M{|+%87IFt7c{70d1N;wbn^&T3I~Jmhtg42v3+a>Ji9PJpvwr zU}^z!syXDEux4j^zEGQ^KKSdx(2O|i(RY1gq822r z3PLRJ+dEEDC~SR(&e=&~r4||CZ-cqQMeJVW)qaC-w^lwNDY-I_G{scgNBfW{Y~^4( z;)|SGGd$+h?68{2zufW2j9rNm8U~%*n97&cZgGx}aw9RqrVtU|s3GJQW)r}zfG+^D z&$BB6N%A9tYz7hyL(y5`WIeuuK8gU6)KNHkR)H!=!D%3&5-8}S5RM?Et*}-&LyxVX zk0QWzT^)r>w<=HtEdXjQ()H$F>txuF)1R$5SE?_djeF~L3I%D8sI)1idc;9 z2tp%Q*fl!ULO^N+3tJGnZ&w89u5}XJB-WA0>s&l?MWi4#h<*iq6v7b%^-@?XRO+Un zk0NlWDvl~u@(QXX6!cLDN4Air!cqWQtaPd0Pa=`=^S&LUHvpoq-?M-WD-)TmV~m0<-%2^?HlIJ|M8u#T^ertl3>>-DkUkr!M^6+d1v=Pw)j zP0@AYnfEn|YFTe;S=+$gvHXr`D6WL?+vc?JJwzMXG?&-}VHDPc`jLaWpqMf{bm|w22RJXaPQ+4C9A#uMb1Q$M za+F8&=0l}Vx*Oz9nRA57LO9Yerw6K7>G-00uGWx4IGjI*9)5q-EG2#ga{#l-8??=1H0U`==%Fl=nYVd;cFZ8fOhMzyJS0Z+h1E{{x@y3&8)x%l)qUoNC)n z>9zN-u=6=Z47S+fau!5?coX#?x39gcXn+`jWc|kiz`01*8w&z?w5R3 z-0@%ast6N5Q(yRB8U+ySV(}La`)#UF40b&G;RZhr_}Non`#Akw`t*0{)8D1XZ6n;~ zYFP#y2|5$?3VZsy^f+zB$~gU9dc1g*{w_UQ2jBHif0rIJDw_I8f0v$yS7ODaM!jf{ z4P9>*MkBjYeDY^rwW%;dhC600<{1o-vC?s2WO|n# zyf?$*sTbKSM3e50&Y&zYw~!# zpPRzm@a+R@h>i_leg~2^BI{yvCY!z;s*1}!mwv!khTX_$>_iXJ6vkhxr}^UyzoZ^7 z4E7d>fRFnAr9bRZa$~s(V$8OaBxPV(76~VtX$D(8~x{pHb$=pBteJ{O~G20?oms56Z|+gMJPmQH(`b(m4+; zfaOq{S{@u92p}i*=>Q`irJcEX^BHJ0cso9tY<%!J$4jUU4%*Sk5zAc(ZPGE^BUOLr z^xS>wpf&Ov11>3kzB&zj8X+%{kYJybK7(zMrn~&`W7pBBoBp_t6oHQl^TXZz$o61S ztKw7FxvjPOl9&**1!XksG4Ql}po6-Im6{*C4nZA-mcrl&Y{Z z4|g@fk9UVcvi%v`UIT4R$mKa_4(>mbu0D-U36Fx@8lyymL`{hnC(BjFnWOjZz7x38 zygF;7C0ckBeqvnp0cqyy;MGy+Vn6g6!y$nI$gjaQpQ~0yKx>DKT4(EQjNH(?xzVE( zu*R@XfvJUzBU>XSd`Pq8u)|?QyiUv@vgb zBuD90ottI>*;5|jqM+IMtV~jJS!YRmlOFr}Fd-!_o`(y~Go_fKj(EeDvW(DPgFMwd zgCkg9(b|MGEn}a1&E-f(txaV-e%86%o-~a2$s&R;YPuz6a;#<13s}Z>PrMwn ztUxUY^L^7S%Thv5oXoj$?pZ~?Ty$2>+1OjEvN((f8>MmSU0b5p;_QJvPY7z8vpmOK z$B381+Cr#}Y#prok&arl%mO_1nH`{E+_qqC#t1Ie`L~>N{dwZTys_>EK%dBs{pA4k z6#wdqnH1Uju!rm@k|Mm^Or^FTf2b{=bu za|cRE^c|I)^~IZ7<$8u|HJaC!pNe4$Zu&gSY{1=2P~Ogp24ALO)TO0uxUWk&)-g{U zzr>s}S2gq}mC#DrTFf84p}xyC1=6zQ(|sx_&HyYr=Y3DidS=UWs^=2Ub>p5Jdn2j8 zoZ+#qjXJi>#9u^-x$;hJWzhtfmW-W|J1~Hzu9?oLhfZGtX4{{Sd`}58c^Te$Mq|UZBN^cb&dcbOF<1YJFjt*>d z)JIi%8PXDMrV&~u?-jE=attvflhZnGbOs0c(IU1xQ~g>>{d8^E`(B!JBvFHwvBsNp zxmI{xpG&&wF`k06T7RakFY+eOa$aZDi={QWZqeQfX6#omubywM&5`BUrl zo`!AbS!ccWo?mBZuG}F47jm-nSe`gJW_;Dq%gFhjXvcZ1x-VyFYGhVxeAbDex2%i2 zsnwy#x%WEH)!qn}(9&PIA0s@>wJo`JuM1ouagHg+MkNW;Y$8qEyx0S?%=f&n%O?8F z)McL}jU446;~?#2Xjv#q9${X;W~hpBM*Ty*SY`;G#<*0+EejuSG|92fOidr%Ye`yb z);+hh*Q_U5dBL%$wY^%`^X9b`->y-gW-%mY>4W5KAxw;nsqcY~fL06>>o2_>$lky* zkMlGOaIATlo2Q)>yROpNdk;xNAH!9v7}YJS4R3T%uADrKeF4t>ymx$4-h1$nlBF+l zH{(}3l1=rsPmD!7Qrh8g-vZ3NZi@42OCRn@|D`U5L(}Ar)&P-HLswkR3Y>Ml6UJN9 zUQJlq;IfqD67m?~gg97Np z{pDQGUS0II$VD1kS1NND%U-EBx~OJ&-jCXhA@&o>r(N?My}Acox6FCm>!zDknnkYe zX9KC$j%9x7Nw;~f!P62$n_c!KG$|NT|p&&niRBHI>HIDC?2qQMhG?nzEKV2mGtb<8nIk6#GQ3Bcj~5 zR%s}0LY<|u8{c0WDtAbqVm-)yi~E7jwP8wA>XoHe^rjzDYgj|qEG^d?9>z|moNriK zt-J9u)s}DRQQh}L9id5bP18?nF2)X?L~%F8=@ib=x4G|=Si2*w=dO0%m=IT}EG^AF zFFBqK5qmv6VU#&bVbznS9IDkgb)LJbVi$wGk%f!*YaPdJ5YeAyw~p?VvpQ2S^reFH zXymCEXeW9s&QiJSBd==mNwp(WTV+`+ZN(FJulZU|;5_m5*sn0JmYJA0Eys2D*^sMc zed%7qlrE{g1m@S}zJMivp7esJer!h(s2lFF3`UDE?RDm|YKI){c*4qENVP92G|6TB zVqE97P7o!S*UD4Qqp90mXQhw}ml0m3&kMbS5r=XxpWjltwV0Bnk23R?Gi2^6%d;fT zlX(}4dn`unSb9nK{Zp#FoFy0Txp+7Cbgw5~_LNV3)>#8P?A6R?ot6>F(+n5w_tkzKqH@a%k zHBWsN^C5TF3~l{e*2;4J=3xe6$*a4uUyWaK9%tm$vj6XngRC`DIOfdO7H^zUN-eO= zS>3ld=e;b`Y>WLsnmDCA12D>L8I9bx;gorC}-XiN44w#y64;ovk2ZClqWK# zJAG*!IUFa(a>c|uR>LSWI?IUeX%uqosGKbn!`9dxXzS>cEmHK%S>FAUC#>@P zmv<*QZkld?rLpYX_fm5tdH%~gW~^y35?b1ar~WXNKHufWk-0BRWu&x}!&5Kf+=FqY z9|pOg9PMi3m5~6r>X-@hsV+24hVWckhSbtSsv03R^^jUPeU&sac13WJ@$2fe6>;OZ znobj_$5IqBydp*!x@t(9Ps|NnRrrxZ%go7}u{|7mA7;!!O)Wi@wVb3!S{9x2CN0h* zJoKWLx^mYCvX2^$847RTH3Da90@oO(xr${i<&GQM7-w7DC*?~-oCB%3rP`GiI}MgK zhWmch!&<6h+Ex(k_2ro1X)VE4Cvt0%fH$?I*2QXFV$z9J?vqEM=j7QpQhkc_T=y5` zc>CX!fjca&=hAW)6}=IEvQO4uZg`9^*uvKuH;xz-F|0|yFkighV7yG@8=FRNAmg@& z9qxh}l$9VJX?Vkk4TV?6jia{*yt?S~ax6}bvaBrDdDWFbGN; z?-b`S!Fiox6(%@;Xvj+EY=};>GDJr&+fhoQOH7n+tI|lfkd;Mr#8Py!_~O;pxrR54 zSSq2!#?kwx;T4=INr_D+HWFT4bo73quz`Z}hlVr+=Q)N~aDLnH>YR-ROIEBSU3BzP zpGCT1g7XR$H%xG59Z6!rnRO(+I%nk-d1gCGNpu`oplbMC*L+=c5;_PhMJLLOUIgBG zhBu7fS%x=`-pPhHk=|ItD-xn4b$=`1m|SI`9JVVN$Q*xR&Zt=Nn*j7btJulGwVot1!sy*cu{gE z(OH_LGd50)R(~L_E;qxLl6r5Q{(knP~ZYDS<3(hCu)kR0ntRq33taDbxf-~EZ zj4L>^9Z9d?OwkFiMRaKD;GCLH#%Ua4b|Y>JmN!m}R=bfWQQkN)TJ1Ju$Q%ftPh8 zWhFRsZYE_VI5S-tS8!%RqD1f^E^A+SEhR#C1uW}G7oGCzqElYM8KTmOB`d)hGQso% z<|TaP41_k`Z4A_Zj%Q&8LWCkBIjO!;k7<0K>Ys^;!3Bdp-LgM(pEJ6OcJ5Ygv>~Po7!X%Xv-f*X8Gk0#$kwEJW&$(fgi&JUqJq> z90eWz2qeGj_ZMQkpmpjqqF<=vUiR$m)Wx$Zoh}Wb1YgZ2N4;emS zP^f?P+SUD|2Mq4lH)8mZX#aZtRjXC48Bjf_T8$clU;3Z_c?ozj{zOAjS%jm>$fkw~ zD{qZk$+&4ZaFs=vxXSWh8@b9N%v{M_@W!d*Zb(XIyeead`|mV$l_kXrRt--f%}o_c zP%cBYY#_>LJ_Pn)>`KK;qqVCyklLGY6X4#0dmC;d+$6Zka8ux>!cBvl4)+e+47iza zv*2dKy$d%7?mf8o;pW1905=Z~>q>1t+yc0GxP@?w;1S{%IkPgwygB&>i{(`X5dr}DL6bEy{2I_bk^NK$e(-h_}}YTdfEyxZ3kIlT^*EJ?qTL{pB3Dmys;j?7TVP=IbPUao&)K zJX=m zrfW+sFEhytW2qQEv*?$*YZAQB;KAscMN8aqb6nlBT(zK7(!j@It|bLN|Kld8Jn2&k zX0t3kj3*9W8S`?vFl=3J_+zV28f2hep$6z&E?n`|8@J}m$~d=e&%K1)YA|12<>fhf z0UJ4xy;hpJs=kM>Mx|=<&2nMN{be4dTW+tKTg(c$)BaShxLNAnn;y;e3Ju$->2*cR zOB>$slo!1`T-UPHiZ^^6FXW{#7N&CP%rNKWqKzCI+?wZfxp-{7CYz#Rv;W4FTB)?@ zze65!Zk390H;YzyYE_Pls4TBnM(HdUG~JKMDVoiBim|xAJ}+WB7h|cVMS7!A@+BMtM)%9G9Y9jLTW(l%6=5^W|dl&QeDAZJ~)+ zwDw26xLg_K2>KMST)Ms-<)I(8l--lQk(+wymb#?BLMKOB7j5#=oS9{e@g#po55?T1 zYFy1y6YfW7*$2oiR5e=bmv>ncmLATVzD16L#w^6rV|c?stu{Q=;8So`7j->ww!Bv2 zO`cu#&->ohFe~NqQg~<7bBczq()bFr^96mDo;B_;mf*o4mqi|)+DaOYi&^y56L4-n8qdG?wLJv_Z}j zR1d4xL)1nwrdu?_(@5YL(=F!1ETftyK8_K^#h{sGR_Q&bR7|Z|c8uKXY%1$KOG|Xm z!_%IVH?{9rX&5zS(REL~L8`q<8s*D5EML_0$|P7Cc{{WzRRd<0mg8RXUhH_KiJ$Xs zrfNf`S&F4Ubl?A&`@{?=_Jz#7RXOH8GVj$Ff7?NuN_SO7P#AFms8`zQy%)BSqtB zE+-q#I&U%4X6Z{k>AP&5shWthaC5Kg=AJplnW|;fa5n=~`|{Fg!Z4g?JMYVgS3NBn z;*CBUJ7G4#!J-}Ba8PSdqrZEKb!>lq575I1^S6uyaxC+{{TZgK(zr%-ysGP5D)pMN zG=!w`VLA(xGib}G;i;X<@huetW0sNG6EEv3UFFgA8n8RlXf7+!R1CJctSKlbwI}5; zYGLS=%WgudCgxJv)szMqQZ-@cvg;*JOl2yn?3`OVR5H6=oUo=+H0_mkBVsPSwe#L8Te2{wlNOU_mRXV~ zEv6BVP^_9#F}7w|vAEYlrEh9Sijo=x$F&s8B6{qfOz!?D8DL$tajb=R9#!_uM=fF0;%LJ#$re#W-HL zHMEw-(mPHh?DL`zTVj=P#S4?w?Rx=U;sBg`#P?k-W+oXx9- zBE*fcs(+19Ew$I9R#2vz@oX6EpEq@8Sy{N(*R-uH-01-|$}7WhmcGLsPqu*Jn6sv8 z+K#WR=&!oSHzwR0Fv}oc1Xu4+c=ifYC49NRphjY0s)XJE;T5Jz=xrgq!c+;py@eOo zhNZQJk@T7kn9(aZ^W}cQ*=)d!SixBuFr!y+mIln|6`WfjuHYPoH+)zkJy&J}W*`m| zd1gW)&tZbIG+;)o;7r30BF`|90agtaXD~J1h+?|B^$|@kzBATrzzoEiAm+>cy69+a zMH(<8R+uW02F&Ocrb?s%GkS%olCCNnfx-w1EdfYbIcLLczzlH%1?Tn#0pa-(tsJg!c<9bhv-O50}P_}%?8XsY&KvJS~{ zN&{xZ3eM7i8N6l#X7rj2n9-}7SD`I6dIe``z>HpzXV#Id1;Lq>vW&zQ(U}dHxnl9= zDl$ov60!}N449Evm{*Yo%;?pPfhl5Psze$vBUYFy>F*F7Inzjn;A}Qv24b@TGkSH- zhSo8zG+;)o;4BT8!5b#>EDe~^YcgO)ugQQJy*g(a*P&PBnRTR#jtNNvX24oRXEtEw ziq(Xv5{gdtS0)2yBo;Hqqyo!n|OqE1BL`S!FjdfjJ^$Vr2#V#qrJk*ghU%O8!#hQ zaFzzl=ruT})L_8}|235mo`jb{h-)@rMz0tLX?RJrGFlVSG-<$$STS0aGq7T`k_OC( z6{A&^YXR&dT~cm?Nz zhF5U*H@t!~6Ox+aEF2UbX|+!UYc^oU;_IW8-si-L(MlRHBUX%7(tsJgVziP5%;*)P z6~}#{8)gG$z$WUP^)_fWU`DLqEDe~^D>zF7X7mcq(tsJfW&>vQ>YVj-lT8N9h!vb! zMYQnXi(bK58Ze_*aFzzl;58dCqgQaIoh_+Xg0nPWMy$?R z&sDPEOeGYVOctCeI^nfyozWAf)SS%*%#e`TfEm4Fw2}tQ=oO=tG+;)rK3eJJjT7Ub zG++j-*?<|nCIe>l3eM7i8NGtDG+;)r;LPq=)`H;7N;ycunhluID>zF7X7mcq(tsJg zf-?mxWu{1RsbwcI%>}*C-LX zE8VMWo$?9=hFa-ZU3AJTSqaXpqw6pQkdYNb@uhB`OPGluJxV9zf;)eD%%`wmmX?^Z z_f-RZ8e($9V@}haTTxP%n5j!B1EnEG7uX*{LWJdAP+x=X!W#`*z7EcFn%+czApG$L>sJT+aOM3(DetV1-|*n ztJIwU+hUuuFW^A@t&KP(!M{E%V{!bh1IGhnZb$PQ3I4)A2+LekBIjEzD zE9xrX#Tbf9G}2&>8W}PCVRXF>rf>2~KFpCn%!O2j(GI#w$WZ_+ztF5m4g9SPR|DZS z;rP`Ie?Wc#I!LR6zqRl;5U>(VkOU!38Y1D}AkaDgD=Eq+!-64)P;67x!Pk$P;EIQH z2_=qs?vL_ELlSk6N)>#MjsGgcF<0FB4@YQK$dCV+n`-!54gV_X{3}6XF=D%q7ZWN8 zNtFU$O4^(|M}Bxb=K6A*zmeZQkU1}2L<^agwD2+WWF0!{jP>bSBGzbS)Uc|{%8)%T z3sgaFX|jc-tBi87POW)Xl9akq2U^COu8{1K+$U`45^P==Q^}M9c*HeD@O;H}2#{7+WNr|U(J}5`k?o!rs ztB(EC?IINV?%FCM(Y}U3108LgbX8D`G&;e4jvM$<2x04}3YdE9V9Yv@G~2{rQUCSv zHxmDN^`GA#;|t={`6{^1NQ;`z?NPpjL&>GY>EAA2**CO7Z|^E)@B5y?qDS(!uZx02 zd3i+kkj_20_i09oi%DfQ*fy%5V@2d#{Uc=8M4q2e+& zds#=X&T*ZWj`|s?QeM_{OCm4U7Lsym&L&q{BK`X4(b<<)7A-#%d8&;buNlhH6g_cG z*g)k7+eG|p2A$@p))@b)f#wDDij9P8gpj77s{uMkuc*qHQmW1xno@3gk%D#B2awWr z&g}q5?VreP%BgzJZ97qqa@NIB%4*)mIrr>k|B2jtmkZCOX@UGv_UxTvQqe6{XR7C> z#owWBX{|BX)1_V4Q`U6J+x$0Jlt8xlI?y7=i{15s>4Tnt$D-6$N6%oTOG#4ZG*pSq z960a(|D(5_Q+=BJzmC~0M>6*_qSR+0=3F^=Jxxy7w}wFrUl+Y#KlC;7l6W-oW?nU< zb@ph^p}RDmCeQpzJ$o$XG!*%);-X#jXo`)K#=-OSa~{LD-% z*HFx_Oi!)+)QZquNnBgmzdOWJE&jW6Z_ZtMNzBstcRZ)p$-ko>%(+Of6SFk_9na}? z^6#hzb1u^B#4L?}$8&m}{5$HwoQw22F-zm$@tj^K|BiYv=OVpM%+mOGJU?xnaA&~v z{F=K@^0fMO>~{0~nJ+1*pSYkQ?`UY)TF^9qT;9N;p}S9YRSht{)m5Xq^;=y*wQAO? fUadCXFyJq?Rl_m)a2qCv<0BFhk^c98u>}4fd_aIc;R45Ut z=++=<(5&IsK#}2m*1GRszw=zzd9HJw^Vf5(>+G&xy}j33pY>V8cd)0%{^v->5@V!fVLiHU zaMio-w`%UCr(LNu6r25ATSe(P({;k)*w@cqbb4eM&p0oM^`v~os8_g^lFwqh8IHWY zp)dTPCD_r_;S{-`cv-{3CuyPr*#Inj3YO-+4rN znOdk(Ct^e#MwHD$Eu2qmiiY)OzcdA{3nDT4{m$jr)~WMZsNA1NeU)Bbk#1OR>|K7L zhl?m{%8{UlN?1ba?@||)(mMG&wACz;$dLpjRw1S3RLPwq)Ybx-rI#WlzXyM$1z0Sf zarg7;G=reo58}_YCy4~jYf5BmzKfdgQp$sR`!3*mg|p`kzA(#EVCR3}m>rqQGae1~ zV*Vb+vwW~XR%5HDYWDR-8L3fFz4JFj8Ofh~9x3B?EKxTU!pyM0>~9-y9}Ij%N`ou~^tq?&oOBJ;06QUPxk!$D>Oyw%d=r}wo^paSk zA{4)IiE?*Z9g@=GA-T*VPH!3|a}oCltyxn>&8BVv4;`9Y7F>yhZ_}DjmCfw*ELYb{ zEj<+E0V{ZQFKbIYfj8cbUi<{y-MJJVw#p0}KaqOCe(< z#p0nkzDk_V)5o_JdJ9Y6L5!*m_nTqB6<3j9anR*eLGk8`)ArwEmzbD&BF+e+#TZJ~ zuM*8Tl&smZN>cEZXOU7SVvhtPZ=dRYCEkI0IZF}4%M;0zEF91Zow2XFqO%BXUMXav zwcmO9p;Dyf+>A`R=%o+lzeOyUTJ+nVBS%##^lQ`ldDMzfB+9p0b0%{dQC{iWkZCtx zop|0e&b$A%``RVS-lZ(#e8kwi4GGj6zY98B*Na4MbCG!FV(*V$bA8V^M=_kmsykuY zOqoa}U4L0zz z2eUg*tgu!+h(r#?Akm*pEh9HmB;-(uWVXF(r)b?wr=Nv`q!-c5XLGKso$ZN)tnlW4 zyLJI5v4Ium-648;?P6i?Dh1V5a8$lV0+q)1g39Wek;rEsB+@FCy;v$Yd$G`AI1o9A z;6w>_INy2HOHEQzuO~$BwFUDoltuPj zlF_Od)Ru@hNvq^HiJXLy7a_xEcgj0oSdE88<6QQ?MM}$e7E0v)=`~k$-JcuoA;vq# z=mf`BOC_h%Thdom^%>$^LA1ltglo5_Nh>px#etgqe8kw4<~P0w3$cwE&6agW*{Z-qH7r7e4|T5-h+&Q0C5^**B= zp9x!G0}|*pDhuj0Dn&DDxJZ)aaG&BO;d^H08nq?LrTgee%Ay&mtNe(6C}?k$c;Yb} zGquAZbggHq0*!-yqhdK8- zA3#V7CPH5SJ*O`tWLtRdjI4Y_6HTbg?NL%R?B^n>jpqv%`SeAVyh98l9^%?NyIUA7 z_gdxsC^;PoUmrY|=dcaJKIdvgZe4$``}y2b>9+@Xe&vYrK0xC5)kWMZ@r#>rzn1^> zJM>DT*y^7|0=f%D%kEyfchFUBNikx~N64`FvMWm~#a5ORD#j}c_NKAM5j8g9ECbRp zTFFH+k+1qYmg+V7HU=--VscI&Nv&X_aItmXd5k(V`}5$r#Uz~;u1|6$l1wymD%A3> z2;Is;RbtIZJ2paFJ2s4m{?KYhJiR;O8>(`gwWBr5t1^qrmmuv1Ph{eLvV3I0$s*+a zlg?=U?33(?tXnQCy>j}t!zCR_&4a1BPxUdYrXuS2Jw(?CH5K$ea9G&Cnc^LY1niY^ z{Y7`!plMmWTS}aEn%y`4Zf_i4p*Bx^t#0LWuXS;TLWto~goIeWxvX75%!53xo%07Y zF0=1d0vM*vGGeQvyq9^|jv8 zI|sZp;FM5{Xe*kB+De*jP*6h=+NE=~dFadwTGcb8b%BLC=;k$v5k3C1 z&kM40#hZ?PuSneNXseTaJ#?|RlI<=yPX&pX=H@PTc~w6_V0mqPewoocA+q zue#^X5;I_MXd4fr;Zv<{H}~(?>c4G#B^Z@=BHGrJH3g5uc~tcx(Y}}hR{baF1k;L(Hm%j>e#(JcKwuB!& zQDd}tbK&b_LvPdIEHZOmuwch4Df2DuLoFVyVVe!VM3*htC!4M);(k3!&u_-XrpmB~ zDeKMeX^6cXeYJg|-sLBMWh=Z{uWDB4lo|A)@fl(vd*p~*5f_D^m1q?TMPVo$tws?j z5=EhCv>wHv4JZ!9qm5`Y+~`Lw`Nj+uc98B~u)<`8$y@zYom3s9iRmDX*)7&BhW|~~ z;maXS>~$|dnnG|J{$KgCpJof0rT=sT3Qc+flcu*r z!@?1qkPedl?g^|N;S%iwEdAjNO#kUm{0&5J0y4)p6TOA#Y?=INqglHOF z2U(6v5VC*|hgE>G-`T+65hLQ;5yu|*?RyYmCh@sQ7y9)f^aUnO`2$OTl+bk1r5{d6 zk7TPyvc=j59GtBl$rk$?h~5Om*0S zaAe?C>q)Eiq}6(8I0&%oBXf=lwNAyNgis=hS7w&f>M6*Sk zh~7l>W>RxA(OW>fp)F9K3&i^eYhR$-G>u+?j*d$ZssOi5un9AP&0{orBPqpXflm0T z0>pJ1QN)Bja2RC*o5#3l2Mv#F2MtHwLBm0|}b zER;jq=8(2Iq-_pqn?qYNb)1HMK4A%A1z`&9FqCEh6Mkk9okN%pifd zRuHmK0qLuN^i@FmDjLC8XU za8hV|h?zy01N8h^Kr{=LkkS$;O{bO6q9zXjSyNd+=6DX_Vd57MeT?Xngk?Y$L_P^~ zm;uByfOS3)AG0S(CfKhar5Us`n$83th%>~xf{=wONDdXy;{h6+Q=xaPa|jOuqhNH{ zIY#tJ!ZILhDxX$Kn}AVQ!pI$%XvKiPr)k@e-96qfIT4m6x zA#w>}1z|lf3D&d*_GbxU1tFhSOA{T-pq-{&`jHRB{hlT}7CWV&zrl#Gt_R{AaGgdV z&fzr4;WWtsvz<68w6oAx79k%fI#vSIfl-{L@h9?Wbr7Kxh{sh2`7{ux5r|{fLCjVl zj)pa#b`J8%r`1EN2Er>qJob9hFJ?P&GHB;v)O?^Sj2-I=!g^p5%<2Ww?*&@SR6S^& zi3Z|i&@Ms_*}zO#N32T-D+ud>c-|Vwd}3A*T@Or}s-rbRv>%tSgzr6|w1IY& zM7|0;_6lgcB3Hq0C2S{72JITj^BT$X8p#torQqW{v91T=JaL^yAkOm|iFS=d!)zzc z30f=3vlX0r&^S-5TL{|-I|#c7Zxixq*J-S=MxZFHV;jk*jpWlt^1)6i_&6V|>w!2Q zT&EG31o^a)eA-ApnC-+#p|z7$!{mcb|5*p@o@^p)BkUmTBD_t=r`>?n&!=@j{8Au3 z3OY!S*l7gaJk<=uGl|&_#4FxO>!oD_W8fUuNv;u{v{rfr@%iwrB0h?{$mqJr=(@=0 zuu}>?9v#;8Ks-8JrxA!}y9?sC6Y^=dAWkDD951&?hPO$Ew@EAPG=h&ayiGF1YzN&v zsmP+zo5vJcGk{`rCf#^S9OySG0X#acNE{Z?%0#OG{U+JOQ6-KJp&s#>bV+(CRUBwM zB>}_{ux1ghOtcCRN06jPOsEpALwsGL^?=(Z#Ocz|N|BHSWKOF9hmj7@Z&DXHF{KAI zo?_Bvpj3=d9EdZQ0bhzxn)q^rEaE5=twP8qjvAp3adZipba{FgMI6YSmH;OFlp$J? zkVPD2px>kl5Z@bMtxBi^bbt)8qX&$bkf1BjSug_%5KWm-2Z%FQ1d0Kf)8as!xgzu> zO?(;R%Mr4OqfDp*jDR~CTwje)o%lM0dO+qhldeRlOya}3L40KrUm4m;gJw?45Xup< z2-SdolR7|Sm|I+jNmn7eLIqlhgFZSg4ID-?K)j~dR|ev-t3c*Dz;EC6h*o6bwoE!3 zR#Obff_=q?nv%d_Bn|AM$N-tsa>P*t;+UAqKpc||@tJg0&|*M53all8##1uHkpntR z$`h?X$Rbn$;ys3`Mkq#CgI40eZ4-*XhzS;zKyS=bk&YXQZ9cxAO<)XG2yIPS2|r0YT}F(BR> zm~7&x0Ucm1up>sF4-^OD9fB!C97Q0WF-#RgHlZreVNwf-S93lY7p}vk>%+`T0C6T* zD-g1Pev`^Xs{kV=)PY@;dBiaQvZf4y%xNQ_@stIyi(*F{dqPJ-dAb3_WCM+%z5&!X zAv7hv8POKNE{Y}5_QZD}+L2I#ZV0)l0P(##)@-^FnSW!5CP6nQ=M!Uy&jQ^%273hv zGYI+X0V5`$Z=fL%XN$E7(0Iy>(2CFo$eOYP`c2vsIuPHT(1TEdZbEju37lsXKo27p zaNC3m5NCx;4S>vPLqa1U?gcv*z+q%Zv^}9Cp%bAqp*wIGDbr11HrPOXPBR6^0ElB^ znh;tM+5&M*Q#iZY6YW8KNxB(0Y+%AqeIRq%0Ep)wYa>Dv;+PR_0USn_L|YNs5IPb% z5xNsf(9OwOn3J_IhnZy47eJmWbPM8GfFnj<2)#%E6MiZZtpda~7sC9g0`a&o^@wjk zXb5CY83B!_On`oqW50)VC$2 zwq);N-;k6V0dXeSu>j(Ig0(%NBcT%^lMcHc&VhC?=lVn&5}FXl0*L1y*RdgVAan#W zr`>?fWA4Q9AY{_*!50JKm{>~y@l4vou9hZ_JP@B}FjasFKh=Q7Q}cjb6n!AxvDh&r zG$D>Da2S~pZ9%jpp%rm#2qD=NU(s zZ3Cd+qzTY?$_mJwwjp#U^dMx@ouH;TeKFKj0OB(?rasVk%7FNWKzz=@bxeUc2dozY zab!#zLR%nn+JR_CLO0;iaSx)|^d%5Sh3-r;bS4?PKpaClrZLcX$`sf|F(X=n?n?HL zE7X^uyAkaMnn`zuItoC127@ykp{l56zWURmqKnV zAU*>ug*t5F=mPNyE``X3L>m#>5ZV(u5V{l6=#ngQX9$G*Kp@-)vY6AEM9Z>dS@_$q zIV}8b*c?{+&v4*2$_C&MY8DOq!t^<;<}nfA(Qzg);ineSI>evDngbDbihqS~uBga{ z3jh55p)NAQ;)xxNnrQkj%OH%^`}KHTHym)f4@t{@vp6FHiDU+kcn-Qr6OGkSP`Y{Tc&z zOH5ceygkCYTE^l=gt6S$N3V|uk7d7pL(KXOA@PyxqggRgtMpj-O_cv#t@$_{YuWm! zjksML%Q+ev8Z20#uM05LW7$SUu{e>dBjV#&oUpjC4V%J3(KIy{@}Z#^bW@mzgoY7A zID@RoWB3NnP{lo!d)&s}YnG7j%oQfPr91EM4@wS@q+2lWCSM#((q}$Q){+MI$32rNv!FqQ{Ypu?euYz!_%0zI_-VJaBSKB$@c0?J^~B3Y zK4}61R4^0{r|u4(7S|O(h>jTldfj6tQb3Bx2446$N{Od_rv}iXXfx=UbZf?OhJXNm zv14Bsd3|DUcjK~<=PH}muDT@i_M`jn$uvbB?M+_zL1N40#j)@l+D39TNlVGK$TTXY z^nu|V%0-uwfc~~AB+}=JXm^y>ob6PKKr<&Q(aa~;PLEbxJN-?)6^Xo#N1_XZhb}D) zZbstV7E0`gta2Yj9}xR-+?)M{2X7H@2W(KrAt`^kdW2>$e9#QZ=s&}x0=;vbx{-s0V)ctrMbWMI|8u+~`|Z(pBuBp&IB0x32j=NvvJ?+t18Rx_g*cO#!l z9+G;N=dHaVkZSa0^9dfS{G0ZnJ`d@Nl@|=*=~ekCnyId=73;-CLPMEoHzZQ&M7eLz z+gSmBQ&}o&GG%`kHvd?zYF~*M(WOY@te2Q!m4m}gq}*AFl8QBvb{Pv92iA&w3#?hc z-ai{Z0c#s`^8YKiMviOp=Z`%B3;YEd%y$JN?t6sdXvwaJ%^08kxq6PCXqNla3AgT2 z$dE0Pm_;v{aq!27GBqpL_)Rm;Sq;q`e7MX_>SdR9Z`ak!GCamIeI#3!d2gkUJ!1HA z5c_#`X-@u7{59i^PK@q-kpohT@)paq2geLZ@`S67nuM)*-s=kw%X?UqJmIhfF1SXDajnaJY5=yH(4OYIXu+q`F$aW&>W^9X+e&+?af zA;u%EoPpx9mfYOHAKnO^`a>&p6IcGe$(xl|cyR1&BahhA#z!{n?eh$VPM zDtVn-eBZ~}qxoeXJird*F@9+GKHYt}L$V~un8QO&L0XbHKL$2lqEYhE5@frF`ck|+qZG;iIK6*EZhG%Ac)eu^F{Bo0X;uy)VQMK-d+&EPApg3_aV9FC;?aCW zcUSot1f!62e8xHc?6_}3i)G1@y71J)4>)`Gv!5U-6($lhGxxk0i0Ixnl;G8KHd;0w z~7CmOM&;GD3E?tGG$Y>4qW$PwHBRPF483 zc~_OS$~{_wM5;@XInTYcc4jjrs0g`=?QyBSLJyf^J5?o1nUe3msAWd|gcz2kNc!#_ z=9}=;0|(SW>TDJxoQ-6+!1s(+i_dwN&_sB10oaNm;pS#Dk-UeN0 z-`_nKb|z=6Zv}oh?1Yx0W$>^p3?2wap>=TG`ukDvPVr>8jL`qX4aL829wy-;u4RXB zE!LXis|{8Ij8FJb8AoXzREx0L2A>Q0y-oHx|etG(!Dseq)X?QsX zQX!XkmfiZOQ1sv7I=>K-VxS0tfk6tdn}_Hk8FV}qHk1g8ghXtcgQ4b)RWSl~PWq2e z54v}m=_F7x@6ZjEZL(wA9ASd~zG5@};}x3*5fvWP+7?X2W4pME&q4-fGL z=nMe{T|j^#ASfsxB*GLC5f&DaoHbjNDI+N>D<2eWf>59J*`l3#p+UvlzPX<7N1vvud{&tJIMaP?a2^|tmK9i4ao z?7esY!Na~s&j(+;eD(Ux+jm2szkK~RGWz|;*f<^+1=0Q<7Vv*LE-@Gvl}@M81@X8j z)XjL{VswVGfq=NJmtaV&go@!VAxXQeU{tb+7tG#R#8ZVb4>qN(m+&|s;`LzL64#cEl<*vb6}%l$3TB;7 zjLplgb)Tv%ep>VGz^p5)GFk(d1CU%!5NtkPvIcISQ8Z~9ZW0`5GV@G6bWc$hK%H1U9M`pca!DyLEIcC|9+(ftCC zJa??!5+E>*HeLyv-2CADo^3tpR~BD;BR0CR{LjB4=f8hFH5jP=QNroUz&fd`?JAa^ z&+NY?#&8xaWqo`Ze{0nmp?KX5Pqu~|+EnJ5e%ZO*DC@`PJ)dSeo*dHfXmTDM%ldM# zEpf^3Da%Hrss?nAOAjlW1`}v04Lphm*^~^Mfsu2YO37Qs(&bMH zj|5o1f4P13?E7A=-o^E~{3|<$-+x;0sM~#El&jjychOZhM1@yc&-7K>?(D~`M z)zLpq<^`>Nmv4W2(2D1qxji!Yq0QS{>$WQ-+b;BXkvQP8d+^VWv*(ZP*!E%K!n?GJ zK$F5tX3_x(M-Su}aIM?oY|=N@_J>AChkn`hbKiNjX%z6Nc6c=Bk#6o(Ma_2JfJ~p# z!zaHrJhUtu_fae}{uj(KW28%s(_^n&oz@5>HMZfCkK8va+9^T{s&2QVzix}DXj-EXecOrBx%(+`H{Vv* zw?164c<11vpti?02UYd`0%~$4Zl3?4``X`W1@URg3TLz*MB~>b8!3xKalO#V_X<=&Ybi0 zgIUkv80wL0PA+B9$Cm`R&i?d3scg;HCwH`+vizIJs89MfITa<}7QAx3d~fCWkzm83X|%?=U>eyz9eZ$fWF+s}#~sV>%#3(c zX*jzsm1`8UW8>Iz_TxS6mlONezUG{IuyJyGduObw)PiNLi_Y!)wsTl7vTLO2;;33W}o>Rwx3)Q>#~YoK3mi(U7;BF>@MiSIGJywqj}O zL~Kb5+p4Nc^=w8_XZX$=p=l%Kix&MLqrL2g2BD`$FN4u`?Y+f3i}!1lpD%pB&Us`Jo3n3A%JQuXj~VpM zSrV;p-nM1r`t0Z1P2b&WD;RXwjXJO}`lW%}o(p{$OGe+X*e^+WyvFDq^KF3c$-GTx zb*~h;9b6!C=jv$GL4oZC_je&_1*EXM#$vt)E`tG>Z2#4>_cOV((v&)0E0+ z=!nuiab@^P&GzWvgARYp`04X?Wk%rT@vtT4R!Pf>huiYPG#;7!CKh?HZ{D4}Fy%x3 zf+rtu<4@(b_t@NST7JLy-X-g@TMgzV$2fcMK8<Fo#iRQ7YflXB zPgqB))#q(_W%KdU36%>ohYV+F|502nku!JjL)TExsQ}AdmHe;0_wQYDtX$LIRJT$4 zNbiWI~t`Iz4AHjVfS*c{+A38R39Bf{cpY zY>RYk9*QlPT9LHCSTB3BnCW$6wY3#;_+sys%|D&KWx&GWdF^5WUz zNeAN+cp1g)l<8MtZrVdCLd+wUDt6q>w6{!)pouVlmJ-<(}W|w*|g&`)9czZu9O|DwkJ)Y^U zIpg;J!q96SRCo878;l}ZPw8Dk!%Fqnd*n)gypnh7-TO$0z2?bwNs+G|%E zccOBd*Zf?+7G$*lU^oOcS_aU*e{($eIi~2|_FX6U%kDLfk=(>SqJQRtaB%Yy)47Qk zOY1iDjIv;2^5@43t<9jm+b?Ft-mAH+AY-u2`hI-ro=2bMB9>Yt1p1%#Zc%EpY`a#q ze0Pe?x&dyhgPiP>oXi_rVr|mv^j7K5A5^<{7$sIo6iQxRtLuyIj4HnM7;yETz5&egi}p!V~&a{=?>R-Def6J{i%^X^REn2K-N{pxD@Tm3$7K21G8 zzPA6`WZ_nQq5{n)1}ER({I09KiOJyXX$~# zJHLBW^j&Dnxo#=nCOUfjqg}!0&+oo}eZRcs!Pc$YV}<^DbpA%xxixdfva;mo8*1Jy z*^n$#J+xn5^8Kdv)0-+b_DA*BBnL=s$qYQYXLmRBjW9`uMEp2GPI>)t5%%R zJ+yw|fk}oVU(UV>;io);DD>W0tJ~Q^RQu`aJ{$NR1OAJ!0Qy^r=3g#EEUEO{Zf2o9 z7ExbM=M~ONMSBGV=+I8~%VOD`!Z?Ny+Wd3&+?};qMITkDXc+$vK8*n%O@u6CSRql7 xtD_gGM1_UNt5{jikFomaTNEL*A~t>MCVV*k_sOSXZM{{fd;5vc$G diff --git a/_samples/assets/output_xhtml.css b/_samples/assets/output_xhtml.css deleted file mode 100644 index 2b15e1c..0000000 --- a/_samples/assets/output_xhtml.css +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.html or http://ckeditor.com/license - * - * Styles used by the XHTML 1.1 sample page (xhtml.html). - */ - -/** - * Basic definitions for the editing area. - */ -body -{ - font-family: Arial, Verdana, sans-serif; - font-size: 80%; - color: #000000; - background-color: #ffffff; - padding: 5px; - margin: 0px; -} - -/** - * Core styles. - */ - -.Bold -{ - font-weight: bold; -} - -.Italic -{ - font-style: italic; -} - -.Underline -{ - text-decoration: underline; -} - -.StrikeThrough -{ - text-decoration: line-through; -} - -.Subscript -{ - vertical-align: sub; - font-size: smaller; -} - -.Superscript -{ - vertical-align: super; - font-size: smaller; -} - -/** - * Font faces. - */ - -.FontComic -{ - font-family: 'Comic Sans MS'; -} - -.FontCourier -{ - font-family: 'Courier New'; -} - -.FontTimes -{ - font-family: 'Times New Roman'; -} - -/** - * Font sizes. - */ - -.FontSmaller -{ - font-size: smaller; -} - -.FontLarger -{ - font-size: larger; -} - -.FontSmall -{ - font-size: 8pt; -} - -.FontBig -{ - font-size: 14pt; -} - -.FontDouble -{ - font-size: 200%; -} - -/** - * Font colors. - */ -.FontColor1 -{ - color: #ff9900; -} - -.FontColor2 -{ - color: #0066cc; -} - -.FontColor3 -{ - color: #ff0000; -} - -.FontColor1BG -{ - background-color: #ff9900; -} - -.FontColor2BG -{ - background-color: #0066cc; -} - -.FontColor3BG -{ - background-color: #ff0000; -} - -/** - * Indentation. - */ - -.Indent1 -{ - margin-left: 40px; -} - -.Indent2 -{ - margin-left: 80px; -} - -.Indent3 -{ - margin-left: 120px; -} - -/** - * Alignment. - */ - -.JustifyLeft -{ - text-align: left; -} - -.JustifyRight -{ - text-align: right; -} - -.JustifyCenter -{ - text-align: center; -} - -.JustifyFull -{ - text-align: justify; -} - -/** - * Other. - */ - -code -{ - font-family: courier, monospace; - background-color: #eeeeee; - padding-left: 1px; - padding-right: 1px; - border: #c0c0c0 1px solid; -} - -kbd -{ - padding: 0px 1px 0px 1px; - border-width: 1px 2px 2px 1px; - border-style: solid; -} - -blockquote -{ - color: #808080; -} diff --git a/_samples/assets/parsesample.css b/_samples/assets/parsesample.css deleted file mode 100644 index ce545ee..0000000 --- a/_samples/assets/parsesample.css +++ /dev/null @@ -1,70 +0,0 @@ -body -{ - font-family: Arial, Verdana, sans-serif; - font-size: 12px; - color: #222; - background-color: #fff; -} - -/* preserved spaces for rtl list item bullets. (#6249)*/ -ol,ul,dl -{ - padding-right:40px; -} - -h1,h2,h3,h4 -{ - font-family: Georgia, Times, serif; -} - -h1.lightBlue -{ - color: #00A6C7; - font-size: 1.8em; - font-weight:normal; -} - -h3.green -{ - color: #739E39; - font-weight:normal; -} - -span.markYellow { background-color: yellow; } -span.markGreen { background-color: lime; } - -img.left -{ - padding: 5px; - margin-right: 5px; - float:left; - border:2px solid #DDD; -} - -img.right -{ - padding: 5px; - margin-right: 5px; - float:right; - border:2px solid #DDD; -} - -a.green -{ - color:#739E39; -} - -table.grey -{ - background-color : #F5F5F5; -} - -table.grey th -{ - background-color : #DDD; -} - -ul.square -{ - list-style-type : square; -} diff --git a/_samples/assets/swfobject.js b/_samples/assets/swfobject.js deleted file mode 100644 index ef6d3b7..0000000 --- a/_samples/assets/swfobject.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ - * - * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: - * http://www.opensource.org/licenses/mit-license.php - * - */ -/* -Copyright (c) 2007 Geoff Stearns - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -/*jsl:ignoreall*/ -if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; diff --git a/_samples/autogrow.html b/_samples/autogrow.html deleted file mode 100644 index cd6b84b..0000000 --- a/_samples/autogrow.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - AutoGrow Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — Using AutoGrow Plugin -

-
-

- This sample shows how to configure CKEditor instances to use the - AutoGrow (autogrow) plugin that lets the editor window expand - and shrink depending on the amount and size of content entered in the editing area. -

-

- In its default implementation the AutoGrow feature can expand the - CKEditor window infinitely in order to avoid introducing scrollbars to the editing area. -

-

- It is also possible to set a maximum height for the editor window. Once CKEditor - editing area reaches the value in pixels specified in the - autoGrow_maxHeight - configuration setting, scrollbars will be added and the editor window will no longer expand. -

-

- To add a CKEditor instance using the autogrow plugin and its - autoGrow_maxHeight attribute, insert the following JavaScript call to your code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		extraPlugins : 'autogrow',
-		autoGrow_maxHeight : 800,
-		// Remove the Resize plugin as it does not make sense to use it in conjunction with the AutoGrow plugin.
-		removePlugins : 'resize'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced with CKEditor. The maximum height should - be given in pixels. -

-
- -
- -
-
-

- - - -

-

- - - -

-

- -

-
- - - diff --git a/_samples/bbcode.html b/_samples/bbcode.html deleted file mode 100644 index 8bff6fe..0000000 --- a/_samples/bbcode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - BBCode Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — BBCode Plugin -

-
-

- This sample shows how to configure CKEditor to output BBCode format instead of HTML. - Please note that the editor configuration was modified to reflect what is needed in a BBCode editing environment. - Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects. -

-

- Please note that currently there is no standard for the BBCode markup language, so its implementation - for different platforms (message boards, blogs etc.) can vary. This means that before using CKEditor to - output BBCode you may need to adjust the implementation to your own environment. -

-

- A snippet of the configuration code can be seen below; check the source of this page for - a full definition: -

-
-CKEDITOR.replace( 'editor1',
-	{
-		extraPlugins : 'bbcode',
-		toolbar :
-		[
-			['Source', '-', 'Save','NewPage','-','Undo','Redo'],
-			['Find','Replace','-','SelectAll','RemoveFormat'],
-			['Link', 'Unlink', 'Image'],
-			'/',
-			['FontSize', 'Bold', 'Italic','Underline'],
-			['NumberedList','BulletedList','-','Blockquote'],
-			['TextColor', '-', 'Smiley','SpecialChar', '-', 'Maximize']
-		],
-		... some other configurations omitted here
-	});	
-
- - -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/devtools.html b/_samples/devtools.html deleted file mode 100644 index 85ae641..0000000 --- a/_samples/devtools.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Using DevTools Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — Using the Developer Tools Plugin -

-
-

- This sample shows how to configure CKEditor instances to use the - Developer Tools (devtools) plugin that displays - information about dialog window elements, including the name of the dialog window, - tab, and UI element. Please note that the tooltip also contains a link to the - CKEditor JavaScript API - documentation for each of the selected elements. -

-

- This plugin is aimed at developers who would like to customize their CKEditor - instances and create their own plugins. By default it is turned off; it is - usually useful to only turn it on in the development phase. Note that it works with - all CKEditor dialog windows, including the ones that were created by custom plugins. -

-

- To add a CKEditor instance using the devtools plugin, insert - the following JavaScript call into your code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		extraPlugins : 'devtools'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced with CKEditor. -

-
- - -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/divreplace.html b/_samples/divreplace.html deleted file mode 100644 index 6f4ff41..0000000 --- a/_samples/divreplace.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - Replace DIV — CKEditor Sample - - - - - - - - - -

- CKEditor Sample — Replace DIV with CKEditor on the Fly -

-
-

- This sample shows how to automatically replace <div> elements - with a CKEditor instance on the fly, following user's doubleclick. The content - that was previously placed inside the <div> element will now - be moved into CKEditor editing area. -

-

- For details on how to create this setup check the source code of this sample page. -

-
- -
- -
-

- Double-click any of the following <div> elements to transform them into - editor instances.

-
-

- Part 1

-

- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi - semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna - rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla - nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce - eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. -

-
-
-

- Part 2

-

- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi - semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna - rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla - nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce - eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. -

-

- Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus - sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum - vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate. -

-
-
-

- Part 3

-

- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi - semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna - rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla - nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce - eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus. -

-
- - - diff --git a/_samples/enterkey.html b/_samples/enterkey.html deleted file mode 100644 index 52d88d4..0000000 --- a/_samples/enterkey.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - ENTER Key Configuration — CKEditor Sample - - - - - - - -

- CKEditor Sample — ENTER Key Configuration -

-
-

- This sample shows how to configure the Enter and Shift+Enter keys - to perform actions specified in the - enterMode - and shiftEnterMode - parameters, respectively. - You can choose from the following options: -

-
    -
  • ENTER_P – new <p> paragraphs are created;
  • -
  • ENTER_BR – lines are broken with <br> elements;
  • -
  • ENTER_DIV – new <div> blocks are created.
  • -
-

- The sample code below shows how to configure CKEditor to create a <div> block when Enter key is pressed. -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		enterMode : CKEDITOR.ENTER_DIV
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-
- - -
- -
-
- When Enter is pressed:
- -
-
- When Shift+Enter is pressed:
- -
-
-
-

-
- -

-

- -

-
- - - diff --git a/_samples/fullpage.html b/_samples/fullpage.html deleted file mode 100644 index 4315f3b..0000000 --- a/_samples/fullpage.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - Full Page Editing with Document Properties Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — Full Page Editing with Document Properties Plugin -

-
-

- This sample shows how to configure CKEditor to edit entire HTML pages, from the - <html> tag to the </html> tag. -

-

- The Document Properties (docprops) plugin is also turned on. - This plugin allows you to set the metadata of the page, including the page encoding, margins, - meta tags, or background. -

-

- The CKEditor instance below is inserted with a JavaScript call using the following code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		fullPage : true,
-		extraPlugins : 'docprops'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-
- - -
- -
-
- - - -

- -

-
- - - diff --git a/_samples/index.html b/_samples/index.html deleted file mode 100644 index e5b18e5..0000000 --- a/_samples/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - CKEditor Samples - - - - -

- CKEditor Samples Site -

-

- Basic Samples -

- -

- Basic Customization -

-
    -
  • Skins
    - Changing the CKEditor skin by adjusting a single configuration option. -
  • -
  • User Interface color
    - Changing CKEditor User Interface color and adding a toolbar button that lets the user set the UI color. -
  • -
  • User Interface languages
    - Changing CKEditor User Interface language and adding a drop-down list that lets the user choose the UI language. -
  • -
-

- Advanced Samples -

- -

- Additional plugins -

-
    -
  • AutoGrow plugin
    - Using the AutoGrow plugin in order to make the editor grow to fit the size of its content. -
  • -
  • Output for BBCode
    - Configuring CKEditor to produce BBCode tags instead of HTML. -
  • -
  • Stylesheet Parser plugin
    - Using the Stylesheet Parser plugin to fill the Styles drop-down list based on the CSS classes available in the document stylesheet. -
  • -
  • Developer Tools plugin
    - Using the Developer Tools plugin to display information about dialog window UI elements to allow for easier customization. -
  • -
  • Placeholder plugin
    - Using the Placeholder plugin to create uneditable sections that can only be created and modified with a proper dialog window. -
  • -
  • TableResize plugin
    - Using the TableResize plugin to enable table column resizing. -
  • -
- - - diff --git a/_samples/jqueryadapter.html b/_samples/jqueryadapter.html deleted file mode 100644 index a8ba6c5..0000000 --- a/_samples/jqueryadapter.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - jQuery Adapter — CKEditor Sample - - - - - - - - - -

- CKEditor Sample — Using jQuery Adapter -

-
-

- This sample shows how to load CKEditor and configure it using the - jQuery adapter. - In this case the jQuery adapter is responsible for transforming a <textarea> - element into a CKEditor instance and setting the configuration of the toolbar. -

-

- CKEditor instance with custom configuration set in jQuery can be inserted with the - following JavaScript code: -

-
$(function()
-{
-	var config = {
-		skin:'v2'
-	};
-
-	$('.textarea_class').ckeditor(config);
-});
-

- Note that textarea_class in the code above is the - class attribute of the <textarea> element to be replaced with - CKEditor. Any other jQuery selector can be used to match the target element. -

-
- - -
- -
- -
-

- - -

-

- -

-
- - - diff --git a/_samples/output_for_flash.html b/_samples/output_for_flash.html deleted file mode 100644 index ce0aa90..0000000 --- a/_samples/output_for_flash.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - Output for Flash — CKEditor Sample - - - - - - - - -

- CKEditor Sample — Producing Flash Compliant HTML Output -

-
-

- This sample shows how to configure CKEditor to output - HTML code that can be used with - - Adobe Flash. - The code will contain a subset of standard HTML elements like <b>, - <i>, and <p> as well as HTML attributes. -

-

- To add a CKEditor instance outputting Flash compliant HTML code, load the editor using a standard - JavaScript call, and define CKEditor features to use HTML elements and attributes. -

-

- For details on how to create this setup check the source code of this sample page. -

-
-

- To see how it works, create some content in the editing area of CKEditor on the left - and send it to the Flash object on the right side of the page by using the - Send to Flash button. -

- - -
- -
-
- - - - - -
- - - - -
- - - - diff --git a/_samples/output_html.html b/_samples/output_html.html deleted file mode 100644 index fed1e9c..0000000 --- a/_samples/output_html.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - HTML Compliant Output — CKEditor Sample - - - - - - -

- CKEditor Sample — Producing HTML Compliant Output -

-
-

- This sample shows how to configure CKEditor to output valid - HTML 4.01 code. - Traditional HTML elements like <b>, - <i>, and <font> are used in place of - <strong>, <em>, and CSS styles. -

-

- To add a CKEditor instance outputting legacy HTML 4.01 code, load the editor using a standard - JavaScript call, and define CKEditor features to use the HTML compliant elements and attributes. -

-

- A snippet of the configuration code can be seen below; check the source of this page for - full definition: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		coreStyles_bold	: { element : 'b' },
-		coreStyles_italic : { element : 'i' },
-
-		fontSize_style :
-			{
-				element		: 'font',
-				attributes	: { 'size' : '#(size)' }
-			}
-
-		// More definitions follow.
-	});
-
- - -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/output_xhtml.html b/_samples/output_xhtml.html deleted file mode 100644 index 0a87aa3..0000000 --- a/_samples/output_xhtml.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - XHTML Compliant Output — CKEditor Sample - - - - - - -

- CKEditor Sample — Producing XHTML Compliant Output -

-
-

- This sample shows how to configure CKEditor to output valid - XHTML 1.1 code. - Deprecated elements (<font>, <u>) or attributes - (size, face) will be replaced with XHTML compliant code. -

-

- To add a CKEditor instance outputting valid XHTML code, load the editor using a standard - JavaScript call and define CKEditor features to use the XHTML compliant elements and styles. -

-

- A snippet of the configuration code can be seen below; check the source of this page for - full definition: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		contentsCss : 'assets/output_xhtml.css',
-
-		coreStyles_bold	: { element : 'span', attributes : {'class': 'Bold'} },
-		coreStyles_italic : { element : 'span', attributes : {'class': 'Italic'} },
-
-		// More definitions follow.
-	});
-
- - -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/php/advanced.php b/_samples/php/advanced.php deleted file mode 100644 index a27dd4f..0000000 --- a/_samples/php/advanced.php +++ /dev/null @@ -1,120 +0,0 @@ - - - - - Setting Configuration Options — CKEditor Sample - - - - -

- CKEditor Sample — Setting Configuration Options -

-

- This sample shows how to insert a CKEditor instance with custom configuration options. -

-

- To set configuration options, use the config property. To set the attributes of a <textarea> element (which is displayed instead of CKEditor in unsupported browsers), use the textareaAttributes property. -

-
-<?php
-// Include the CKEditor class.
-include_once "ckeditor/ckeditor.php";
-
-// Create a class instance.
-$CKEditor = new CKEditor();
-
-// Path to the CKEditor directory.
-$CKEditor->basePath = '/ckeditor/';
-
-// Set global configuration (used by every instance of CKEditor).
-$CKEditor->config['width'] = 600;
-
-// Change default textarea attributes.
-$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10);
-
-// The initial value to be displayed in the editor.
-$initialValue = 'This is some sample text.';
-
-// Create the first instance.
-$CKEditor->editor("textarea_id", $initialValue);
-?>
-

- Note that textarea_id in the code above is the name attribute of - the <textarea> element to be created. -

- - -
- -
-
- -returnOutput = true; - -// Path to the CKEditor directory, ideally use an absolute path instead of a relative dir. -// $CKEditor->basePath = '/ckeditor/' -// If not set, CKEditor will try to detect the correct path. -$CKEditor->basePath = '../../'; - -// Set global configuration (will be used by all instances of CKEditor). -$CKEditor->config['width'] = 600; - -// Change default textarea attributes. -$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10); - -// The initial value to be displayed in the editor. -$initialValue = '

This is some sample text. You are using CKEditor.

'; - -// Create the first instance. -$code = $CKEditor->editor("editor1", $initialValue); - -echo $code; -?> -
- -editor("editor2", $initialValue, $config); -?> -

- -

-
- - - diff --git a/_samples/php/events.php b/_samples/php/events.php deleted file mode 100644 index 044b096..0000000 --- a/_samples/php/events.php +++ /dev/null @@ -1,153 +0,0 @@ - - - - - Adding Event Handlers — CKEditor Sample - - - - -

- CKEditor Sample — Adding Event Handlers -

-
-

- This sample shows how to add event handlers to CKEditor with PHP. -

-

- A snippet of the configuration code can be seen below; check the source code of this page for - the full definition: -

-
<?php
-// Include the CKEditor class.
-include("ckeditor/ckeditor.php");
-
-// Create a class instance.
-$CKEditor = new CKEditor();
-
-// Path to the CKEditor directory.
-$CKEditor->basePath = '/ckeditor/';
-
-// The initial value to be displayed in the editor.
-$initialValue = 'This is some sample text.';
-
-// Add event handler, instanceReady is fired when editor is loaded.
-$CKEditor->addEventHandler('instanceReady', 'function (evt) {
-	alert("Loaded editor: " + evt.editor.name);
-}');
-
-// Create an editor instance.
-$CKEditor->editor("editor1", $initialValue);
-
-
- -
- -
-
- -addGlobalEventHandler('dialogDefinition', $function); -} - -/** - * Adds a global event, will notify about an open dialog window. - */ -function CKEditorNotifyAboutOpenedDialog(&$CKEditor) { - $function = 'function (evt) { - alert("Loading a dialog window: " + evt.data.name); - }'; - - $CKEditor->addGlobalEventHandler('dialogDefinition', $function); -} - -// Include the CKEditor class. -include("../../ckeditor.php"); - -// Create a class instance. -$CKEditor = new CKEditor(); - -// Set a configuration option for all editors. -$CKEditor->config['width'] = 750; - -// Path to the CKEditor directory, ideally use an absolute path instead of a relative dir. -// $CKEditor->basePath = '/ckeditor/' -// If not set, CKEditor will try to detect the correct path. -$CKEditor->basePath = '../../'; - -// The initial value to be displayed in the editor. -$initialValue = '

This is some sample text. You are using CKEditor.

'; - -// Event that will be handled only by the first editor. -$CKEditor->addEventHandler('instanceReady', 'function (evt) { - alert("Loaded editor: " + evt.editor.name); -}'); - -// Create the first instance. -$CKEditor->editor("editor1", $initialValue); - -// Clear event handlers. Instances that will be created later will not have -// the 'instanceReady' listener defined a couple of lines above. -$CKEditor->clearEventHandlers(); -?> -
- -editor("editor2", $initialValue, $config, $events); -?> -

- -

-
- - - diff --git a/_samples/php/index.html b/_samples/php/index.html deleted file mode 100644 index 094db7e..0000000 --- a/_samples/php/index.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - CKEditor Samples — PHP Integration - - - -

- CKEditor Samples List for PHP -

-

- Basic Samples -

- -

- Advanced Samples -

- - - - diff --git a/_samples/php/replace.php b/_samples/php/replace.php deleted file mode 100644 index dbedd3c..0000000 --- a/_samples/php/replace.php +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Replace Selected Textarea Elements — CKEditor Sample - - - - -

- CKEditor Sample — Replace Selected Textarea Elements Using PHP Code -

-
-

- This sample shows how to replace a selected <textarea> element - with a CKEditor instance by using PHP code. -

-

- To replace a <textarea> element, place the following call at any point - after the <textarea> element: -

-
-<?php
-// Include the CKEditor class.
-include_once "ckeditor/ckeditor.php";
-
-// Create a class instance.
-$CKEditor = new CKEditor();
-
-// Path to the CKEditor directory.
-$CKEditor->basePath = '/ckeditor/';
-
-// Replace a textarea element with an id (or name) of "textarea_id".
-$CKEditor->replace("textarea_id");
-?>
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-
- -
- -
-
-

- - -

-

- -

-
- - basePath = '/ckeditor/' - // If not set, CKEditor will try to detect the correct path. - $CKEditor->basePath = '../../'; - // Replace a textarea element with an id (or name) of "editor1". - $CKEditor->replace("editor1"); - ?> - - diff --git a/_samples/php/replaceall.php b/_samples/php/replaceall.php deleted file mode 100644 index 74f4418..0000000 --- a/_samples/php/replaceall.php +++ /dev/null @@ -1,88 +0,0 @@ - - - - - Replace All Textarea Elements — CKEditor Sample - - - - -

- CKEditor Sample — Replace All Textarea Elements Using PHP Code -

-
-

- This sample shows how to replace all <textarea> elements - with CKEditor by using PHP code. -

-

- To replace all <textarea> elements, place the following call at any point - after the last <textarea> element: -

-
-<?php
-// Include the CKEditor class.
-include("ckeditor/ckeditor.php");
-
-// Create a class instance.
-$CKEditor = new CKEditor();
-
-// Path to the CKEditor directory.
-$CKEditor->basePath = '/ckeditor/';
-
-// Replace all textarea elements with CKEditor.
-$CKEditor->replaceAll();
-?>
-
- -
- -
-
-

- - -

-

- - -

-

- -

-
- - basePath = '/ckeditor/' - // If not set, CKEditor will try to detect the correct path. - $CKEditor->basePath = '../../'; - // Replace all textarea elements with CKEditor. - $CKEditor->replaceAll(); - ?> - - diff --git a/_samples/php/standalone.php b/_samples/php/standalone.php deleted file mode 100644 index 1b02a52..0000000 --- a/_samples/php/standalone.php +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Creating CKEditor Instances — CKEditor Sample - - - - -

- CKEditor Sample — Creating CKEditor Instances -

-
-

- This sample shows how to create a CKEditor instance with PHP. -

-
-<?php
-include_once "ckeditor/ckeditor.php";
-
-// Create a class instance.
-$CKEditor = new CKEditor();
-
-// Path to the CKEditor directory.
-$CKEditor->basePath = '/ckeditor/';
-
-// Create a textarea element and attach CKEditor to it.
-$CKEditor->editor("textarea_id", "This is some sample text");
-?>
-

- Note that textarea_id in the code above is the id and name attribute of - the <textarea> element that will be created. -

-
- -
- -
- -
-

- -

-

- This is some sample text.

'; - // Create a class instance. - $CKEditor = new CKEditor(); - // Path to the CKEditor directory, ideally use an absolute path instead of a relative dir. - // $CKEditor->basePath = '/ckeditor/' - // If not set, CKEditor will try to detect the correct path. - $CKEditor->basePath = '../../'; - // Create a textarea element and attach CKEditor to it. - $CKEditor->editor("editor1", $initialValue); - ?> - -

-
- - - diff --git a/_samples/placeholder.html b/_samples/placeholder.html deleted file mode 100644 index bb3d641..0000000 --- a/_samples/placeholder.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Placeholder Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — Using the Placeholder Plugin -

-
-

- This sample shows how to configure CKEditor instances to use the - Placeholder plugin that lets you insert read-only elements - into your content. To enter and modify read-only text, use the - Create Placeholder button and its matching dialog window. -

-

- To add a CKEditor instance that uses the placeholder plugin and a related - Create Placeholder toolbar button, insert the following JavaScript - call to your code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		extraPlugins : 'placeholder',
-		toolbar : [ [ 'Source', 'Bold' ], ['CreatePlaceholder'] ]
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced with CKEditor. -

-
- -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/readonly.html b/_samples/readonly.html deleted file mode 100644 index e462fbd..0000000 --- a/_samples/readonly.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - Read-only State — CKEditor Sample - - - - - - - - -

- CKEditor Sample — Using the CKEditor Read-Only API -

-
-

- This sample shows how to use the - setReadOnly - API to put editor into the read-only state that makes it impossible for users to change the editor contents. -

-

- For details on how to create this setup check the source code of this sample page. -

-
- - -
- -
-
-

- -

-

- - -

-
- - - diff --git a/_samples/replacebyclass.html b/_samples/replacebyclass.html deleted file mode 100644 index c397193..0000000 --- a/_samples/replacebyclass.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Replace Textareas by Class Name — CKEditor Sample - - - - - - -

- CKEditor Sample — Replace Textarea Elements by Class Name -

-
-

- This sample shows how to automatically replace all <textarea> elements - of a given class with a CKEditor instance. -

-

- To replace a <textarea> element, simply assign it the ckeditor - class, as in the code below: -

-
<textarea class="ckeditor" name="editor1"></textarea>
-

- Note that other <textarea> attributes (like id or name) need to be adjusted to your document. -

-
- - -
- -
-
-

- - -

-

- -

-
- - - diff --git a/_samples/replacebycode.html b/_samples/replacebycode.html deleted file mode 100644 index 68398dd..0000000 --- a/_samples/replacebycode.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - Replace Textarea by Code — CKEditor Sample - - - - - - -

- CKEditor Sample — Replace Textarea Elements Using JavaScript Code -

-
-

- This sample shows how to automatically replace all <textarea> elements - with a CKEditor instance by using a JavaScript call. -

-

- To replace a <textarea> element, place the following call at any point - after the <textarea> element or inside a <script> element located - in the <head> section of the page, in a window.onload event handler: -

-
CKEDITOR.replace( 'textarea_id' );
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-
- - -
- -
-
-

- - - -

-

- - - -

-

- -

-
- - - diff --git a/_samples/sample.css b/_samples/sample.css deleted file mode 100644 index 01b930b..0000000 --- a/_samples/sample.css +++ /dev/null @@ -1,157 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -html, body, h1, h2, h3, h4, h5, h6, div, span, blockquote, p, address, form, fieldset, img, ul, ol, dl, dt, dd, li, hr, table, td, th, strong, em, sup, sub, dfn, ins, del, q, cite, var, samp, code, kbd, tt, pre { - line-height: 1.5em; -} - -body { - padding:10px 30px; -} - -input, textarea, select, option, optgroup, button, td, th { - font-size: 100%; -} - -pre, -code, -kbd, -samp, -tt{ - font-family: monospace,monospace; - font-size: 1em; -} - -h1.samples { - color:#0782C1; - font-size:200%; - font-weight:normal; - margin: 0; - padding: 0; -} - -h2.samples { - color:#000000; - font-size:130%; - margin: 0; - padding: 0; -} - -p, blockquote, address, form, pre, dl, h1.samples, h2.samples { - margin-bottom:15px; -} - -ul.samples { - margin-bottom:15px; -} - -.clear { - clear:both; -} - -fieldset -{ - margin: 0; - padding: 10px; -} - -body, input, textarea { - color: #333333; - font-family: Arial, Helvetica, sans-serif; -} - -body { - font-size: 75%; -} - -a.samples { - color:#189DE1; - text-decoration:none; -} - -a.samples:hover { - text-decoration:underline; -} - -form -{ - margin: 0; - padding: 0; -} - -pre.samples -{ - background-color: #F7F7F7; - border: 1px solid #D7D7D7; - overflow: auto; - padding: 0.25em; -} - -#alerts -{ - color: Red; -} - -#footer hr -{ - margin: 10px 0 15px 0; - height: 1px; - border: solid 1px gray; - border-bottom: none; -} - -#footer p -{ - margin: 0 10px 10px 10px; - float: left; -} - -#footer #copy -{ - float: right; -} - -#outputSample -{ - width: 100%; - table-layout: fixed; -} - -#outputSample thead th -{ - color: #dddddd; - background-color: #999999; - padding: 4px; - white-space: nowrap; -} - -#outputSample tbody th -{ - vertical-align: top; - text-align: left; -} - -#outputSample pre -{ - margin: 0; - padding: 0; - white-space: pre; /* CSS2 */ - white-space: -moz-pre-wrap; /* Mozilla*/ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS 2.1 */ - white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ - word-wrap: break-word; /* IE */ -} - -.description { - border: 1px dotted #B7B7B7; - margin-bottom: 10px; - padding: 10px 10px 0; -} - -label { - display: block; - margin-bottom:6px; -} diff --git a/_samples/sample.js b/_samples/sample.js deleted file mode 100644 index eb0c578..0000000 --- a/_samples/sample.js +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -// This file is not required by CKEditor and may be safely ignored. -// It is just a helper file that displays a red message about browser compatibility -// at the top of the samples (if incompatible browser is detected). - -if ( window.CKEDITOR ) -{ - (function() - { - var showCompatibilityMsg = function() - { - var env = CKEDITOR.env; - - var html = '

Your browser is not compatible with CKEditor.'; - - var browsers = - { - gecko : 'Firefox 2.0', - ie : 'Internet Explorer 6.0', - opera : 'Opera 9.5', - webkit : 'Safari 3.0' - }; - - var alsoBrowsers = ''; - - for ( var key in env ) - { - if ( browsers[ key ] ) - { - if ( env[key] ) - html += ' CKEditor is compatible with ' + browsers[ key ] + ' or higher.'; - else - alsoBrowsers += browsers[ key ] + '+, '; - } - } - - alsoBrowsers = alsoBrowsers.replace( /\+,([^,]+), $/, '+ and $1' ); - - html += ' It is also compatible with ' + alsoBrowsers + '.'; - - html += '

With non compatible browsers, you should still be able to see and edit the contents (HTML) in a plain text field.

'; - - var alertsEl = document.getElementById( 'alerts' ); - alertsEl && ( alertsEl.innerHTML = html ); - }; - - var onload = function() - { - // Show a friendly compatibility message as soon as the page is loaded, - // for those browsers that are not compatible with CKEditor. - if ( !CKEDITOR.env.isCompatible ) - showCompatibilityMsg(); - }; - - // Register the onload listener. - if ( window.addEventListener ) - window.addEventListener( 'load', onload, false ); - else if ( window.attachEvent ) - window.attachEvent( 'onload', onload ); - })(); -} diff --git a/_samples/sample_posteddata.php b/_samples/sample_posteddata.php deleted file mode 100644 index 88815b0..0000000 --- a/_samples/sample_posteddata.php +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/_samples/sharedspaces.html b/_samples/sharedspaces.html deleted file mode 100644 index c5b70b7..0000000 --- a/_samples/sharedspaces.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - Shared Toolbars — CKEditor Sample - - - - - - - -

- CKEditor Sample — Shared Toolbars -

-
-

- This sample shows how to configure multiple CKEditor instances to share some parts of the interface. - You can choose to share the toolbar (topSpace), the elements path - (bottomSpace), or both. -

-

- CKEditor instances with shared spaces can be inserted with a JavaScript call using the following code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		sharedSpaces :
-		{
-			top : 'topSpace',
-			bottom : 'bottomSpace'
-		}
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced with CKEditor. -

-
- -
- -
-
-
-
-

- - -

-

- - -

-

- - -

-

- - -

-

- -

-
-
-
- - - - diff --git a/_samples/skins.html b/_samples/skins.html deleted file mode 100644 index 737cb0c..0000000 --- a/_samples/skins.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Skins — CKEditor Sample - - - - - - -

- CKEditor Sample — Skins -

-
-

- This sample shows how to automatically replace <textarea> elements - with a CKEditor instance using a specific skin. -

-

- CKEditor with a specified skin (in this case, the "Office 2003" skin) is inserted with a JavaScript call using the following code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		skin : 'office2003'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-
- - -
- -
-
-

"Kama" skin

-

The default skin used in CKEditor. No additional configuration is required.

-

- - -

-

"Office 2003" skin

-

Use the following code to configure a CKEditor instance to use the "Office 2003" skin.

-
CKEDITOR.replace( 'textarea_id',
-	{
-		skin : 'office2003'
-	});
-

- - -

-

"V2" skin

-

Use the following code to configure a CKEditor instance to use the "V2" skin.

-
CKEDITOR.replace( 'textarea_id',
-	{
-		skin : 'v2'
-	});
- - -
- - - diff --git a/_samples/stylesheetparser.html b/_samples/stylesheetparser.html deleted file mode 100644 index c08b005..0000000 --- a/_samples/stylesheetparser.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Using Stylesheet Parser Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — Using the Stylesheet Parser Plugin -

-
-

- This sample shows how to configure CKEditor instances to use the - Stylesheet Parser (stylesheetparser) plugin that fills - the Styles drop-down list based on the CSS rules available in the document stylesheet. -

-

- To add a CKEditor instance using the stylesheetparser plugin, insert - the following JavaScript call into your code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		extraPlugins : 'stylesheetparser'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced with CKEditor. -

-
- - -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/tableresize.html b/_samples/tableresize.html deleted file mode 100644 index 2f8573f..0000000 --- a/_samples/tableresize.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Using TableResize Plugin — CKEditor Sample - - - - - - -

- CKEditor Sample — Using the TableResize Plugin -

-
-

- This sample shows how to configure CKEditor instances to use the - TableResize (tableresize) plugin that allows - the user to edit table columns by using the mouse. -

-

- The TableResize plugin makes it possible to modify table column width. Hover - your mouse over the column border to see the cursor change to indicate that - the column can be resized. Click and drag your mouse to set the desired width. -

-

- By default the plugin is turned off. To add a CKEditor instance using the - TableResize plugin, insert the following JavaScript call into your code: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		extraPlugins : 'tableresize'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced with CKEditor. -

-
- -
- -
-
-

- - - -

-

- -

-
- - - diff --git a/_samples/ui_color.html b/_samples/ui_color.html deleted file mode 100644 index ed2f07d..0000000 --- a/_samples/ui_color.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - UI Color Picker — CKEditor Sample - - - - - - -

- CKEditor Sample — UI Color Picker -

-
-

- This sample shows how to automatically replace <textarea> elements - with a CKEditor instance with an option to change the color of its user interface. -

-

Setting the User Interface Color

-

- To specify the color of the user interface, set the uiColor property: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		uiColor: '#EE0000'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-

Enabling the Color Picker

-

- If the uicolor plugin along with the dedicated UIColor - toolbar button is added to CKEditor, the user will also be able to pick the color of the - UI from the color palette available in the UI Color Picker dialog window. -

-

- To insert a CKEditor instance with the uicolor plugin enabled, - use the following JavaScript call: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		extraPlugins : 'uicolor',
-		toolbar : [ [ 'Bold', 'Italic' ], [ 'UIColor' ] ]
-	});
-
- -
- -
-

- Click the UI Color Picker button to test your color preferences at runtime. -

-

- The first editor instance includes the UI Color Picker toolbar button, - but the default UI color is not defined, so the editor uses the skin color. -

-
-

- - -

-

- The second editor instance includes the UI Color Picker toolbar button. The - default UI color was defined, so the skin color is not used. -

-

- - -

-

- -

-
- - - diff --git a/_samples/ui_languages.html b/_samples/ui_languages.html deleted file mode 100644 index 90b8675..0000000 --- a/_samples/ui_languages.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - User Interface Globalization — CKEditor Sample - - - - - - - -

- CKEditor Sample — User Interface Languages -

-
-

- This sample shows how to automatically replace <textarea> elements - with a CKEditor instance with an option to change the language of its user interface. -

-

- It pulls the language list from CKEditor _languages.js file that contains the list of supported languages and creates - a drop-down list that lets the user change the UI language. -

-

- By default, CKEditor automatically localizes the editor to the language of the user. - The UI language can be controlled with two configuration options: - - language and - defaultLanguage. The defaultLanguage setting specifies the - default CKEditor language to be used when a localization suitable for user's settings is not available. -

-

- To specify the user interface language that will be used no matter what language is - specified in user's browser or operating system, set the language property: -

-
CKEDITOR.replace( 'textarea_id',
-	{
-		// Load the German interface.
-		language: 'de'
-	});
-

- Note that textarea_id in the code above is the id attribute of - the <textarea> element to be replaced. -

-
- -
- -
-
-

- Available languages ( languages!):
- -
- (You may see strange characters if your system does not - support the selected language) -

-

- - -

-
- - - diff --git a/_source/adapters/jquery.js b/_source/adapters/jquery.js deleted file mode 100644 index fb768ca..0000000 --- a/_source/adapters/jquery.js +++ /dev/null @@ -1,306 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview jQuery adapter provides easy use of basic CKEditor functions - * and access to internal API. It also integrates some aspects of CKEditor with - * jQuery framework. - * - * Every TEXTAREA, DIV and P elements can be converted to working editor. - * - * Plugin exposes some of editor's event to jQuery event system. All of those are namespaces inside - * ".ckeditor" namespace and can be binded/listened on supported textarea, div and p nodes. - * - * Available jQuery events: - * - instanceReady.ckeditor( editor, rootNode ) - * Triggered when new instance is ready. - * - destroy.ckeditor( editor ) - * Triggered when instance is destroyed. - * - getData.ckeditor( editor, eventData ) - * Triggered when getData event is fired inside editor. It can change returned data using eventData reference. - * - setData.ckeditor( editor ) - * Triggered when getData event is fired inside editor. - * - * @example - * - * - * - */ - -(function() -{ - /** - * Allows CKEditor to override jQuery.fn.val(), making it possible to use the val() - * function on textareas, as usual, having it synchronized with CKEditor.
- *
- * This configuration option is global and executed during the jQuery Adapter loading. - * It can't be customized across editor instances. - * @type Boolean - * @example - * <script> - * CKEDITOR.config.jqueryOverrideVal = true; - * </script> - * <!-- Important: The JQuery adapter is loaded *after* setting jqueryOverrideVal --> - * <script src="/ckeditor/adapters/jquery.js"></script> - * @example - * // ... then later in the code ... - * - * $( 'textarea' ).ckeditor(); - * // ... - * $( 'textarea' ).val( 'New content' ); - */ - CKEDITOR.config.jqueryOverrideVal = typeof CKEDITOR.config.jqueryOverrideVal == 'undefined' - ? true : CKEDITOR.config.jqueryOverrideVal; - - var jQuery = window.jQuery; - - if ( typeof jQuery == 'undefined' ) - return; - - // jQuery object methods. - jQuery.extend( jQuery.fn, - /** @lends jQuery.fn */ - { - /** - * Return existing CKEditor instance for first matched element. - * Allows to easily use internal API. Doesn't return jQuery object. - * - * Raised exception if editor doesn't exist or isn't ready yet. - * - * @name jQuery.ckeditorGet - * @return CKEDITOR.editor - * @see CKEDITOR.editor - */ - ckeditorGet: function() - { - var instance = this.eq( 0 ).data( 'ckeditorInstance' ); - if ( !instance ) - throw "CKEditor not yet initialized, use ckeditor() with callback."; - return instance; - }, - /** - * Triggers creation of CKEditor in all matched elements (reduced to DIV, P and TEXTAREAs). - * Binds callback to instanceReady event of all instances. If editor is already created, than - * callback is fired right away. - * - * Mixed parameter order allowed. - * - * @param callback Function to be run on editor instance. Passed parameters: [ textarea ]. - * Callback is fiered in "this" scope being ckeditor instance and having source textarea as first param. - * - * @param config Configuration options for new instance(s) if not already created. - * See URL - * - * @example - * $( 'textarea' ).ckeditor( function( textarea ) { - * $( textarea ).val( this.getData() ) - * } ); - * - * @name jQuery.fn.ckeditor - * @return jQuery.fn - */ - ckeditor: function( callback, config ) - { - if ( !CKEDITOR.env.isCompatible ) - return this; - - if ( !jQuery.isFunction( callback )) - { - var tmp = config; - config = callback; - callback = tmp; - } - config = config || {}; - - this.filter( 'textarea, div, p' ).each( function() - { - var $element = jQuery( this ), - editor = $element.data( 'ckeditorInstance' ), - instanceLock = $element.data( '_ckeditorInstanceLock' ), - element = this; - - if ( editor && !instanceLock ) - { - if ( callback ) - callback.apply( editor, [ this ] ); - } - else if ( !instanceLock ) - { - // CREATE NEW INSTANCE - - // Handle config.autoUpdateElement inside this plugin if desired. - if ( config.autoUpdateElement - || ( typeof config.autoUpdateElement == 'undefined' && CKEDITOR.config.autoUpdateElement ) ) - { - config.autoUpdateElementJquery = true; - } - - // Always disable config.autoUpdateElement. - config.autoUpdateElement = false; - $element.data( '_ckeditorInstanceLock', true ); - - // Set instance reference in element's data. - editor = CKEDITOR.replace( element, config ); - $element.data( 'ckeditorInstance', editor ); - - // Register callback. - editor.on( 'instanceReady', function( event ) - { - var editor = event.editor; - setTimeout( function() - { - // Delay bit more if editor is still not ready. - if ( !editor.element ) - { - setTimeout( arguments.callee, 100 ); - return; - } - - // Remove this listener. - event.removeListener( 'instanceReady', this.callee ); - - // Forward setData on dataReady. - editor.on( 'dataReady', function() - { - $element.trigger( 'setData' + '.ckeditor', [ editor ] ); - }); - - // Forward getData. - editor.on( 'getData', function( event ) { - $element.trigger( 'getData' + '.ckeditor', [ editor, event.data ] ); - }, 999 ); - - // Forward destroy event. - editor.on( 'destroy', function() - { - $element.trigger( 'destroy.ckeditor', [ editor ] ); - }); - - // Integrate with form submit. - if ( editor.config.autoUpdateElementJquery && $element.is( 'textarea' ) && $element.parents( 'form' ).length ) - { - var onSubmit = function() - { - $element.ckeditor( function() - { - editor.updateElement(); - }); - }; - - // Bind to submit event. - $element.parents( 'form' ).submit( onSubmit ); - - // Bind to form-pre-serialize from jQuery Forms plugin. - $element.parents( 'form' ).bind( 'form-pre-serialize', onSubmit ); - - // Unbind when editor destroyed. - $element.bind( 'destroy.ckeditor', function() - { - $element.parents( 'form' ).unbind( 'submit', onSubmit ); - $element.parents( 'form' ).unbind( 'form-pre-serialize', onSubmit ); - }); - } - - // Garbage collect on destroy. - editor.on( 'destroy', function() - { - $element.data( 'ckeditorInstance', null ); - }); - - // Remove lock. - $element.data( '_ckeditorInstanceLock', null ); - - // Fire instanceReady event. - $element.trigger( 'instanceReady.ckeditor', [ editor ] ); - - // Run given (first) code. - if ( callback ) - callback.apply( editor, [ element ] ); - }, 0 ); - }, null, null, 9999); - } - else - { - // Editor is already during creation process, bind our code to the event. - CKEDITOR.on( 'instanceReady', function( event ) - { - var editor = event.editor; - setTimeout( function() - { - // Delay bit more if editor is still not ready. - if ( !editor.element ) - { - setTimeout( arguments.callee, 100 ); - return; - } - - if ( editor.element.$ == element ) - { - // Run given code. - if ( callback ) - callback.apply( editor, [ element ] ); - } - }, 0 ); - }, null, null, 9999); - } - }); - return this; - } - }); - - // New val() method for objects. - if ( CKEDITOR.config.jqueryOverrideVal ) - { - jQuery.fn.val = CKEDITOR.tools.override( jQuery.fn.val, function( oldValMethod ) - { - /** - * CKEditor-aware val() method. - * - * Acts same as original jQuery val(), but for textareas which have CKEditor instances binded to them, method - * returns editor's content. It also works for settings values. - * - * @param oldValMethod - * @name jQuery.fn.val - */ - return function( newValue, forceNative ) - { - var isSetter = typeof newValue != 'undefined', - result; - - this.each( function() - { - var $this = jQuery( this ), - editor = $this.data( 'ckeditorInstance' ); - - if ( !forceNative && $this.is( 'textarea' ) && editor ) - { - if ( isSetter ) - editor.setData( newValue ); - else - { - result = editor.getData(); - // break; - return null; - } - } - else - { - if ( isSetter ) - oldValMethod.call( $this, newValue ); - else - { - result = oldValMethod.call( $this ); - // break; - return null; - } - } - - return true; - }); - return isSetter ? this : result; - }; - }); - } -})(); diff --git a/_source/core/_bootstrap.js b/_source/core/_bootstrap.js deleted file mode 100644 index 7ed91de..0000000 --- a/_source/core/_bootstrap.js +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview API initialization code. - */ - -(function() -{ - // Disable HC detaction in WebKit. (#5429) - if ( CKEDITOR.env.webkit ) - { - CKEDITOR.env.hc = false; - return; - } - - // Check whether high contrast is active by creating a colored border. - var hcDetect = CKEDITOR.dom.element.createFromHtml( - '
', CKEDITOR.document ); - - hcDetect.appendTo( CKEDITOR.document.getHead() ); - - // Update CKEDITOR.env. - // Catch exception needed sometimes for FF. (#4230) - try - { - CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' ); - } - catch (e) - { - CKEDITOR.env.hc = false; - } - - if ( CKEDITOR.env.hc ) - CKEDITOR.env.cssClass += ' cke_hc'; - - hcDetect.remove(); -})(); - -// Load core plugins. -CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function() - { - CKEDITOR.status = 'loaded'; - CKEDITOR.fire( 'loaded' ); - - // Process all instances created by the "basic" implementation. - var pending = CKEDITOR._.pending; - if ( pending ) - { - delete CKEDITOR._.pending; - - for ( var i = 0 ; i < pending.length ; i++ ) - CKEDITOR.add( pending[ i ] ); - } - }); - -// Needed for IE6 to not request image (HTTP 200 or 304) for every CSS background. (#6187) -if ( CKEDITOR.env.ie ) -{ - // Remove IE mouse flickering on IE6 because of background images. - try - { - document.execCommand( 'BackgroundImageCache', false, true ); - } - catch (e) - { - // We have been reported about loading problems caused by the above - // line. For safety, let's just ignore errors. - } -} - -/** - * Indicates that CKEditor is running on a High Contrast environment. - * @name CKEDITOR.env.hc - * @example - * if ( CKEDITOR.env.hc ) - * alert( 'You're running on High Contrast mode. The editor interface will get adapted to provide you a better experience.' ); - */ - -/** - * Fired when a CKEDITOR core object is fully loaded and ready for interaction. - * @name CKEDITOR#loaded - * @event - */ diff --git a/_source/core/ckeditor.js b/_source/core/ckeditor.js deleted file mode 100644 index 548fd44..0000000 --- a/_source/core/ckeditor.js +++ /dev/null @@ -1,141 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Contains the third and last part of the {@link CKEDITOR} object - * definition. - */ - -// Remove the CKEDITOR.loadFullCore reference defined on ckeditor_basic. -delete CKEDITOR.loadFullCore; - -/** - * Holds references to all editor instances created. The name of the properties - * in this object correspond to instance names, and their values contains the - * {@link CKEDITOR.editor} object representing them. - * @type {Object} - * @example - * alert( CKEDITOR.instances.editor1.name ); // "editor1" - */ -CKEDITOR.instances = {}; - -/** - * The document of the window holding the CKEDITOR object. - * @type {CKEDITOR.dom.document} - * @example - * alert( CKEDITOR.document.getBody().getName() ); // "body" - */ -CKEDITOR.document = new CKEDITOR.dom.document( document ); - -/** - * Adds an editor instance to the global {@link CKEDITOR} object. This function - * is available for internal use mainly. - * @param {CKEDITOR.editor} editor The editor instance to be added. - * @example - */ -CKEDITOR.add = function( editor ) -{ - CKEDITOR.instances[ editor.name ] = editor; - - editor.on( 'focus', function() - { - if ( CKEDITOR.currentInstance != editor ) - { - CKEDITOR.currentInstance = editor; - CKEDITOR.fire( 'currentInstance' ); - } - }); - - editor.on( 'blur', function() - { - if ( CKEDITOR.currentInstance == editor ) - { - CKEDITOR.currentInstance = null; - CKEDITOR.fire( 'currentInstance' ); - } - }); -}; - -/** - * Removes an editor instance from the global {@link CKEDITOR} object. This function - * is available for internal use only. External code must use {@link CKEDITOR.editor.prototype.destroy} - * to avoid memory leaks. - * @param {CKEDITOR.editor} editor The editor instance to be removed. - * @example - */ -CKEDITOR.remove = function( editor ) -{ - delete CKEDITOR.instances[ editor.name ]; -}; - -/** - * Perform global clean up to free as much memory as possible - * when there are no instances left - */ -CKEDITOR.on( 'instanceDestroyed', function () - { - if ( CKEDITOR.tools.isEmpty( this.instances ) ) - CKEDITOR.fire( 'reset' ); - }); - -// Load the bootstrap script. -CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine - -// Tri-state constants. - -/** - * Used to indicate the ON or ACTIVE state. - * @constant - * @example - */ -CKEDITOR.TRISTATE_ON = 1; - -/** - * Used to indicate the OFF or NON ACTIVE state. - * @constant - * @example - */ -CKEDITOR.TRISTATE_OFF = 2; - -/** - * Used to indicate DISABLED state. - * @constant - * @example - */ -CKEDITOR.TRISTATE_DISABLED = 0; - -/** - * The editor which is currently active (have user focus). - * @name CKEDITOR.currentInstance - * @type CKEDITOR.editor - * @see CKEDITOR#currentInstance - * @example - * function showCurrentEditorName() - * { - * if ( CKEDITOR.currentInstance ) - * alert( CKEDITOR.currentInstance.name ); - * else - * alert( 'Please focus an editor first.' ); - * } - */ - -/** - * Fired when the CKEDITOR.currentInstance object reference changes. This may - * happen when setting the focus on different editor instances in the page. - * @name CKEDITOR#currentInstance - * @event - * var editor; // Variable to hold a reference to the current editor. - * CKEDITOR.on( 'currentInstance' , function( e ) - * { - * editor = CKEDITOR.currentInstance; - * }); - */ - -/** - * Fired when the last instance has been destroyed. This event is used to perform - * global memory clean up. - * @name CKEDITOR#reset - * @event - */ diff --git a/_source/core/ckeditor_base.js b/_source/core/ckeditor_base.js deleted file mode 100644 index fdb4c0d..0000000 --- a/_source/core/ckeditor_base.js +++ /dev/null @@ -1,235 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Contains the first and essential part of the {@link CKEDITOR} - * object definition. - */ - -// #### Compressed Code -// 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.6.6',revision:'7689',rnd:Math.floor(Math.random()*900)+100,_:{},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. - -/* @Packager.RemoveLine -// Avoid having the editor code initialized twice. (#7588) -// Use CKEDITOR.dom to check whether the full ckeditor.js code has been loaded -// or just ckeditor_basic.js. -// Remove these lines when compressing manually. -if ( window.CKEDITOR && window.CKEDITOR.dom ) - return; -@Packager.RemoveLine */ - -if ( !window.CKEDITOR ) -{ - /** - * @name CKEDITOR - * @namespace This is the API entry point. The entire CKEditor code runs under this object. - * @example - */ - window.CKEDITOR = (function() - { - var CKEDITOR = - /** @lends CKEDITOR */ - { - - /** - * A constant string unique for each release of CKEditor. Its value - * is used, by default, to build the URL for all resources loaded - * by the editor code, guaranteeing clean cache results when - * upgrading. - * @type String - * @example - * alert( CKEDITOR.timestamp ); // e.g. '87dm' - */ - // The production implementation contains a fixed timestamp, unique - // for each release and generated by the releaser. - // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) - timestamp : 'D03G5XL', - - /** - * Contains the CKEditor version number. - * @type String - * @example - * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.4.1' - */ - version : '3.6.6', - - /** - * Contains the CKEditor revision number. - * The revision number is incremented automatically, following each - * modification to the CKEditor source code. - * @type String - * @example - * alert( CKEDITOR.revision ); // e.g. '3975' - */ - revision : '7689', - - /** - * A 3-digit random integer, valid for the entire life of the CKEDITOR object. - * @type Number - * @example - * alert( CKEDITOR.rnd ); // e.g. '319' - */ - rnd : Math.floor( Math.random() * ( 999/*Max*/ - 100/*Min*/ + 1 ) ) + 100/*Min*/, - - /** - * Private object used to hold core stuff. It should not be used outside of - * the API code as properties defined here may change at any time - * without notice. - * @private - */ - _ : {}, - - /** - * Indicates the API loading status. The following statuses are available: - *
    - *
  • unloaded: the API is not yet loaded.
  • - *
  • basic_loaded: the basic API features are available.
  • - *
  • basic_ready: the basic API is ready to load the full core code.
  • - *
  • loading: the full API is being loaded.
  • - *
  • loaded: the API can be fully used.
  • - *
- * @type String - * @example - * if ( CKEDITOR.status == 'loaded' ) - * { - * // The API can now be fully used. - * } - */ - status : 'unloaded', - - /** - * Contains the full URL for the CKEditor installation directory. - * It is possible to manually provide the base path by setting a - * global variable named CKEDITOR_BASEPATH. This global variable - * must be set before the editor script loading. - * @type String - * @example - * alert( CKEDITOR.basePath ); // "http://www.example.com/ckeditor/" (e.g.) - */ - basePath : (function() - { - // ATTENTION: fixes to this code must be ported to - // var basePath in "core/loader.js". - - // Find out the editor directory path, based on its ")' ); - } - } - - return $ && new CKEDITOR.dom.document( $.contentWindow.document ); - }, - - /** - * Copy all the attributes from one node to the other, kinda like a clone - * skipAttributes is an object with the attributes that must NOT be copied. - * @param {CKEDITOR.dom.element} dest The destination element. - * @param {Object} skipAttributes A dictionary of attributes to skip. - * @example - */ - copyAttributes : function( dest, skipAttributes ) - { - var attributes = this.$.attributes; - skipAttributes = skipAttributes || {}; - - for ( var n = 0 ; n < attributes.length ; n++ ) - { - var attribute = attributes[n]; - - // Lowercase attribute name hard rule is broken for - // some attribute on IE, e.g. CHECKED. - var attrName = attribute.nodeName.toLowerCase(), - attrValue; - - // We can set the type only once, so do it with the proper value, not copying it. - if ( attrName in skipAttributes ) - continue; - - if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) - dest.setAttribute( attrName, attrValue ); - // IE BUG: value attribute is never specified even if it exists. - else if ( attribute.specified || - ( CKEDITOR.env.ie && attribute.nodeValue && attrName == 'value' ) ) - { - attrValue = this.getAttribute( attrName ); - if ( attrValue === null ) - attrValue = attribute.nodeValue; - - dest.setAttribute( attrName, attrValue ); - } - } - - // The style: - if ( this.$.style.cssText !== '' ) - dest.$.style.cssText = this.$.style.cssText; - }, - - /** - * Changes the tag name of the current element. - * @param {String} newTag The new tag for the element. - */ - renameNode : function( newTag ) - { - // If it's already correct exit here. - if ( this.getName() == newTag ) - return; - - var doc = this.getDocument(); - - // Create the new node. - var newNode = new CKEDITOR.dom.element( newTag, doc ); - - // Copy all attributes. - this.copyAttributes( newNode ); - - // Move children to the new node. - this.moveChildren( newNode ); - - // Replace the node. - this.getParent() && this.$.parentNode.replaceChild( newNode.$, this.$ ); - newNode.$[ 'data-cke-expando' ] = this.$[ 'data-cke-expando' ]; - this.$ = newNode.$; - }, - - /** - * Gets a DOM tree descendant under the current node. - * @param {Array|Number} indices The child index or array of child indices under the node. - * @returns {CKEDITOR.dom.node} The specified DOM child under the current node. Null if child does not exist. - * @example - * var strong = p.getChild(0); - */ - getChild : function( indices ) - { - var rawNode = this.$; - - if ( !indices.slice ) - rawNode = rawNode.childNodes[ indices ]; - else - { - while ( indices.length > 0 && rawNode ) - rawNode = rawNode.childNodes[ indices.shift() ]; - } - - return rawNode ? new CKEDITOR.dom.node( rawNode ) : null; - }, - - getChildCount : function() - { - return this.$.childNodes.length; - }, - - disableContextMenu : function() - { - this.on( 'contextmenu', function( event ) - { - // Cancel the browser context menu. - if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) ) - event.data.preventDefault(); - } ); - }, - - /** - * Gets element's direction. Supports both CSS 'direction' prop and 'dir' attr. - */ - getDirection : function( useComputed ) - { - return useComputed ? - this.getComputedStyle( 'direction' ) - // Webkit: offline element returns empty direction (#8053). - || this.getDirection() - || this.getDocument().$.dir - || this.getDocument().getBody().getDirection( 1 ) - : this.getStyle( 'direction' ) || this.getAttribute( 'dir' ); - }, - - /** - * Gets, sets and removes custom data to be stored as HTML5 data-* attributes. - * @param {String} name The name of the attribute, excluding the 'data-' part. - * @param {String} [value] The value to set. If set to false, the attribute will be removed. - * @example - * element.data( 'extra-info', 'test' ); // appended the attribute data-extra-info="test" to the element - * alert( element.data( 'extra-info' ) ); // "test" - * element.data( 'extra-info', false ); // remove the data-extra-info attribute from the element - */ - data : function ( name, value ) - { - name = 'data-' + name; - if ( value === undefined ) - return this.getAttribute( name ); - else if ( value === false ) - this.removeAttribute( name ); - else - this.setAttribute( name, value ); - - return null; - } - }); - - var sides = { - width : [ "border-left-width", "border-right-width","padding-left", "padding-right" ], - height : [ "border-top-width", "border-bottom-width", "padding-top", "padding-bottom" ] - }; - - // Generate list of specific style rules, applicable to margin/padding/border. - function expandedRules( style ) - { - var sides = [ 'top', 'left', 'right', 'bottom' ], components; - - if ( style == 'border' ) - components = [ 'color', 'style', 'width' ]; - - var styles = []; - for ( var i = 0 ; i < sides.length ; i++ ) - { - - if ( components ) - { - for ( var j = 0 ; j < components.length ; j++ ) - styles.push( [ style, sides[ i ], components[j] ].join( '-' ) ); - } - else - styles.push( [ style, sides[ i ] ].join( '-' ) ); - } - - return styles; - } - - function marginAndPaddingSize( type ) - { - var adjustment = 0; - for ( var i = 0, len = sides[ type ].length; i < len; i++ ) - adjustment += parseInt( this.getComputedStyle( sides [ type ][ i ] ) || 0, 10 ) || 0; - return adjustment; - } - - /** - * Sets the element size considering the box model. - * @name CKEDITOR.dom.element.prototype.setSize - * @function - * @param {String} type The dimension to set. It accepts "width" and "height". - * @param {Number} size The length unit in px. - * @param {Boolean} isBorderBox Apply the size based on the border box model. - */ - CKEDITOR.dom.element.prototype.setSize = function( type, size, isBorderBox ) - { - if ( typeof size == 'number' ) - { - if ( isBorderBox && !( CKEDITOR.env.ie && CKEDITOR.env.quirks ) ) - size -= marginAndPaddingSize.call( this, type ); - - this.setStyle( type, size + 'px' ); - } - }; - - /** - * Gets the element size, possibly considering the box model. - * @name CKEDITOR.dom.element.prototype.getSize - * @function - * @param {String} type The dimension to get. It accepts "width" and "height". - * @param {Boolean} isBorderBox Get the size based on the border box model. - */ - CKEDITOR.dom.element.prototype.getSize = function( type, isBorderBox ) - { - var size = Math.max( this.$[ 'offset' + CKEDITOR.tools.capitalize( type ) ], - this.$[ 'client' + CKEDITOR.tools.capitalize( type ) ] ) || 0; - - if ( isBorderBox ) - size -= marginAndPaddingSize.call( this, type ); - - return size; - }; -})(); diff --git a/_source/core/dom/elementpath.js b/_source/core/dom/elementpath.js deleted file mode 100644 index a11d7e3..0000000 --- a/_source/core/dom/elementpath.js +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - // Elements that may be considered the "Block boundary" in an element path. - var pathBlockElements = { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1, legend:1,caption:1 }; - - // Elements that may be considered the "Block limit" in an element path. - var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1 }; - - // Check if an element contains any block element. - var checkHasBlock = function( element ) - { - var childNodes = element.getChildren(); - - for ( var i = 0, count = childNodes.count() ; i < count ; i++ ) - { - var child = childNodes.getItem( i ); - - if ( child.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[ child.getName() ] ) - return true; - } - - return false; - }; - - /** - * @class - */ - CKEDITOR.dom.elementPath = function( lastNode ) - { - var block = null; - var blockLimit = null; - var elements = []; - - var e = lastNode; - - while ( e ) - { - if ( e.type == CKEDITOR.NODE_ELEMENT ) - { - if ( !this.lastElement ) - this.lastElement = e; - - var elementName = e.getName(); - - if ( !blockLimit ) - { - if ( !block && pathBlockElements[ elementName ] ) - block = e; - - if ( pathBlockLimitElements[ elementName ] ) - { - // DIV is considered the Block, if no block is available (#525) - // and if it doesn't contain other blocks. - if ( !block && elementName == 'div' && !checkHasBlock( e ) ) - block = e; - else - blockLimit = e; - } - } - - elements.push( e ); - - if ( elementName == 'body' ) - break; - } - e = e.getParent(); - } - - this.block = block; - this.blockLimit = blockLimit; - this.elements = elements; - }; -})(); - -CKEDITOR.dom.elementPath.prototype = -{ - /** - * Compares this element path with another one. - * @param {CKEDITOR.dom.elementPath} otherPath The elementPath object to be - * compared with this one. - * @returns {Boolean} "true" if the paths are equal, containing the same - * number of elements and the same elements in the same order. - */ - compare : function( otherPath ) - { - var thisElements = this.elements; - var otherElements = otherPath && otherPath.elements; - - if ( !otherElements || thisElements.length != otherElements.length ) - return false; - - for ( var i = 0 ; i < thisElements.length ; i++ ) - { - if ( !thisElements[ i ].equals( otherElements[ i ] ) ) - return false; - } - - 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/dom/event.js b/_source/core/dom/event.js deleted file mode 100644 index 273a5cf..0000000 --- a/_source/core/dom/event.js +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.dom.event} class, which - * represents the a native DOM event object. - */ - -/** - * Represents a native DOM event object. - * @constructor - * @param {Object} domEvent A native DOM event object. - * @example - */ -CKEDITOR.dom.event = function( domEvent ) -{ - /** - * The native DOM event object represented by this class instance. - * @type Object - * @example - */ - this.$ = domEvent; -}; - -CKEDITOR.dom.event.prototype = -{ - /** - * Gets the key code associated to the event. - * @returns {Number} The key code. - * @example - * alert( event.getKey() ); "65" is "a" has been pressed - */ - getKey : function() - { - return this.$.keyCode || this.$.which; - }, - - /** - * Gets a number represeting the combination of the keys pressed during the - * event. It is the sum with the current key code and the {@link CKEDITOR.CTRL}, - * {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT} constants. - * @returns {Number} The number representing the keys combination. - * @example - * alert( event.getKeystroke() == 65 ); // "a" key - * alert( event.getKeystroke() == CKEDITOR.CTRL + 65 ); // CTRL + "a" key - * alert( event.getKeystroke() == CKEDITOR.CTRL + CKEDITOR.SHIFT + 65 ); // CTRL + SHIFT + "a" key - */ - getKeystroke : function() - { - var keystroke = this.getKey(); - - if ( this.$.ctrlKey || this.$.metaKey ) - keystroke += CKEDITOR.CTRL; - - if ( this.$.shiftKey ) - keystroke += CKEDITOR.SHIFT; - - if ( this.$.altKey ) - keystroke += CKEDITOR.ALT; - - return keystroke; - }, - - /** - * Prevents the original behavior of the event to happen. It can optionally - * stop propagating the event in the event chain. - * @param {Boolean} [stopPropagation] Stop propagating this event in the - * event chain. - * @example - * var element = CKEDITOR.document.getById( 'myElement' ); - * element.on( 'click', function( ev ) - * { - * // The DOM event object is passed by the "data" property. - * var domEvent = ev.data; - * // Prevent the click to chave any effect in the element. - * domEvent.preventDefault(); - * }); - */ - preventDefault : function( stopPropagation ) - { - var $ = this.$; - if ( $.preventDefault ) - $.preventDefault(); - else - $.returnValue = false; - - if ( stopPropagation ) - this.stopPropagation(); - }, - - stopPropagation : function() - { - var $ = this.$; - if ( $.stopPropagation ) - $.stopPropagation(); - else - $.cancelBubble = true; - }, - - /** - * Returns the DOM node where the event was targeted to. - * @returns {CKEDITOR.dom.node} The target DOM node. - * @example - * var element = CKEDITOR.document.getById( 'myElement' ); - * element.on( 'click', function( ev ) - * { - * // The DOM event object is passed by the "data" property. - * var domEvent = ev.data; - * // Add a CSS class to the event target. - * domEvent.getTarget().addClass( 'clicked' ); - * }); - */ - - getTarget : function() - { - var rawNode = this.$.target || this.$.srcElement; - return rawNode ? new CKEDITOR.dom.node( rawNode ) : null; - }, - - /** - * Retrieves the coordinates of the mouse pointer relative to the top-left - * corner of the document, in mouse related event. - * @returns {Object} The object contains the position. - * @example - * element.on( 'mousemouse', function( ev ) - * { - * var pageOffset = ev.data.getPageOffset(); - * alert( pageOffset.x ); // page offset X - * alert( pageOffset.y ); // page offset Y - * }); - */ - getPageOffset : function() - { - var doc = this.getTarget().getDocument().$; - var pageX = this.$.pageX || this.$.clientX + ( doc.documentElement.scrollLeft || doc.body.scrollLeft ); - var pageY = this.$.pageY || this.$.clientY + ( doc.documentElement.scrollTop || doc.body.scrollTop ); - return { x : pageX, y : pageY }; - } -}; - -// For the followind constants, we need to go over the Unicode boundaries -// (0x10FFFF) to avoid collision. - -/** - * CTRL key (0x110000). - * @constant - * @example - */ -CKEDITOR.CTRL = 0x110000; - -/** - * SHIFT key (0x220000). - * @constant - * @example - */ -CKEDITOR.SHIFT = 0x220000; - -/** - * ALT key (0x440000). - * @constant - * @example - */ -CKEDITOR.ALT = 0x440000; diff --git a/_source/core/dom/node.js b/_source/core/dom/node.js deleted file mode 100644 index 07bdbfc..0000000 --- a/_source/core/dom/node.js +++ /dev/null @@ -1,692 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.dom.node} class which is the base - * class for classes that represent DOM nodes. - */ - -/** - * Base class for classes representing DOM nodes. This constructor may return - * an instance of a class that inherits from this class, like - * {@link CKEDITOR.dom.element} or {@link CKEDITOR.dom.text}. - * @augments CKEDITOR.dom.domObject - * @param {Object} domNode A native DOM node. - * @constructor - * @see CKEDITOR.dom.element - * @see CKEDITOR.dom.text - * @example - */ -CKEDITOR.dom.node = function( domNode ) -{ - if ( domNode ) - { - var type = domNode.nodeType == CKEDITOR.NODE_DOCUMENT ? 'document' - : domNode.nodeType == CKEDITOR.NODE_ELEMENT ? 'element' - : domNode.nodeType == CKEDITOR.NODE_TEXT ? 'text' - : domNode.nodeType == CKEDITOR.NODE_COMMENT ? 'comment' - : 'domObject'; // Call the base constructor otherwise. - - return new CKEDITOR.dom[ type ]( domNode ); - } - - return this; -}; - -CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject(); - -/** - * Element node type. - * @constant - * @example - */ -CKEDITOR.NODE_ELEMENT = 1; - -/** - * Document node type. - * @constant - * @example - */ -CKEDITOR.NODE_DOCUMENT = 9; - -/** - * Text node type. - * @constant - * @example - */ -CKEDITOR.NODE_TEXT = 3; - -/** - * Comment node type. - * @constant - * @example - */ -CKEDITOR.NODE_COMMENT = 8; - -CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11; - -CKEDITOR.POSITION_IDENTICAL = 0; -CKEDITOR.POSITION_DISCONNECTED = 1; -CKEDITOR.POSITION_FOLLOWING = 2; -CKEDITOR.POSITION_PRECEDING = 4; -CKEDITOR.POSITION_IS_CONTAINED = 8; -CKEDITOR.POSITION_CONTAINS = 16; - -CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, - /** @lends CKEDITOR.dom.node.prototype */ - { - /** - * Makes this node a child of another element. - * @param {CKEDITOR.dom.element} element The target element to which - * this node will be appended. - * @returns {CKEDITOR.dom.element} The target element. - * @example - * var p = new CKEDITOR.dom.element( 'p' ); - * var strong = new CKEDITOR.dom.element( 'strong' ); - * strong.appendTo( p ); - * - * // result: "<p><strong></strong></p>" - */ - appendTo : function( element, toStart ) - { - element.append( this, toStart ); - return element; - }, - - clone : function( includeChildren, cloneId ) - { - var $clone = this.$.cloneNode( includeChildren ); - - var removeIds = function( node ) - { - if ( node.nodeType != CKEDITOR.NODE_ELEMENT ) - return; - - if ( !cloneId ) - node.removeAttribute( 'id', false ); - - node[ 'data-cke-expando' ] = undefined; - - if ( includeChildren ) - { - var childs = node.childNodes; - for ( var i=0; i < childs.length; i++ ) - removeIds( childs[ i ] ); - } - }; - - // The "id" attribute should never be cloned to avoid duplication. - removeIds( $clone ); - - return new CKEDITOR.dom.node( $clone ); - }, - - hasPrevious : function() - { - return !!this.$.previousSibling; - }, - - hasNext : function() - { - return !!this.$.nextSibling; - }, - - /** - * Inserts this element after a node. - * @param {CKEDITOR.dom.node} node The node that will precede this element. - * @returns {CKEDITOR.dom.node} The node preceding this one after - * insertion. - * @example - * var em = new CKEDITOR.dom.element( 'em' ); - * var strong = new CKEDITOR.dom.element( 'strong' ); - * strong.insertAfter( em ); - * - * // result: "<em></em><strong></strong>" - */ - insertAfter : function( node ) - { - node.$.parentNode.insertBefore( this.$, node.$.nextSibling ); - return node; - }, - - /** - * Inserts this element before a node. - * @param {CKEDITOR.dom.node} node The node that will succeed this element. - * @returns {CKEDITOR.dom.node} The node being inserted. - * @example - * var em = new CKEDITOR.dom.element( 'em' ); - * var strong = new CKEDITOR.dom.element( 'strong' ); - * strong.insertBefore( em ); - * - * // result: "<strong></strong><em></em>" - */ - insertBefore : function( node ) - { - node.$.parentNode.insertBefore( this.$, node.$ ); - return node; - }, - - insertBeforeMe : function( node ) - { - this.$.parentNode.insertBefore( node.$, this.$ ); - return node; - }, - - /** - * Retrieves a uniquely identifiable tree address for this node. - * The tree address returned is an array of integers, with each integer - * indicating a child index of a DOM node, starting from - * document.documentElement. - * - * For example, assuming <body> is the second child - * of <html> (<head> being the first), - * and we would like to address the third child under the - * fourth child of <body>, the tree address returned would be: - * [1, 3, 2] - * - * The tree address cannot be used for finding back the DOM tree node once - * the DOM tree structure has been modified. - */ - getAddress : function( normalized ) - { - var address = []; - var $documentElement = this.getDocument().$.documentElement; - var node = this.$; - - while ( node && node != $documentElement ) - { - var parentNode = node.parentNode; - - if ( parentNode ) - { - // Get the node index. For performance, call getIndex - // directly, instead of creating a new node object. - address.unshift( this.getIndex.call( { $ : node }, normalized ) ); - } - - node = parentNode; - } - - return address; - }, - - /** - * Gets the document containing this element. - * @returns {CKEDITOR.dom.document} The document. - * @example - * var element = CKEDITOR.document.getById( 'example' ); - * alert( element.getDocument().equals( CKEDITOR.document ) ); // "true" - */ - getDocument : function() - { - return new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument ); - }, - - getIndex : function( normalized ) - { - // Attention: getAddress depends on this.$ - - var current = this.$, - index = 0; - - while ( ( current = current.previousSibling ) ) - { - // When normalizing, do not count it if this is an - // empty text node or if it's a text node following another one. - if ( normalized && current.nodeType == 3 && - ( !current.nodeValue.length || - ( current.previousSibling && current.previousSibling.nodeType == 3 ) ) ) - { - continue; - } - - index++; - } - - return index; - }, - - getNextSourceNode : function( startFromSibling, nodeType, guard ) - { - // If "guard" is a node, transform it in a function. - if ( guard && !guard.call ) - { - var guardNode = guard; - guard = function( node ) - { - return !node.equals( guardNode ); - }; - } - - var node = ( !startFromSibling && this.getFirst && this.getFirst() ), - parent; - - // Guarding when we're skipping the current element( no children or 'startFromSibling' ). - // send the 'moving out' signal even we don't actually dive into. - if ( !node ) - { - if ( this.type == CKEDITOR.NODE_ELEMENT && guard && guard( this, true ) === false ) - return null; - node = this.getNext(); - } - - while ( !node && ( parent = ( parent || this ).getParent() ) ) - { - // The guard check sends the "true" paramenter to indicate that - // we are moving "out" of the element. - if ( guard && guard( parent, true ) === false ) - return null; - - node = parent.getNext(); - } - - if ( !node ) - return null; - - if ( guard && guard( node ) === false ) - return null; - - if ( nodeType && nodeType != node.type ) - return node.getNextSourceNode( false, nodeType, guard ); - - return node; - }, - - getPreviousSourceNode : function( startFromSibling, nodeType, guard ) - { - if ( guard && !guard.call ) - { - var guardNode = guard; - guard = function( node ) - { - return !node.equals( guardNode ); - }; - } - - var node = ( !startFromSibling && this.getLast && this.getLast() ), - parent; - - // Guarding when we're skipping the current element( no children or 'startFromSibling' ). - // send the 'moving out' signal even we don't actually dive into. - if ( !node ) - { - if ( this.type == CKEDITOR.NODE_ELEMENT && guard && guard( this, true ) === false ) - return null; - node = this.getPrevious(); - } - - while ( !node && ( parent = ( parent || this ).getParent() ) ) - { - // The guard check sends the "true" paramenter to indicate that - // we are moving "out" of the element. - if ( guard && guard( parent, true ) === false ) - return null; - - node = parent.getPrevious(); - } - - if ( !node ) - return null; - - if ( guard && guard( node ) === false ) - return null; - - if ( nodeType && node.type != nodeType ) - return node.getPreviousSourceNode( false, nodeType, guard ); - - return node; - }, - - getPrevious : function( evaluator ) - { - var previous = this.$, retval; - do - { - previous = previous.previousSibling; - - // Avoid returning the doc type node. - // http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-412266927 - retval = previous && previous.nodeType != 10 && new CKEDITOR.dom.node( previous ); - } - while ( retval && evaluator && !evaluator( retval ) ) - return retval; - }, - - /** - * Gets the node that follows this element in its parent's child list. - * @param {Function} evaluator Filtering the result node. - * @returns {CKEDITOR.dom.node} The next node or null if not available. - * @example - * var element = CKEDITOR.dom.element.createFromHtml( '<div><b>Example</b> <i>next</i></div>' ); - * var first = element.getFirst().getNext(); - * alert( first.getName() ); // "i" - */ - getNext : function( evaluator ) - { - var next = this.$, retval; - do - { - next = next.nextSibling; - retval = next && new CKEDITOR.dom.node( next ); - } - while ( retval && evaluator && !evaluator( retval ) ) - return retval; - }, - - /** - * Gets the parent element for this node. - * @returns {CKEDITOR.dom.element} The parent element. - * @example - * var node = editor.document.getBody().getFirst(); - * var parent = node.getParent(); - * alert( node.getName() ); // "body" - */ - getParent : function() - { - var parent = this.$.parentNode; - return ( parent && parent.nodeType == 1 ) ? new CKEDITOR.dom.node( parent ) : null; - }, - - getParents : function( closerFirst ) - { - var node = this; - var parents = []; - - do - { - parents[ closerFirst ? 'push' : 'unshift' ]( node ); - } - while ( ( node = node.getParent() ) ) - - return parents; - }, - - getCommonAncestor : function( node ) - { - if ( node.equals( this ) ) - return this; - - if ( node.contains && node.contains( this ) ) - return node; - - var start = this.contains ? this : this.getParent(); - - do - { - if ( start.contains( node ) ) - return start; - } - while ( ( start = start.getParent() ) ); - - return null; - }, - - getPosition : function( otherNode ) - { - var $ = this.$; - var $other = otherNode.$; - - if ( $.compareDocumentPosition ) - return $.compareDocumentPosition( $other ); - - // IE and Safari have no support for compareDocumentPosition. - - if ( $ == $other ) - return CKEDITOR.POSITION_IDENTICAL; - - // Only element nodes support contains and sourceIndex. - if ( this.type == CKEDITOR.NODE_ELEMENT && otherNode.type == CKEDITOR.NODE_ELEMENT ) - { - if ( $.contains ) - { - if ( $.contains( $other ) ) - return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING; - - if ( $other.contains( $ ) ) - return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING; - } - - if ( 'sourceIndex' in $ ) - { - return ( $.sourceIndex < 0 || $other.sourceIndex < 0 ) ? CKEDITOR.POSITION_DISCONNECTED : - ( $.sourceIndex < $other.sourceIndex ) ? CKEDITOR.POSITION_PRECEDING : - CKEDITOR.POSITION_FOLLOWING; - } - } - - // For nodes that don't support compareDocumentPosition, contains - // or sourceIndex, their "address" is compared. - - var addressOfThis = this.getAddress(), - addressOfOther = otherNode.getAddress(), - minLevel = Math.min( addressOfThis.length, addressOfOther.length ); - - // Determinate preceed/follow relationship. - for ( var i = 0 ; i <= minLevel - 1 ; i++ ) - { - if ( addressOfThis[ i ] != addressOfOther[ i ] ) - { - if ( i < minLevel ) - { - return addressOfThis[ i ] < addressOfOther[ i ] ? - CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; - } - break; - } - } - - // Determinate contains/contained relationship. - return ( addressOfThis.length < addressOfOther.length ) ? - CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : - CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING; - }, - - /** - * Gets the closest ancestor node of this node, specified by its name. - * @param {String} reference The name of the ancestor node to search or - * an object with the node names to search for. - * @param {Boolean} [includeSelf] Whether to include the current - * node in the search. - * @returns {CKEDITOR.dom.node} The located ancestor node or null if not found. - * @since 3.6.1 - * @example - * // Suppose we have the following HTML structure: - * // <div id="outer"><div id="inner"><p><b>Some text</b></p></div></div> - * // If node == <b> - * ascendant = node.getAscendant( 'div' ); // ascendant == <div id="inner"> - * ascendant = node.getAscendant( 'b' ); // ascendant == null - * ascendant = node.getAscendant( 'b', true ); // ascendant == <b> - * ascendant = node.getAscendant( { div: 1, p: 1} ); // Searches for the first 'div' or 'p': ascendant == <div id="inner"> - */ - getAscendant : function( reference, includeSelf ) - { - var $ = this.$, - name; - - if ( !includeSelf ) - $ = $.parentNode; - - while ( $ ) - { - if ( $.nodeName && ( name = $.nodeName.toLowerCase(), ( typeof reference == 'string' ? name == reference : name in reference ) ) ) - return new CKEDITOR.dom.node( $ ); - - $ = $.parentNode; - } - return null; - }, - - hasAscendant : function( name, includeSelf ) - { - var $ = this.$; - - if ( !includeSelf ) - $ = $.parentNode; - - while ( $ ) - { - if ( $.nodeName && $.nodeName.toLowerCase() == name ) - return true; - - $ = $.parentNode; - } - return false; - }, - - move : function( target, toStart ) - { - target.append( this.remove(), toStart ); - }, - - /** - * Removes this node from the document DOM. - * @param {Boolean} [preserveChildren] Indicates that the children - * elements must remain in the document, removing only the outer - * tags. - * @example - * var element = CKEDITOR.dom.element.getById( 'MyElement' ); - * element.remove(); - */ - remove : function( preserveChildren ) - { - var $ = this.$; - var parent = $.parentNode; - - if ( parent ) - { - if ( preserveChildren ) - { - // Move all children before the node. - for ( var child ; ( child = $.firstChild ) ; ) - { - parent.insertBefore( $.removeChild( child ), $ ); - } - } - - parent.removeChild( $ ); - } - - return this; - }, - - replace : function( nodeToReplace ) - { - this.insertBefore( nodeToReplace ); - nodeToReplace.remove(); - }, - - trim : function() - { - this.ltrim(); - this.rtrim(); - }, - - ltrim : function() - { - var child; - while ( this.getFirst && ( child = this.getFirst() ) ) - { - if ( child.type == CKEDITOR.NODE_TEXT ) - { - var trimmed = CKEDITOR.tools.ltrim( child.getText() ), - originalLength = child.getLength(); - - if ( !trimmed ) - { - child.remove(); - continue; - } - else if ( trimmed.length < originalLength ) - { - child.split( originalLength - trimmed.length ); - - // IE BUG: child.remove() may raise JavaScript errors here. (#81) - this.$.removeChild( this.$.firstChild ); - } - } - break; - } - }, - - rtrim : function() - { - var child; - while ( this.getLast && ( child = this.getLast() ) ) - { - if ( child.type == CKEDITOR.NODE_TEXT ) - { - var trimmed = CKEDITOR.tools.rtrim( child.getText() ), - originalLength = child.getLength(); - - if ( !trimmed ) - { - child.remove(); - continue; - } - else if ( trimmed.length < originalLength ) - { - child.split( trimmed.length ); - - // IE BUG: child.getNext().remove() may raise JavaScript errors here. - // (#81) - this.$.lastChild.parentNode.removeChild( this.$.lastChild ); - } - } - break; - } - - if ( !CKEDITOR.env.ie && !CKEDITOR.env.opera ) - { - child = this.$.lastChild; - - if ( child && child.type == 1 && child.nodeName.toLowerCase() == 'br' ) - { - // Use "eChildNode.parentNode" instead of "node" to avoid IE bug (#324). - child.parentNode.removeChild( child ) ; - } - } - }, - - /** - * Checks if this node is read-only (should not be changed). - * @returns {Boolean} - * @since 3.5 - * @example - * // For the following HTML: - * // <div contenteditable="false">Some <b>text</b></div> - * - * // If "ele" is the above <div> - * ele.isReadOnly(); // true - */ - isReadOnly : function() - { - var element = this; - if ( this.type != CKEDITOR.NODE_ELEMENT ) - element = this.getParent(); - - if ( element && typeof element.$.isContentEditable != 'undefined' ) - return ! ( element.$.isContentEditable || element.data( 'cke-editable' ) ); - else - { - // Degrade for old browsers which don't support "isContentEditable", e.g. FF3 - var current = element; - while( current ) - { - if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) ) - break; - - if ( current.getAttribute( 'contentEditable' ) == 'false' ) - return true; - else if ( current.getAttribute( 'contentEditable' ) == 'true' ) - break; - - current = current.getParent(); - } - - return false; - } - } - } -); diff --git a/_source/core/dom/nodelist.js b/_source/core/dom/nodelist.js deleted file mode 100644 index b8d59a5..0000000 --- a/_source/core/dom/nodelist.js +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @class - */ -CKEDITOR.dom.nodeList = function( nativeList ) -{ - this.$ = nativeList; -}; - -CKEDITOR.dom.nodeList.prototype = -{ - count : function() - { - return this.$.length; - }, - - getItem : function( index ) - { - var $node = this.$[ index ]; - return $node ? new CKEDITOR.dom.node( $node ) : null; - } -}; diff --git a/_source/core/dom/range.js b/_source/core/dom/range.js deleted file mode 100644 index fbbbe35..0000000 --- a/_source/core/dom/range.js +++ /dev/null @@ -1,2118 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * Creates a CKEDITOR.dom.range instance that can be used inside a specific - * DOM Document. - * @class Represents a delimited piece of content in a DOM Document. - * It is contiguous in the sense that it can be characterized as selecting all - * of the content between a pair of boundary-points.
- *
- * This class shares much of the W3C - * Document Object Model Range - * ideas and features, adding several range manipulation tools to it, but it's - * not intended to be compatible with it. - * @param {CKEDITOR.dom.document} document The document into which the range - * features will be available. - * @example - * // Create a range for the entire contents of the editor document body. - * var range = new CKEDITOR.dom.range( editor.document ); - * range.selectNodeContents( editor.document.getBody() ); - * // Delete the contents. - * range.deleteContents(); - */ -CKEDITOR.dom.range = function( document ) -{ - /** - * Node within which the range begins. - * @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT} - * @example - * var range = new CKEDITOR.dom.range( editor.document ); - * range.selectNodeContents( editor.document.getBody() ); - * alert( range.startContainer.getName() ); // "body" - */ - this.startContainer = null; - - /** - * Offset within the starting node of the range. - * @type {Number} - * @example - * var range = new CKEDITOR.dom.range( editor.document ); - * range.selectNodeContents( editor.document.getBody() ); - * alert( range.startOffset ); // "0" - */ - this.startOffset = null; - - /** - * Node within which the range ends. - * @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT} - * @example - * var range = new CKEDITOR.dom.range( editor.document ); - * range.selectNodeContents( editor.document.getBody() ); - * alert( range.endContainer.getName() ); // "body" - */ - this.endContainer = null; - - /** - * Offset within the ending node of the range. - * @type {Number} - * @example - * var range = new CKEDITOR.dom.range( editor.document ); - * range.selectNodeContents( editor.document.getBody() ); - * alert( range.endOffset ); // == editor.document.getBody().getChildCount() - */ - this.endOffset = null; - - /** - * Indicates that this is a collapsed range. A collapsed range has it's - * start and end boudaries at the very same point so nothing is contained - * in it. - * @example - * var range = new CKEDITOR.dom.range( editor.document ); - * range.selectNodeContents( editor.document.getBody() ); - * alert( range.collapsed ); // "false" - * range.collapse(); - * alert( range.collapsed ); // "true" - */ - this.collapsed = true; - - /** - * The document within which the range can be used. - * @type {CKEDITOR.dom.document} - * @example - * // Selects the body contents of the range document. - * range.selectNodeContents( range.document.getBody() ); - */ - this.document = document; -}; - -(function() -{ - // Updates the "collapsed" property for the given range object. - var updateCollapsed = function( range ) - { - range.collapsed = ( - range.startContainer && - range.endContainer && - range.startContainer.equals( range.endContainer ) && - range.startOffset == range.endOffset ); - }; - - // This is a shared function used to delete, extract and clone the range - // contents. - // V2 - var execContentsAction = function( range, action, docFrag, mergeThen ) - { - range.optimizeBookmark(); - - var startNode = range.startContainer; - var endNode = range.endContainer; - - var startOffset = range.startOffset; - var endOffset = range.endOffset; - - var removeStartNode; - var removeEndNode; - - // For text containers, we must simply split the node and point to the - // second part. The removal will be handled by the rest of the code . - if ( endNode.type == CKEDITOR.NODE_TEXT ) - endNode = endNode.split( endOffset ); - else - { - // If the end container has children and the offset is pointing - // to a child, then we should start from it. - if ( endNode.getChildCount() > 0 ) - { - // If the offset points after the last node. - if ( endOffset >= endNode.getChildCount() ) - { - // Let's create a temporary node and mark it for removal. - endNode = endNode.append( range.document.createText( '' ) ); - removeEndNode = true; - } - else - endNode = endNode.getChild( endOffset ); - } - } - - // For text containers, we must simply split the node. The removal will - // be handled by the rest of the code . - if ( startNode.type == CKEDITOR.NODE_TEXT ) - { - startNode.split( startOffset ); - - // In cases the end node is the same as the start node, the above - // splitting will also split the end, so me must move the end to - // the second part of the split. - if ( startNode.equals( endNode ) ) - endNode = startNode.getNext(); - } - else - { - // If the start container has children and the offset is pointing - // to a child, then we should start from its previous sibling. - - // If the offset points to the first node, we don't have a - // sibling, so let's use the first one, but mark it for removal. - if ( !startOffset ) - { - // Let's create a temporary node and mark it for removal. - startNode = startNode.getFirst().insertBeforeMe( range.document.createText( '' ) ); - removeStartNode = true; - } - else if ( startOffset >= startNode.getChildCount() ) - { - // Let's create a temporary node and mark it for removal. - startNode = startNode.append( range.document.createText( '' ) ); - removeStartNode = true; - } - else - startNode = startNode.getChild( startOffset ).getPrevious(); - } - - // Get the parent nodes tree for the start and end boundaries. - var startParents = startNode.getParents(); - var endParents = endNode.getParents(); - - // Compare them, to find the top most siblings. - var i, topStart, topEnd; - - for ( i = 0 ; i < startParents.length ; i++ ) - { - topStart = startParents[ i ]; - topEnd = endParents[ i ]; - - // The compared nodes will match until we find the top most - // siblings (different nodes that have the same parent). - // "i" will hold the index in the parents array for the top - // most element. - if ( !topStart.equals( topEnd ) ) - break; - } - - var clone = docFrag, levelStartNode, levelClone, currentNode, currentSibling; - - // Remove all successive sibling nodes for every node in the - // startParents tree. - for ( var j = i ; j < startParents.length ; j++ ) - { - levelStartNode = startParents[j]; - - // For Extract and Clone, we must clone this level. - if ( clone && !levelStartNode.equals( startNode ) ) // action = 0 = Delete - levelClone = clone.append( levelStartNode.clone() ); - - currentNode = levelStartNode.getNext(); - - while ( currentNode ) - { - // Stop processing when the current node matches a node in the - // endParents tree or if it is the endNode. - if ( currentNode.equals( endParents[ j ] ) || currentNode.equals( endNode ) ) - break; - - // Cache the next sibling. - currentSibling = currentNode.getNext(); - - // If cloning, just clone it. - if ( action == 2 ) // 2 = Clone - clone.append( currentNode.clone( true ) ); - else - { - // Both Delete and Extract will remove the node. - currentNode.remove(); - - // When Extracting, move the removed node to the docFrag. - if ( action == 1 ) // 1 = Extract - clone.append( currentNode ); - } - - currentNode = currentSibling; - } - - if ( clone ) - clone = levelClone; - } - - clone = docFrag; - - // Remove all previous sibling nodes for every node in the - // endParents tree. - for ( var k = i ; k < endParents.length ; k++ ) - { - levelStartNode = endParents[ k ]; - - // For Extract and Clone, we must clone this level. - if ( action > 0 && !levelStartNode.equals( endNode ) ) // action = 0 = Delete - levelClone = clone.append( levelStartNode.clone() ); - - // The processing of siblings may have already been done by the parent. - if ( !startParents[ k ] || levelStartNode.$.parentNode != startParents[ k ].$.parentNode ) - { - currentNode = levelStartNode.getPrevious(); - - while ( currentNode ) - { - // Stop processing when the current node matches a node in the - // startParents tree or if it is the startNode. - if ( currentNode.equals( startParents[ k ] ) || currentNode.equals( startNode ) ) - break; - - // Cache the next sibling. - currentSibling = currentNode.getPrevious(); - - // If cloning, just clone it. - if ( action == 2 ) // 2 = Clone - clone.$.insertBefore( currentNode.$.cloneNode( true ), clone.$.firstChild ) ; - else - { - // Both Delete and Extract will remove the node. - currentNode.remove(); - - // When Extracting, mode the removed node to the docFrag. - if ( action == 1 ) // 1 = Extract - clone.$.insertBefore( currentNode.$, clone.$.firstChild ); - } - - currentNode = currentSibling; - } - } - - if ( clone ) - clone = levelClone; - } - - if ( action == 2 ) // 2 = Clone. - { - // No changes in the DOM should be done, so fix the split text (if any). - - var startTextNode = range.startContainer; - if ( startTextNode.type == CKEDITOR.NODE_TEXT ) - { - startTextNode.$.data += startTextNode.$.nextSibling.data; - startTextNode.$.parentNode.removeChild( startTextNode.$.nextSibling ); - } - - var endTextNode = range.endContainer; - if ( endTextNode.type == CKEDITOR.NODE_TEXT && endTextNode.$.nextSibling ) - { - endTextNode.$.data += endTextNode.$.nextSibling.data; - endTextNode.$.parentNode.removeChild( endTextNode.$.nextSibling ); - } - } - else - { - // Collapse the range. - - // If a node has been partially selected, collapse the range between - // topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs). - if ( topStart && topEnd && ( startNode.$.parentNode != topStart.$.parentNode || endNode.$.parentNode != topEnd.$.parentNode ) ) - { - var endIndex = topEnd.getIndex(); - - // If the start node is to be removed, we must correct the - // index to reflect the removal. - if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode ) - endIndex--; - - // Merge splitted parents. - if ( mergeThen && topStart.type == CKEDITOR.NODE_ELEMENT ) - { - var span = CKEDITOR.dom.element.createFromHtml( ' ', range.document ); - span.insertAfter( topStart ); - topStart.mergeSiblings( false ); - range.moveToBookmark( { startNode : span } ); - } - else - range.setStart( topEnd.getParent(), endIndex ); - } - - // Collapse it to the start. - range.collapse( true ); - } - - // Cleanup any marked node. - if ( removeStartNode ) - startNode.remove(); - - if ( removeEndNode && endNode.$.parentNode ) - endNode.remove(); - }; - - var inlineChildReqElements = { 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 }; - - // Creates the appropriate node evaluator for the dom walker used inside - // check(Start|End)OfBlock. - function getCheckStartEndBlockEvalFunction() - { - var skipBogus = false, - whitespaces = CKEDITOR.dom.walker.whitespaces(), - bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ), - isBogus = CKEDITOR.dom.walker.bogus(); - - return function( node ) - { - // First skip empty nodes. - if ( bookmarkEvaluator( node ) || whitespaces( node ) ) - return true; - - // Skip the bogus node at the end of block. - if ( isBogus( node ) && - !skipBogus ) - { - skipBogus = true; - return true; - } - - // If there's any visible text, then we're not at the start. - if ( node.type == CKEDITOR.NODE_TEXT && - ( node.hasAscendant( 'pre' ) || - CKEDITOR.tools.trim( node.getText() ).length ) ) - return false; - - // If there are non-empty inline elements (e.g. ), then we're not - // at the start. - if ( node.type == CKEDITOR.NODE_ELEMENT && !inlineChildReqElements[ node.getName() ] ) - return false; - - return true; - }; - } - - - var isBogus = CKEDITOR.dom.walker.bogus(); - // Evaluator for CKEDITOR.dom.element::checkBoundaryOfElement, reject any - // text node and non-empty elements unless it's being bookmark text. - function elementBoundaryEval( checkStart ) - { - var whitespaces = CKEDITOR.dom.walker.whitespaces(), - bookmark = CKEDITOR.dom.walker.bookmark( 1 ); - - return function( node ) - { - // First skip empty nodes. - if ( bookmark( node ) || whitespaces( node ) ) - return true; - - // Tolerant bogus br when checking at the end of block. - // Reject any text node unless it's being bookmark - // OR it's spaces. - // Reject any element unless it's being invisible empty. (#3883) - return !checkStart && isBogus( node ) || - node.type == CKEDITOR.NODE_ELEMENT && - node.getName() in CKEDITOR.dtd.$removeEmpty; - }; - } - - var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(), - bookmarkEval = new CKEDITOR.dom.walker.bookmark(), - nbspRegExp = /^[\t\r\n ]*(?: |\xa0)$/; - - function nonWhitespaceOrBookmarkEval( node ) - { - // Whitespaces and bookmark nodes are to be ignored. - return !whitespaceEval( node ) && !bookmarkEval( node ); - } - - CKEDITOR.dom.range.prototype = - { - clone : function() - { - var clone = new CKEDITOR.dom.range( this.document ); - - clone.startContainer = this.startContainer; - clone.startOffset = this.startOffset; - clone.endContainer = this.endContainer; - clone.endOffset = this.endOffset; - clone.collapsed = this.collapsed; - - return clone; - }, - - collapse : function( toStart ) - { - if ( toStart ) - { - this.endContainer = this.startContainer; - this.endOffset = this.startOffset; - } - else - { - this.startContainer = this.endContainer; - this.startOffset = this.endOffset; - } - - this.collapsed = true; - }, - - /** - * The content nodes of the range are cloned and added to a document fragment, which is returned. - * Note: Text selection may lost after invoking this method. (caused by text node splitting). - */ - cloneContents : function() - { - var docFrag = new CKEDITOR.dom.documentFragment( this.document ); - - if ( !this.collapsed ) - execContentsAction( this, 2, docFrag ); - - return docFrag; - }, - - /** - * Deletes the content nodes of the range permanently from the DOM tree. - * @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection. - */ - deleteContents : function( mergeThen ) - { - if ( this.collapsed ) - return; - - execContentsAction( this, 0, null, mergeThen ); - }, - - /** - * The content nodes of the range are cloned and added to a document fragment, - * meanwhile they're removed permanently from the DOM tree. - * @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection. - */ - extractContents : function( mergeThen ) - { - var docFrag = new CKEDITOR.dom.documentFragment( this.document ); - - if ( !this.collapsed ) - execContentsAction( this, 1, docFrag, mergeThen ); - - return docFrag; - }, - - /** - * Creates a bookmark object, which can be later used to restore the - * range by using the moveToBookmark function. - * This is an "intrusive" way to create a bookmark. It includes tags - * in the range boundaries. The advantage of it is that it is possible to - * handle DOM mutations when moving back to the bookmark. - * Attention: the inclusion of nodes in the DOM is a design choice and - * should not be changed as there are other points in the code that may be - * using those nodes to perform operations. See GetBookmarkNode. - * @param {Boolean} [serializable] Indicates that the bookmark nodes - * must contain ids, which can be used to restore the range even - * when these nodes suffer mutations (like a clonation or innerHTML - * change). - * @returns {Object} And object representing a bookmark. - */ - createBookmark : function( serializable ) - { - var startNode, endNode; - var baseId; - var clone; - var collapsed = this.collapsed; - - startNode = this.document.createElement( 'span' ); - startNode.data( 'cke-bookmark', 1 ); - startNode.setStyle( 'display', 'none' ); - - // For IE, it must have something inside, otherwise it may be - // removed during DOM operations. - startNode.setHtml( ' ' ); - - if ( serializable ) - { - baseId = 'cke_bm_' + CKEDITOR.tools.getNextNumber(); - startNode.setAttribute( 'id', baseId + ( collapsed ? 'C' : 'S' ) ); - } - - // If collapsed, the endNode will not be created. - if ( !collapsed ) - { - endNode = startNode.clone(); - endNode.setHtml( ' ' ); - - if ( serializable ) - endNode.setAttribute( 'id', baseId + 'E' ); - - clone = this.clone(); - clone.collapse(); - clone.insertNode( endNode ); - } - - clone = this.clone(); - clone.collapse( true ); - clone.insertNode( startNode ); - - // Update the range position. - if ( endNode ) - { - this.setStartAfter( startNode ); - this.setEndBefore( endNode ); - } - else - this.moveToPosition( startNode, CKEDITOR.POSITION_AFTER_END ); - - return { - startNode : serializable ? baseId + ( collapsed ? 'C' : 'S' ) : startNode, - endNode : serializable ? baseId + 'E' : endNode, - serializable : serializable, - collapsed : collapsed - }; - }, - - /** - * Creates a "non intrusive" and "mutation sensible" bookmark. This - * kind of bookmark should be used only when the DOM is supposed to - * remain stable after its creation. - * @param {Boolean} [normalized] Indicates that the bookmark must - * normalized. When normalized, the successive text nodes are - * considered a single node. To sucessful load a normalized - * bookmark, the DOM tree must be also normalized before calling - * moveToBookmark. - * @returns {Object} An object representing the bookmark. - */ - createBookmark2 : function( normalized ) - { - var startContainer = this.startContainer, - endContainer = this.endContainer; - - var startOffset = this.startOffset, - endOffset = this.endOffset; - - var collapsed = this.collapsed; - - var child, previous; - - // If there is no range then get out of here. - // It happens on initial load in Safari #962 and if the editor it's - // hidden also in Firefox - if ( !startContainer || !endContainer ) - return { start : 0, end : 0 }; - - if ( normalized ) - { - // Find out if the start is pointing to a text node that will - // be normalized. - if ( startContainer.type == CKEDITOR.NODE_ELEMENT ) - { - child = startContainer.getChild( startOffset ); - - // In this case, move the start information to that text - // node. - if ( child && child.type == CKEDITOR.NODE_TEXT - && startOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT ) - { - startContainer = child; - startOffset = 0; - } - - // Get the normalized offset. - if ( child && child.type == CKEDITOR.NODE_ELEMENT ) - startOffset = child.getIndex( 1 ); - } - - // Normalize the start. - while ( startContainer.type == CKEDITOR.NODE_TEXT - && ( previous = startContainer.getPrevious() ) - && previous.type == CKEDITOR.NODE_TEXT ) - { - startContainer = previous; - startOffset += previous.getLength(); - } - - // Process the end only if not normalized. - if ( !collapsed ) - { - // Find out if the start is pointing to a text node that - // will be normalized. - if ( endContainer.type == CKEDITOR.NODE_ELEMENT ) - { - child = endContainer.getChild( endOffset ); - - // In this case, move the start information to that - // text node. - if ( child && child.type == CKEDITOR.NODE_TEXT - && endOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT ) - { - endContainer = child; - endOffset = 0; - } - - // Get the normalized offset. - if ( child && child.type == CKEDITOR.NODE_ELEMENT ) - endOffset = child.getIndex( 1 ); - } - - // Normalize the end. - while ( endContainer.type == CKEDITOR.NODE_TEXT - && ( previous = endContainer.getPrevious() ) - && previous.type == CKEDITOR.NODE_TEXT ) - { - endContainer = previous; - endOffset += previous.getLength(); - } - } - } - - return { - start : startContainer.getAddress( normalized ), - end : collapsed ? null : endContainer.getAddress( normalized ), - startOffset : startOffset, - endOffset : endOffset, - normalized : normalized, - collapsed : collapsed, - is2 : true // It's a createBookmark2 bookmark. - }; - }, - - moveToBookmark : function( bookmark ) - { - if ( bookmark.is2 ) // Created with createBookmark2(). - { - // Get the start information. - var startContainer = this.document.getByAddress( bookmark.start, bookmark.normalized ), - startOffset = bookmark.startOffset; - - // Get the end information. - var endContainer = bookmark.end && this.document.getByAddress( bookmark.end, bookmark.normalized ), - endOffset = bookmark.endOffset; - - // Set the start boundary. - this.setStart( startContainer, startOffset ); - - // Set the end boundary. If not available, collapse it. - if ( endContainer ) - this.setEnd( endContainer, endOffset ); - else - this.collapse( true ); - } - else // Created with createBookmark(). - { - var serializable = bookmark.serializable, - startNode = serializable ? this.document.getById( bookmark.startNode ) : bookmark.startNode, - endNode = serializable ? this.document.getById( bookmark.endNode ) : bookmark.endNode; - - // Set the range start at the bookmark start node position. - this.setStartBefore( startNode ); - - // Remove it, because it may interfere in the setEndBefore call. - startNode.remove(); - - // Set the range end at the bookmark end node position, or simply - // collapse it if it is not available. - if ( endNode ) - { - this.setEndBefore( endNode ); - endNode.remove(); - } - else - this.collapse( true ); - } - }, - - getBoundaryNodes : function() - { - var startNode = this.startContainer, - endNode = this.endContainer, - startOffset = this.startOffset, - endOffset = this.endOffset, - childCount; - - if ( startNode.type == CKEDITOR.NODE_ELEMENT ) - { - childCount = startNode.getChildCount(); - if ( childCount > startOffset ) - startNode = startNode.getChild( startOffset ); - else if ( childCount < 1 ) - startNode = startNode.getPreviousSourceNode(); - else // startOffset > childCount but childCount is not 0 - { - // Try to take the node just after the current position. - startNode = startNode.$; - while ( startNode.lastChild ) - startNode = startNode.lastChild; - startNode = new CKEDITOR.dom.node( startNode ); - - // Normally we should take the next node in DFS order. But it - // is also possible that we've already reached the end of - // document. - startNode = startNode.getNextSourceNode() || startNode; - } - } - if ( endNode.type == CKEDITOR.NODE_ELEMENT ) - { - childCount = endNode.getChildCount(); - if ( childCount > endOffset ) - endNode = endNode.getChild( endOffset ).getPreviousSourceNode( true ); - else if ( childCount < 1 ) - endNode = endNode.getPreviousSourceNode(); - else // endOffset > childCount but childCount is not 0 - { - // Try to take the node just before the current position. - endNode = endNode.$; - while ( endNode.lastChild ) - endNode = endNode.lastChild; - endNode = new CKEDITOR.dom.node( endNode ); - } - } - - // Sometimes the endNode will come right before startNode for collapsed - // ranges. Fix it. (#3780) - if ( startNode.getPosition( endNode ) & CKEDITOR.POSITION_FOLLOWING ) - startNode = endNode; - - return { startNode : startNode, endNode : endNode }; - }, - - /** - * Find the node which fully contains the range. - * @param includeSelf - * @param {Boolean} ignoreTextNode Whether ignore CKEDITOR.NODE_TEXT type. - */ - getCommonAncestor : function( includeSelf , ignoreTextNode ) - { - var start = this.startContainer, - end = this.endContainer, - ancestor; - - if ( start.equals( end ) ) - { - if ( includeSelf - && start.type == CKEDITOR.NODE_ELEMENT - && this.startOffset == this.endOffset - 1 ) - ancestor = start.getChild( this.startOffset ); - else - ancestor = start; - } - else - ancestor = start.getCommonAncestor( end ); - - return ignoreTextNode && !ancestor.is ? ancestor.getParent() : ancestor; - }, - - /** - * Transforms the startContainer and endContainer properties from text - * nodes to element nodes, whenever possible. This is actually possible - * if either of the boundary containers point to a text node, and its - * offset is set to zero, or after the last char in the node. - */ - optimize : function() - { - var container = this.startContainer; - var offset = this.startOffset; - - if ( container.type != CKEDITOR.NODE_ELEMENT ) - { - if ( !offset ) - this.setStartBefore( container ); - else if ( offset >= container.getLength() ) - this.setStartAfter( container ); - } - - container = this.endContainer; - offset = this.endOffset; - - if ( container.type != CKEDITOR.NODE_ELEMENT ) - { - if ( !offset ) - this.setEndBefore( container ); - else if ( offset >= container.getLength() ) - this.setEndAfter( container ); - } - }, - - /** - * Move the range out of bookmark nodes if they'd been the container. - */ - optimizeBookmark: function() - { - var startNode = this.startContainer, - endNode = this.endContainer; - - if ( startNode.is && startNode.is( 'span' ) - && startNode.data( 'cke-bookmark' ) ) - this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START ); - if ( endNode && endNode.is && endNode.is( 'span' ) - && endNode.data( 'cke-bookmark' ) ) - this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END ); - }, - - trim : function( ignoreStart, ignoreEnd ) - { - var startContainer = this.startContainer, - startOffset = this.startOffset, - collapsed = this.collapsed; - if ( ( !ignoreStart || collapsed ) - && startContainer && startContainer.type == CKEDITOR.NODE_TEXT ) - { - // If the offset is zero, we just insert the new node before - // the start. - if ( !startOffset ) - { - startOffset = startContainer.getIndex(); - startContainer = startContainer.getParent(); - } - // If the offset is at the end, we'll insert it after the text - // node. - else if ( startOffset >= startContainer.getLength() ) - { - startOffset = startContainer.getIndex() + 1; - startContainer = startContainer.getParent(); - } - // In other case, we split the text node and insert the new - // node at the split point. - else - { - var nextText = startContainer.split( startOffset ); - - startOffset = startContainer.getIndex() + 1; - startContainer = startContainer.getParent(); - - // Check all necessity of updating the end boundary. - if ( this.startContainer.equals( this.endContainer ) ) - this.setEnd( nextText, this.endOffset - this.startOffset ); - else if ( startContainer.equals( this.endContainer ) ) - this.endOffset += 1; - } - - this.setStart( startContainer, startOffset ); - - if ( collapsed ) - { - this.collapse( true ); - return; - } - } - - var endContainer = this.endContainer; - var endOffset = this.endOffset; - - if ( !( ignoreEnd || collapsed ) - && endContainer && endContainer.type == CKEDITOR.NODE_TEXT ) - { - // If the offset is zero, we just insert the new node before - // the start. - if ( !endOffset ) - { - endOffset = endContainer.getIndex(); - endContainer = endContainer.getParent(); - } - // If the offset is at the end, we'll insert it after the text - // node. - else if ( endOffset >= endContainer.getLength() ) - { - endOffset = endContainer.getIndex() + 1; - endContainer = endContainer.getParent(); - } - // In other case, we split the text node and insert the new - // node at the split point. - else - { - endContainer.split( endOffset ); - - endOffset = endContainer.getIndex() + 1; - endContainer = endContainer.getParent(); - } - - this.setEnd( endContainer, endOffset ); - } - }, - - /** - * Expands the range so that partial units are completely contained. - * @param unit {Number} The unit type to expand with. - * @param {Boolean} [excludeBrs=false] Whether include line-breaks when expanding. - */ - enlarge : function( unit, excludeBrs ) - { - switch ( unit ) - { - case CKEDITOR.ENLARGE_ELEMENT : - - if ( this.collapsed ) - return; - - // Get the common ancestor. - var commonAncestor = this.getCommonAncestor(); - - var body = this.document.getBody(); - - // For each boundary - // a. Depending on its position, find out the first node to be checked (a sibling) or, if not available, to be enlarge. - // b. Go ahead checking siblings and enlarging the boundary as much as possible until the common ancestor is not reached. After reaching the common ancestor, just save the enlargeable node to be used later. - - var startTop, endTop; - - var enlargeable, sibling, commonReached; - - // Indicates that the node can be added only if whitespace - // is available before it. - var needsWhiteSpace = false; - var isWhiteSpace; - var siblingText; - - // Process the start boundary. - - var container = this.startContainer; - var offset = this.startOffset; - - if ( container.type == CKEDITOR.NODE_TEXT ) - { - if ( offset ) - { - // Check if there is any non-space text before the - // offset. Otherwise, container is null. - container = !CKEDITOR.tools.trim( container.substring( 0, offset ) ).length && container; - - // If we found only whitespace in the node, it - // means that we'll need more whitespace to be able - // to expand. For example, can be expanded in - // "A [B]", but not in "A [B]". - needsWhiteSpace = !!container; - } - - if ( container ) - { - if ( !( sibling = container.getPrevious() ) ) - enlargeable = container.getParent(); - } - } - else - { - // If we have offset, get the node preceeding it as the - // first sibling to be checked. - if ( offset ) - sibling = container.getChild( offset - 1 ) || container.getLast(); - - // If there is no sibling, mark the container to be - // enlarged. - if ( !sibling ) - enlargeable = container; - } - - while ( enlargeable || sibling ) - { - if ( enlargeable && !sibling ) - { - // If we reached the common ancestor, mark the flag - // for it. - if ( !commonReached && enlargeable.equals( commonAncestor ) ) - commonReached = true; - - if ( !body.contains( enlargeable ) ) - break; - - // If we don't need space or this element breaks - // the line, then enlarge it. - if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' ) - { - needsWhiteSpace = false; - - // If the common ancestor has been reached, - // we'll not enlarge it immediately, but just - // mark it to be enlarged later if the end - // boundary also enlarges it. - if ( commonReached ) - startTop = enlargeable; - else - this.setStartBefore( enlargeable ); - } - - sibling = enlargeable.getPrevious(); - } - - // Check all sibling nodes preceeding the enlargeable - // node. The node wil lbe enlarged only if none of them - // blocks it. - while ( sibling ) - { - // This flag indicates that this node has - // whitespaces at the end. - isWhiteSpace = false; - - if ( sibling.type == CKEDITOR.NODE_COMMENT ) - { - sibling = sibling.getPrevious(); - continue; - } - else if ( sibling.type == CKEDITOR.NODE_TEXT ) - { - siblingText = sibling.getText(); - - if ( /[^\s\ufeff]/.test( siblingText ) ) - sibling = null; - - isWhiteSpace = /[\s\ufeff]$/.test( siblingText ); - } - else - { - // If this is a visible element. - // We need to check for the bookmark attribute because IE insists on - // rendering the display:none nodes we use for bookmarks. (#3363) - // Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041) - if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) ) - { - // We'll accept it only if we need - // whitespace, and this is an inline - // element with whitespace only. - if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] ) - { - // It must contains spaces and inline elements only. - - siblingText = sibling.getText(); - - if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF) - sibling = null; - else - { - var allChildren = sibling.$.getElementsByTagName( '*' ); - for ( var i = 0, child ; child = allChildren[ i++ ] ; ) - { - if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] ) - { - sibling = null; - break; - } - } - } - - if ( sibling ) - isWhiteSpace = !!siblingText.length; - } - else - sibling = null; - } - } - - // A node with whitespaces has been found. - if ( isWhiteSpace ) - { - // Enlarge the last enlargeable node, if we - // were waiting for spaces. - if ( needsWhiteSpace ) - { - if ( commonReached ) - startTop = enlargeable; - else if ( enlargeable ) - this.setStartBefore( enlargeable ); - } - else - needsWhiteSpace = true; - } - - if ( sibling ) - { - var next = sibling.getPrevious(); - - if ( !enlargeable && !next ) - { - // Set the sibling as enlargeable, so it's - // parent will be get later outside this while. - enlargeable = sibling; - sibling = null; - break; - } - - sibling = next; - } - else - { - // If sibling has been set to null, then we - // need to stop enlarging. - enlargeable = null; - } - } - - if ( enlargeable ) - enlargeable = enlargeable.getParent(); - } - - // Process the end boundary. This is basically the same - // code used for the start boundary, with small changes to - // make it work in the oposite side (to the right). This - // makes it difficult to reuse the code here. So, fixes to - // the above code are likely to be replicated here. - - container = this.endContainer; - offset = this.endOffset; - - // Reset the common variables. - enlargeable = sibling = null; - commonReached = needsWhiteSpace = false; - - if ( container.type == CKEDITOR.NODE_TEXT ) - { - // Check if there is any non-space text after the - // offset. Otherwise, container is null. - container = !CKEDITOR.tools.trim( container.substring( offset ) ).length && container; - - // If we found only whitespace in the node, it - // means that we'll need more whitespace to be able - // to expand. For example, can be expanded in - // "A [B]", but not in "A [B]". - needsWhiteSpace = !( container && container.getLength() ); - - if ( container ) - { - if ( !( sibling = container.getNext() ) ) - enlargeable = container.getParent(); - } - } - else - { - // Get the node right after the boudary to be checked - // first. - sibling = container.getChild( offset ); - - if ( !sibling ) - enlargeable = container; - } - - while ( enlargeable || sibling ) - { - if ( enlargeable && !sibling ) - { - if ( !commonReached && enlargeable.equals( commonAncestor ) ) - commonReached = true; - - if ( !body.contains( enlargeable ) ) - break; - - if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' ) - { - needsWhiteSpace = false; - - if ( commonReached ) - endTop = enlargeable; - else if ( enlargeable ) - this.setEndAfter( enlargeable ); - } - - sibling = enlargeable.getNext(); - } - - while ( sibling ) - { - isWhiteSpace = false; - - if ( sibling.type == CKEDITOR.NODE_TEXT ) - { - siblingText = sibling.getText(); - - if ( /[^\s\ufeff]/.test( siblingText ) ) - sibling = null; - - isWhiteSpace = /^[\s\ufeff]/.test( siblingText ); - } - else if ( sibling.type == CKEDITOR.NODE_ELEMENT ) - { - // If this is a visible element. - // We need to check for the bookmark attribute because IE insists on - // rendering the display:none nodes we use for bookmarks. (#3363) - // Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041) - if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) ) - { - // We'll accept it only if we need - // whitespace, and this is an inline - // element with whitespace only. - if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] ) - { - // It must contains spaces and inline elements only. - - siblingText = sibling.getText(); - - if ( (/[^\s\ufeff]/).test( siblingText ) ) - sibling = null; - else - { - allChildren = sibling.$.getElementsByTagName( '*' ); - for ( i = 0 ; child = allChildren[ i++ ] ; ) - { - if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] ) - { - sibling = null; - break; - } - } - } - - if ( sibling ) - isWhiteSpace = !!siblingText.length; - } - else - sibling = null; - } - } - else - isWhiteSpace = 1; - - if ( isWhiteSpace ) - { - if ( needsWhiteSpace ) - { - if ( commonReached ) - endTop = enlargeable; - else - this.setEndAfter( enlargeable ); - } - } - - if ( sibling ) - { - next = sibling.getNext(); - - if ( !enlargeable && !next ) - { - enlargeable = sibling; - sibling = null; - break; - } - - sibling = next; - } - else - { - // If sibling has been set to null, then we - // need to stop enlarging. - enlargeable = null; - } - } - - if ( enlargeable ) - enlargeable = enlargeable.getParent(); - } - - // If the common ancestor can be enlarged by both boundaries, then include it also. - if ( startTop && endTop ) - { - commonAncestor = startTop.contains( endTop ) ? endTop : startTop; - - this.setStartBefore( commonAncestor ); - this.setEndAfter( commonAncestor ); - } - break; - - case CKEDITOR.ENLARGE_BLOCK_CONTENTS: - case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: - - // Enlarging the start boundary. - var walkerRange = new CKEDITOR.dom.range( this.document ); - - body = this.document.getBody(); - - walkerRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); - walkerRange.setEnd( this.startContainer, this.startOffset ); - - var walker = new CKEDITOR.dom.walker( walkerRange ), - blockBoundary, // The node on which the enlarging should stop. - tailBr, // In case BR as block boundary. - notBlockBoundary = CKEDITOR.dom.walker.blockBoundary( - ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ), - // Record the encountered 'blockBoundary' for later use. - boundaryGuard = function( node ) - { - var retval = notBlockBoundary( node ); - if ( !retval ) - blockBoundary = node; - return retval; - }, - // Record the encounted 'tailBr' for later use. - tailBrGuard = function( node ) - { - var retval = boundaryGuard( node ); - if ( !retval && node.is && node.is( 'br' ) ) - tailBr = node; - return retval; - }; - - walker.guard = boundaryGuard; - - enlargeable = walker.lastBackward(); - - // It's the body which stop the enlarging if no block boundary found. - blockBoundary = blockBoundary || body; - - // Start the range either after the end of found block (

...

[text) - // or at the start of block (

[text...), by comparing the document position - // with 'enlargeable' node. - this.setStartAt( - blockBoundary, - !blockBoundary.is( 'br' ) && - ( !enlargeable && this.checkStartOfBlock() - || enlargeable && blockBoundary.contains( enlargeable ) ) ? - CKEDITOR.POSITION_AFTER_START : - CKEDITOR.POSITION_AFTER_END ); - - // Avoid enlarging the range further when end boundary spans right after the BR. (#7490) - if ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) - { - var theRange = this.clone(); - walker = new CKEDITOR.dom.walker( theRange ); - - var whitespaces = CKEDITOR.dom.walker.whitespaces(), - bookmark = CKEDITOR.dom.walker.bookmark(); - - walker.evaluator = function( node ) { return !whitespaces( node ) && !bookmark( node ); }; - var previous = walker.previous(); - if ( previous && previous.type == CKEDITOR.NODE_ELEMENT && previous.is( 'br' ) ) - return; - } - - - // Enlarging the end boundary. - walkerRange = this.clone(); - walkerRange.collapse(); - walkerRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); - walker = new CKEDITOR.dom.walker( walkerRange ); - - // tailBrGuard only used for on range end. - walker.guard = ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? - tailBrGuard : boundaryGuard; - blockBoundary = null; - // End the range right before the block boundary node. - - enlargeable = walker.lastForward(); - - // It's the body which stop the enlarging if no block boundary found. - blockBoundary = blockBoundary || body; - - // Close the range either before the found block start (text]

...

) or at the block end (...text]

) - // by comparing the document position with 'enlargeable' node. - this.setEndAt( - blockBoundary, - ( !enlargeable && this.checkEndOfBlock() - || enlargeable && blockBoundary.contains( enlargeable ) ) ? - CKEDITOR.POSITION_BEFORE_END : - CKEDITOR.POSITION_BEFORE_START ); - // We must include the
at the end of range if there's - // one and we're expanding list item contents - if ( tailBr ) - this.setEndAfter( tailBr ); - } - }, - - /** - * Descrease the range to make sure that boundaries - * always anchor beside text nodes or innermost element. - * @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode. - *
- *
CKEDITOR.SHRINK_ELEMENT
- *
Shrink the range boundaries to the edge of the innermost element.
- *
CKEDITOR.SHRINK_TEXT
- *
Shrink the range boudaries to anchor by the side of enclosed text node, range remains if there's no text nodes on boundaries at all.
- *
- * @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node. - */ - shrink : function( mode, selectContents ) - { - // Unable to shrink a collapsed range. - if ( !this.collapsed ) - { - mode = mode || CKEDITOR.SHRINK_TEXT; - - var walkerRange = this.clone(); - - var startContainer = this.startContainer, - endContainer = this.endContainer, - startOffset = this.startOffset, - endOffset = this.endOffset, - collapsed = this.collapsed; - - // Whether the start/end boundary is moveable. - var moveStart = 1, - moveEnd = 1; - - if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT ) - { - if ( !startOffset ) - walkerRange.setStartBefore( startContainer ); - else if ( startOffset >= startContainer.getLength( ) ) - walkerRange.setStartAfter( startContainer ); - else - { - // Enlarge the range properly to avoid walker making - // DOM changes caused by triming the text nodes later. - walkerRange.setStartBefore( startContainer ); - moveStart = 0; - } - } - - if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT ) - { - if ( !endOffset ) - walkerRange.setEndBefore( endContainer ); - else if ( endOffset >= endContainer.getLength( ) ) - walkerRange.setEndAfter( endContainer ); - else - { - walkerRange.setEndAfter( endContainer ); - moveEnd = 0; - } - } - - var walker = new CKEDITOR.dom.walker( walkerRange ), - isBookmark = CKEDITOR.dom.walker.bookmark(); - - walker.evaluator = function( node ) - { - return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ? - CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT ); - }; - - var currentElement; - walker.guard = function( node, movingOut ) - { - if ( isBookmark( node ) ) - return true; - - // Stop when we're shrink in element mode while encountering a text node. - if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT ) - return false; - - // Stop when we've already walked "through" an element. - if ( movingOut && node.equals( currentElement ) ) - return false; - - if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT ) - currentElement = node; - - return true; - }; - - if ( moveStart ) - { - var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next'](); - textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START ); - } - - if ( moveEnd ) - { - walker.reset(); - var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous'](); - textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END ); - } - - return !!( moveStart || moveEnd ); - } - }, - - /** - * Inserts a node at the start of the range. The range will be expanded - * the contain the node. - */ - insertNode : function( node ) - { - this.optimizeBookmark(); - this.trim( false, true ); - - var startContainer = this.startContainer; - var startOffset = this.startOffset; - - var nextNode = startContainer.getChild( startOffset ); - - if ( nextNode ) - node.insertBefore( nextNode ); - else - startContainer.append( node ); - - // Check if we need to update the end boundary. - if ( node.getParent().equals( this.endContainer ) ) - this.endOffset++; - - // Expand the range to embrace the new node. - this.setStartBefore( node ); - }, - - moveToPosition : function( node, position ) - { - this.setStartAt( node, position ); - this.collapse( true ); - }, - - selectNodeContents : function( node ) - { - this.setStart( node, 0 ); - this.setEnd( node, node.type == CKEDITOR.NODE_TEXT ? node.getLength() : node.getChildCount() ); - }, - - /** - * Sets the start position of a Range. - * @param {CKEDITOR.dom.node} startNode The node to start the range. - * @param {Number} startOffset An integer greater than or equal to zero - * representing the offset for the start of the range from the start - * of startNode. - */ - setStart : function( startNode, startOffset ) - { - // W3C requires a check for the new position. If it is after the end - // boundary, the range should be collapsed to the new start. It seams - // we will not need this check for our use of this class so we can - // ignore it for now. - - // Fixing invalid range start inside dtd empty elements. - if( startNode.type == CKEDITOR.NODE_ELEMENT - && CKEDITOR.dtd.$empty[ startNode.getName() ] ) - startOffset = startNode.getIndex(), startNode = startNode.getParent(); - - this.startContainer = startNode; - this.startOffset = startOffset; - - if ( !this.endContainer ) - { - this.endContainer = startNode; - this.endOffset = startOffset; - } - - updateCollapsed( this ); - }, - - /** - * Sets the end position of a Range. - * @param {CKEDITOR.dom.node} endNode The node to end the range. - * @param {Number} endOffset An integer greater than or equal to zero - * representing the offset for the end of the range from the start - * of endNode. - */ - setEnd : function( endNode, endOffset ) - { - // W3C requires a check for the new position. If it is before the start - // boundary, the range should be collapsed to the new end. It seams we - // will not need this check for our use of this class so we can ignore - // it for now. - - // Fixing invalid range end inside dtd empty elements. - if( endNode.type == CKEDITOR.NODE_ELEMENT - && CKEDITOR.dtd.$empty[ endNode.getName() ] ) - endOffset = endNode.getIndex() + 1, endNode = endNode.getParent(); - - this.endContainer = endNode; - this.endOffset = endOffset; - - if ( !this.startContainer ) - { - this.startContainer = endNode; - this.startOffset = endOffset; - } - - updateCollapsed( this ); - }, - - setStartAfter : function( node ) - { - this.setStart( node.getParent(), node.getIndex() + 1 ); - }, - - setStartBefore : function( node ) - { - this.setStart( node.getParent(), node.getIndex() ); - }, - - setEndAfter : function( node ) - { - this.setEnd( node.getParent(), node.getIndex() + 1 ); - }, - - setEndBefore : function( node ) - { - this.setEnd( node.getParent(), node.getIndex() ); - }, - - setStartAt : function( node, position ) - { - switch( position ) - { - case CKEDITOR.POSITION_AFTER_START : - this.setStart( node, 0 ); - break; - - case CKEDITOR.POSITION_BEFORE_END : - if ( node.type == CKEDITOR.NODE_TEXT ) - this.setStart( node, node.getLength() ); - else - this.setStart( node, node.getChildCount() ); - break; - - case CKEDITOR.POSITION_BEFORE_START : - this.setStartBefore( node ); - break; - - case CKEDITOR.POSITION_AFTER_END : - this.setStartAfter( node ); - } - - updateCollapsed( this ); - }, - - setEndAt : function( node, position ) - { - switch( position ) - { - case CKEDITOR.POSITION_AFTER_START : - this.setEnd( node, 0 ); - break; - - case CKEDITOR.POSITION_BEFORE_END : - if ( node.type == CKEDITOR.NODE_TEXT ) - this.setEnd( node, node.getLength() ); - else - this.setEnd( node, node.getChildCount() ); - break; - - case CKEDITOR.POSITION_BEFORE_START : - this.setEndBefore( node ); - break; - - case CKEDITOR.POSITION_AFTER_END : - this.setEndAfter( node ); - } - - updateCollapsed( this ); - }, - - fixBlock : function( isStart, blockTag ) - { - var bookmark = this.createBookmark(), - fixedBlock = this.document.createElement( blockTag ); - - this.collapse( isStart ); - - this.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS ); - - this.extractContents().appendTo( fixedBlock ); - fixedBlock.trim(); - - if ( !CKEDITOR.env.ie ) - fixedBlock.appendBogus(); - - this.insertNode( fixedBlock ); - - this.moveToBookmark( bookmark ); - - return fixedBlock; - }, - - splitBlock : function( blockTag ) - { - var startPath = new CKEDITOR.dom.elementPath( this.startContainer ), - endPath = new CKEDITOR.dom.elementPath( this.endContainer ); - - var startBlockLimit = startPath.blockLimit, - endBlockLimit = endPath.blockLimit; - - var startBlock = startPath.block, - endBlock = endPath.block; - - var elementPath = null; - // Do nothing if the boundaries are in different block limits. - if ( !startBlockLimit.equals( endBlockLimit ) ) - return null; - - // Get or fix current blocks. - if ( blockTag != 'br' ) - { - if ( !startBlock ) - { - startBlock = this.fixBlock( true, blockTag ); - endBlock = new CKEDITOR.dom.elementPath( this.endContainer ).block; - } - - if ( !endBlock ) - endBlock = this.fixBlock( false, blockTag ); - } - - // Get the range position. - var isStartOfBlock = startBlock && this.checkStartOfBlock(), - isEndOfBlock = endBlock && this.checkEndOfBlock(); - - // Delete the current contents. - // TODO: Why is 2.x doing CheckIsEmpty()? - this.deleteContents(); - - if ( startBlock && startBlock.equals( endBlock ) ) - { - if ( isEndOfBlock ) - { - elementPath = new CKEDITOR.dom.elementPath( this.startContainer ); - this.moveToPosition( endBlock, CKEDITOR.POSITION_AFTER_END ); - endBlock = null; - } - else if ( isStartOfBlock ) - { - elementPath = new CKEDITOR.dom.elementPath( this.startContainer ); - this.moveToPosition( startBlock, CKEDITOR.POSITION_BEFORE_START ); - startBlock = null; - } - else - { - endBlock = this.splitElement( startBlock ); - - // In Gecko, the last child node must be a bogus
. - // Note: bogus
added under
    or
      would cause - // lists to be incorrectly rendered. - if ( !CKEDITOR.env.ie && !startBlock.is( 'ul', 'ol') ) - startBlock.appendBogus() ; - } - } - - return { - previousBlock : startBlock, - nextBlock : endBlock, - wasStartOfBlock : isStartOfBlock, - wasEndOfBlock : isEndOfBlock, - elementPath : elementPath - }; - }, - - /** - * Branch the specified element from the collapsed range position and - * place the caret between the two result branches. - * Note: The range must be collapsed and been enclosed by this element. - * @param {CKEDITOR.dom.element} element - * @return {CKEDITOR.dom.element} Root element of the new branch after the split. - */ - splitElement : function( toSplit ) - { - if ( !this.collapsed ) - return null; - - // Extract the contents of the block from the selection point to the end - // of its contents. - this.setEndAt( toSplit, CKEDITOR.POSITION_BEFORE_END ); - var documentFragment = this.extractContents(); - - // Duplicate the element after it. - var clone = toSplit.clone( false ); - - // Place the extracted contents into the duplicated element. - documentFragment.appendTo( clone ); - clone.insertAfter( toSplit ); - this.moveToPosition( toSplit, CKEDITOR.POSITION_AFTER_END ); - return clone; - }, - - /** - * Check whether a range boundary is at the inner boundary of a given - * element. - * @param {CKEDITOR.dom.element} element The target element to check. - * @param {Number} checkType The boundary to check for both the range - * and the element. It can be CKEDITOR.START or CKEDITOR.END. - * @returns {Boolean} "true" if the range boundary is at the inner - * boundary of the element. - */ - checkBoundaryOfElement : function( element, checkType ) - { - var checkStart = ( checkType == CKEDITOR.START ); - - // Create a copy of this range, so we can manipulate it for our checks. - var walkerRange = this.clone(); - - // Collapse the range at the proper size. - walkerRange.collapse( checkStart ); - - // Expand the range to element boundary. - walkerRange[ checkStart ? 'setStartAt' : 'setEndAt' ] - ( element, checkStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END ); - - // Create the walker, which will check if we have anything useful - // in the range. - var walker = new CKEDITOR.dom.walker( walkerRange ); - walker.evaluator = elementBoundaryEval( checkStart ); - - return walker[ checkStart ? 'checkBackward' : 'checkForward' ](); - }, - - // Calls to this function may produce changes to the DOM. The range may - // be updated to reflect such changes. - checkStartOfBlock : function() - { - var startContainer = this.startContainer, - startOffset = this.startOffset; - - // [IE] Special handling for range start in text with a leading NBSP, - // we it to be isolated, for bogus check. - if ( CKEDITOR.env.ie && startOffset && startContainer.type == CKEDITOR.NODE_TEXT ) - { - var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) ); - if ( nbspRegExp.test( textBefore ) ) - this.trim( 0, 1 ); - } - - // We need to grab the block element holding the start boundary, so - // let's use an element path for it. - var path = new CKEDITOR.dom.elementPath( this.startContainer ); - - // Creates a range starting at the block start until the range start. - var walkerRange = this.clone(); - walkerRange.collapse( true ); - walkerRange.setStartAt( path.block || path.blockLimit, CKEDITOR.POSITION_AFTER_START ); - - var walker = new CKEDITOR.dom.walker( walkerRange ); - walker.evaluator = getCheckStartEndBlockEvalFunction(); - - return walker.checkBackward(); - }, - - checkEndOfBlock : function() - { - var endContainer = this.endContainer, - endOffset = this.endOffset; - - // [IE] Special handling for range end in text with a following NBSP, - // we it to be isolated, for bogus check. - if ( CKEDITOR.env.ie && endContainer.type == CKEDITOR.NODE_TEXT ) - { - var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) ); - if ( nbspRegExp.test( textAfter ) ) - this.trim( 1, 0 ); - } - - // We need to grab the block element holding the start boundary, so - // let's use an element path for it. - var path = new CKEDITOR.dom.elementPath( this.endContainer ); - - // Creates a range starting at the block start until the range start. - var walkerRange = this.clone(); - walkerRange.collapse( false ); - walkerRange.setEndAt( path.block || path.blockLimit, CKEDITOR.POSITION_BEFORE_END ); - - var walker = new CKEDITOR.dom.walker( walkerRange ); - walker.evaluator = getCheckStartEndBlockEvalFunction(); - - return walker.checkForward(); - }, - - /** - * Traverse with {@link CKEDITOR.dom.walker} to retrieve the previous element before the range start. - * @param {Function} evaluator Function used as the walker's evaluator. - * @param {Function} [guard] Function used as the walker's guard. - * @param {CKEDITOR.dom.element} [boundary] A range ancestor element in which the traversal is limited, - * default to the root editable if not defined. - * - * @return {CKEDITOR.dom.element|null} The returned node from the traversal. - */ - getPreviousNode : function( evaluator, guard, boundary ) { - - var walkerRange = this.clone(); - walkerRange.collapse( 1 ); - walkerRange.setStartAt( boundary || this.document.getBody(), CKEDITOR.POSITION_AFTER_START ); - - var walker = new CKEDITOR.dom.walker( walkerRange ); - walker.evaluator = evaluator; - walker.guard = guard; - return walker.previous(); - }, - - /** - * Traverse with {@link CKEDITOR.dom.walker} to retrieve the next element before the range start. - * @param {Function} evaluator Function used as the walker's evaluator. - * @param {Function} [guard] Function used as the walker's guard. - * @param {CKEDITOR.dom.element} [boundary] A range ancestor element in which the traversal is limited, - * default to the root editable if not defined. - * - * @return {CKEDITOR.dom.element|null} The returned node from the traversal. - */ - getNextNode: function( evaluator, guard, boundary ) - { - var walkerRange = this.clone(); - walkerRange.collapse(); - walkerRange.setEndAt( boundary || this.document.getBody(), CKEDITOR.POSITION_BEFORE_END ); - - var walker = new CKEDITOR.dom.walker( walkerRange ); - walker.evaluator = evaluator; - walker.guard = guard; - return walker.next(); - }, - - checkReadOnly : ( function() - { - function checkNodesEditable( node, anotherEnd ) - { - while( node ) - { - if ( node.type == CKEDITOR.NODE_ELEMENT ) - { - if ( node.getAttribute( 'contentEditable' ) == 'false' - && !node.data( 'cke-editable' ) ) - { - return 0; - } - // Range enclosed entirely in an editable element. - else if ( node.is( 'html' ) - || node.getAttribute( 'contentEditable' ) == 'true' - && ( node.contains( anotherEnd ) || node.equals( anotherEnd ) ) ) - { - break; - } - } - node = node.getParent(); - } - - return 1; - } - - return function() - { - var startNode = this.startContainer, - endNode = this.endContainer; - - // Check if elements path at both boundaries are editable. - return !( checkNodesEditable( startNode, endNode ) && checkNodesEditable( endNode, startNode ) ); - }; - })(), - - /** - * Moves the range boundaries to the first/end editing point inside an - * element. For example, in an element tree like - * "<p><b><i></i></b> Text</p>", the start editing point is - * "<p><b><i>^</i></b> Text</p>" (inside <i>). - * @param {CKEDITOR.dom.element} el The element into which look for the - * editing spot. - * @param {Boolean} isMoveToEnd Whether move to the end editable position. - */ - moveToElementEditablePosition : function( el, isMoveToEnd ) - { - function nextDFS( node, childOnly ) - { - var next; - - if ( node.type == CKEDITOR.NODE_ELEMENT && node.isEditable( false ) ) - next = node[ isMoveToEnd ? 'getLast' : 'getFirst' ]( nonWhitespaceOrBookmarkEval ); - - if ( !childOnly && !next ) - next = node[ isMoveToEnd ? 'getPrevious' : 'getNext' ]( nonWhitespaceOrBookmarkEval ); - - return next; - } - - // Handle non-editable element e.g. HR. - if ( el.type == CKEDITOR.NODE_ELEMENT && !el.isEditable( false ) ) - { - this.moveToPosition( el, isMoveToEnd ? - CKEDITOR.POSITION_AFTER_END : - CKEDITOR.POSITION_BEFORE_START ); - return true; - } - - var found = 0; - - while ( el ) - { - // Stop immediately if we've found a text node. - if ( el.type == CKEDITOR.NODE_TEXT ) - { - // Put cursor before block filler. - if ( isMoveToEnd && this.checkEndOfBlock() && nbspRegExp.test( el.getText() ) ) - this.moveToPosition( el, CKEDITOR.POSITION_BEFORE_START ); - else - this.moveToPosition( el, isMoveToEnd ? - CKEDITOR.POSITION_AFTER_END : - CKEDITOR.POSITION_BEFORE_START ); - found = 1; - break; - } - - // If an editable element is found, move inside it, but not stop the searching. - if ( el.type == CKEDITOR.NODE_ELEMENT ) - { - if ( el.isEditable() ) - { - this.moveToPosition( el, isMoveToEnd ? - CKEDITOR.POSITION_BEFORE_END : - CKEDITOR.POSITION_AFTER_START ); - found = 1; - } - // Put cursor before padding block br. - else if ( isMoveToEnd && el.is( 'br' ) && this.checkEndOfBlock() ) - this.moveToPosition( el, CKEDITOR.POSITION_BEFORE_START ); - } - - el = nextDFS( el, found ); - } - - return !!found; - }, - - /** - *@see {CKEDITOR.dom.range.moveToElementEditablePosition} - */ - moveToElementEditStart : function( target ) - { - return this.moveToElementEditablePosition( target ); - }, - - /** - *@see {CKEDITOR.dom.range.moveToElementEditablePosition} - */ - moveToElementEditEnd : function( target ) - { - return this.moveToElementEditablePosition( target, true ); - }, - - /** - * Get the single node enclosed within the range if there's one. - */ - getEnclosedNode : function() - { - var walkerRange = this.clone(); - - // Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780) - walkerRange.optimize(); - if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT - || walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT ) - return null; - - var walker = new CKEDITOR.dom.walker( walkerRange ), - isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ), - isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ), - evaluator = function( node ) - { - return isNotWhitespaces( node ) && isNotBookmarks( node ); - }; - walkerRange.evaluator = evaluator; - var node = walker.next(); - walker.reset(); - return node && node.equals( walker.previous() ) ? node : null; - }, - - getTouchedStartNode : function() - { - var container = this.startContainer ; - - if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT ) - return container ; - - return container.getChild( this.startOffset ) || container ; - }, - - getTouchedEndNode : function() - { - var container = this.endContainer ; - - if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT ) - return container ; - - return container.getChild( this.endOffset - 1 ) || container ; - } - }; -})(); - -CKEDITOR.POSITION_AFTER_START = 1; // ^contents "^text" -CKEDITOR.POSITION_BEFORE_END = 2; // contents^ "text^" -CKEDITOR.POSITION_BEFORE_START = 3; // ^contents ^"text" -CKEDITOR.POSITION_AFTER_END = 4; // contents^ "text" - -CKEDITOR.ENLARGE_ELEMENT = 1; -CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2; -CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3; - -// Check boundary types. -// @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement -CKEDITOR.START = 1; -CKEDITOR.END = 2; -CKEDITOR.STARTEND = 3; - -// Shrink range types. -// @see CKEDITOR.dom.range.prototype.shrink -CKEDITOR.SHRINK_ELEMENT = 1; -CKEDITOR.SHRINK_TEXT = 2; diff --git a/_source/core/dom/rangelist.js b/_source/core/dom/rangelist.js deleted file mode 100644 index 38788a8..0000000 --- a/_source/core/dom/rangelist.js +++ /dev/null @@ -1,213 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - /** - * Represents a list os CKEDITOR.dom.range objects, which can be easily - * iterated sequentially. - * @constructor - * @param {CKEDITOR.dom.range|Array} [ranges] The ranges contained on this list. - * Note that, if an array of ranges is specified, the range sequence - * should match its DOM order. This class will not help to sort them. - */ - CKEDITOR.dom.rangeList = function( ranges ) - { - if ( ranges instanceof CKEDITOR.dom.rangeList ) - return ranges; - - if ( !ranges ) - ranges = []; - else if ( ranges instanceof CKEDITOR.dom.range ) - ranges = [ ranges ]; - - return CKEDITOR.tools.extend( ranges, mixins ); - }; - - var mixins = - /** @lends CKEDITOR.dom.rangeList.prototype */ - { - /** - * Creates an instance of the rangeList iterator, it should be used - * only when the ranges processing could be DOM intrusive, which - * means it may pollute and break other ranges in this list. - * Otherwise, it's enough to just iterate over this array in a for loop. - * @returns {CKEDITOR.dom.rangeListIterator} - */ - createIterator : function() - { - var rangeList = this, - bookmark = CKEDITOR.dom.walker.bookmark(), - guard = function( node ) { return ! ( node.is && node.is( 'tr' ) ); }, - bookmarks = [], - current; - - /** - * @lends CKEDITOR.dom.rangeListIterator.prototype - */ - return { - - /** - * Retrieves the next range in the list. - * @param {Boolean} mergeConsequent Whether join two adjacent ranges into single, e.g. consequent table cells. - */ - getNextRange : function( mergeConsequent ) - { - current = current == undefined ? 0 : current + 1; - - var range = rangeList[ current ]; - - // Multiple ranges might be mangled by each other. - if ( range && rangeList.length > 1 ) - { - // Bookmarking all other ranges on the first iteration, - // the range correctness after it doesn't matter since we'll - // restore them before the next iteration. - if ( !current ) - { - // Make sure bookmark correctness by reverse processing. - for ( var i = rangeList.length - 1; i >= 0; i-- ) - bookmarks.unshift( rangeList[ i ].createBookmark( true ) ); - } - - if ( mergeConsequent ) - { - // Figure out how many ranges should be merged. - var mergeCount = 0; - while ( rangeList[ current + mergeCount + 1 ] ) - { - var doc = range.document, - found = 0, - left = doc.getById( bookmarks[ mergeCount ].endNode ), - right = doc.getById( bookmarks[ mergeCount + 1 ].startNode ), - next; - - // Check subsequent range. - while ( 1 ) - { - next = left.getNextSourceNode( false ); - if ( !right.equals( next ) ) - { - // This could be yet another bookmark or - // walking across block boundaries. - if ( bookmark( next ) || ( next.type == CKEDITOR.NODE_ELEMENT && next.isBlockBoundary() ) ) - { - left = next; - continue; - } - } - else - found = 1; - - break; - } - - if ( !found ) - break; - - mergeCount++; - } - } - - range.moveToBookmark( bookmarks.shift() ); - - // Merge ranges finally after moving to bookmarks. - while( mergeCount-- ) - { - next = rangeList[ ++current ]; - next.moveToBookmark( bookmarks.shift() ); - range.setEnd( next.endContainer, next.endOffset ); - } - } - - return range; - } - }; - }, - - createBookmarks : function( serializable ) - { - var retval = [], bookmark; - for ( var i = 0; i < this.length ; i++ ) - { - retval.push( bookmark = this[ i ].createBookmark( serializable, true) ); - - // Updating the container & offset values for ranges - // that have been touched. - for ( var j = i + 1; j < this.length; j++ ) - { - this[ j ] = updateDirtyRange( bookmark, this[ j ] ); - this[ j ] = updateDirtyRange( bookmark, this[ j ], true ); - } - } - return retval; - }, - - createBookmarks2 : function( normalized ) - { - var bookmarks = []; - - for ( var i = 0 ; i < this.length ; i++ ) - bookmarks.push( this[ i ].createBookmark2( normalized ) ); - - return bookmarks; - }, - - /** - * Move each range in the list to the position specified by a list of bookmarks. - * @param {Array} bookmarks The list of bookmarks, each one matching a range in the list. - */ - moveToBookmarks : function( bookmarks ) - { - for ( var i = 0 ; i < this.length ; i++ ) - this[ i ].moveToBookmark( bookmarks[ i ] ); - } - }; - - // Update the specified range which has been mangled by previous insertion of - // range bookmark nodes.(#3256) - function updateDirtyRange( bookmark, dirtyRange, checkEnd ) - { - var serializable = bookmark.serializable, - container = dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ], - offset = checkEnd ? 'endOffset' : 'startOffset'; - - var bookmarkStart = serializable ? - dirtyRange.document.getById( bookmark.startNode ) - : bookmark.startNode; - - var bookmarkEnd = serializable ? - dirtyRange.document.getById( bookmark.endNode ) - : bookmark.endNode; - - if ( container.equals( bookmarkStart.getPrevious() ) ) - { - dirtyRange.startOffset = dirtyRange.startOffset - - container.getLength() - - bookmarkEnd.getPrevious().getLength(); - container = bookmarkEnd.getNext(); - } - else if ( container.equals( bookmarkEnd.getPrevious() ) ) - { - dirtyRange.startOffset = dirtyRange.startOffset - container.getLength(); - container = bookmarkEnd.getNext(); - } - - container.equals( bookmarkStart.getParent() ) && dirtyRange[ offset ]++; - container.equals( bookmarkEnd.getParent() ) && dirtyRange[ offset ]++; - - // Update and return this range. - dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ] = container; - return dirtyRange; - } -})(); - -/** - * (Virtual Class) Do not call this constructor. This class is not really part - * of the API. It just describes the return type of {@link CKEDITOR.dom.rangeList#createIterator}. - * @name CKEDITOR.dom.rangeListIterator - * @constructor - * @example - */ diff --git a/_source/core/dom/text.js b/_source/core/dom/text.js deleted file mode 100644 index 4a66743..0000000 --- a/_source/core/dom/text.js +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.dom.text} class, which represents - * a DOM text node. - */ - -/** - * Represents a DOM text node. - * @constructor - * @augments CKEDITOR.dom.node - * @param {Object|String} text A native DOM text node or a string containing - * the text to use to create a new text node. - * @param {CKEDITOR.dom.document} [ownerDocument] The document that will contain - * the node in case of new node creation. Defaults to the current document. - * @example - * var nativeNode = document.createTextNode( 'Example' ); - * var text = CKEDITOR.dom.text( nativeNode ); - * @example - * var text = CKEDITOR.dom.text( 'Example' ); - */ -CKEDITOR.dom.text = function( text, ownerDocument ) -{ - if ( typeof text == 'string' ) - text = ( ownerDocument ? ownerDocument.$ : document ).createTextNode( text ); - - // Theoretically, we should call the base constructor here - // (not CKEDITOR.dom.node though). But, IE doesn't support expando - // properties on text node, so the features provided by domObject will not - // work for text nodes (which is not a big issue for us). - // - // CKEDITOR.dom.domObject.call( this, element ); - - /** - * The native DOM text node represented by this class instance. - * @type Object - * @example - * var element = new CKEDITOR.dom.text( 'Example' ); - * alert( element.$.nodeType ); // "3" - */ - this.$ = text; -}; - -CKEDITOR.dom.text.prototype = new CKEDITOR.dom.node(); - -CKEDITOR.tools.extend( CKEDITOR.dom.text.prototype, - /** @lends CKEDITOR.dom.text.prototype */ - { - /** - * The node type. This is a constant value set to - * {@link CKEDITOR.NODE_TEXT}. - * @type Number - * @example - */ - type : CKEDITOR.NODE_TEXT, - - getLength : function() - { - return this.$.nodeValue.length; - }, - - getText : function() - { - return this.$.nodeValue; - }, - - setText : function( text ) - { - this.$.nodeValue = text; - }, - - /** - * Breaks this text node into two nodes at the specified offset, - * keeping both in the tree as siblings. This node then only contains - * all the content up to the offset point. A new text node, which is - * inserted as the next sibling of this node, contains all the content - * at and after the offset point. When the offset is equal to the - * length of this node, the new node has no data. - * @param {Number} The position at which to split, starting from zero. - * @returns {CKEDITOR.dom.text} The new text node. - */ - split : function( offset ) - { - // If the offset is after the last char, IE creates the text node - // on split, but don't include it into the DOM. So, we have to do - // that manually here. - if ( CKEDITOR.env.ie && offset == this.getLength() ) - { - var next = this.getDocument().createText( '' ); - next.insertAfter( this ); - return next; - } - - var doc = this.getDocument(); - var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc ); - - // IE BUG: IE8 does not update the childNodes array in DOM after splitText(), - // we need to make some DOM changes to make it update. (#3436) - if ( CKEDITOR.env.ie8 ) - { - var workaround = new CKEDITOR.dom.text( '', doc ); - workaround.insertAfter( retval ); - workaround.remove(); - } - - return retval; - }, - - /** - * Extracts characters from indexA up to but not including indexB. - * @param {Number} indexA An integer between 0 and one less than the - * length of the text. - * @param {Number} [indexB] An integer between 0 and the length of the - * string. If omitted, extracts characters to the end of the text. - */ - substring : function( indexA, indexB ) - { - // We need the following check due to a Firefox bug - // https://bugzilla.mozilla.org/show_bug.cgi?id=458886 - if ( typeof indexB != 'number' ) - return this.$.nodeValue.substr( indexA ); - else - return this.$.nodeValue.substring( indexA, indexB ); - } - }); diff --git a/_source/core/dom/walker.js b/_source/core/dom/walker.js deleted file mode 100644 index 569ac57..0000000 --- a/_source/core/dom/walker.js +++ /dev/null @@ -1,520 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - // This function is to be called under a "walker" instance scope. - function iterate( rtl, breakOnFalse ) - { - var range = this.range; - - // Return null if we have reached the end. - if ( this._.end ) - return null; - - // This is the first call. Initialize it. - if ( !this._.start ) - { - this._.start = 1; - - // A collapsed range must return null at first call. - if ( range.collapsed ) - { - this.end(); - return null; - } - - // Move outside of text node edges. - range.optimize(); - } - - var node, - startCt = range.startContainer, - endCt = range.endContainer, - startOffset = range.startOffset, - endOffset = range.endOffset, - guard, - userGuard = this.guard, - type = this.type, - getSourceNodeFn = ( rtl ? 'getPreviousSourceNode' : 'getNextSourceNode' ); - - // Create the LTR guard function, if necessary. - if ( !rtl && !this._.guardLTR ) - { - // The node that stops walker from moving up. - var limitLTR = endCt.type == CKEDITOR.NODE_ELEMENT ? - endCt : - endCt.getParent(); - - // The node that stops the walker from going to next. - var blockerLTR = endCt.type == CKEDITOR.NODE_ELEMENT ? - endCt.getChild( endOffset ) : - endCt.getNext(); - - this._.guardLTR = function( node, movingOut ) - { - return ( ( !movingOut || !limitLTR.equals( node ) ) - && ( !blockerLTR || !node.equals( blockerLTR ) ) - && ( node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body' ) ); - }; - } - - // Create the RTL guard function, if necessary. - if ( rtl && !this._.guardRTL ) - { - // The node that stops walker from moving up. - var limitRTL = startCt.type == CKEDITOR.NODE_ELEMENT ? - startCt : - startCt.getParent(); - - // The node that stops the walker from going to next. - var blockerRTL = startCt.type == CKEDITOR.NODE_ELEMENT ? - startOffset ? - startCt.getChild( startOffset - 1 ) : null : - startCt.getPrevious(); - - this._.guardRTL = function( node, movingOut ) - { - return ( ( !movingOut || !limitRTL.equals( node ) ) - && ( !blockerRTL || !node.equals( blockerRTL ) ) - && ( node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body' ) ); - }; - } - - // Define which guard function to use. - var stopGuard = rtl ? this._.guardRTL : this._.guardLTR; - - // Make the user defined guard function participate in the process, - // otherwise simply use the boundary guard. - if ( userGuard ) - { - guard = function( node, movingOut ) - { - if ( stopGuard( node, movingOut ) === false ) - return false; - - return userGuard( node, movingOut ); - }; - } - else - guard = stopGuard; - - if ( this.current ) - node = this.current[ getSourceNodeFn ]( false, type, guard ); - else - { - // Get the first node to be returned. - if ( rtl ) - { - node = endCt; - - if ( node.type == CKEDITOR.NODE_ELEMENT ) - { - if ( endOffset > 0 ) - node = node.getChild( endOffset - 1 ); - else - node = ( guard ( node, true ) === false ) ? - null : node.getPreviousSourceNode( true, type, guard ); - } - } - else - { - node = startCt; - - if ( node.type == CKEDITOR.NODE_ELEMENT ) - { - if ( ! ( node = node.getChild( startOffset ) ) ) - node = ( guard ( startCt, true ) === false ) ? - null : startCt.getNextSourceNode( true, type, guard ) ; - } - } - - if ( node && guard( node ) === false ) - node = null; - } - - while ( node && !this._.end ) - { - this.current = node; - - if ( !this.evaluator || this.evaluator( node ) !== false ) - { - if ( !breakOnFalse ) - return node; - } - else if ( breakOnFalse && this.evaluator ) - return false; - - node = node[ getSourceNodeFn ]( false, type, guard ); - } - - this.end(); - return this.current = null; - } - - function iterateToLast( rtl ) - { - var node, last = null; - - while ( ( node = iterate.call( this, rtl ) ) ) - last = node; - - return last; - } - - CKEDITOR.dom.walker = CKEDITOR.tools.createClass( - { - /** - * Utility class to "walk" the DOM inside a range boundaries. If - * necessary, partially included nodes (text nodes) are broken to - * reflect the boundaries limits, so DOM and range changes may happen. - * Outside changes to the range may break the walker. - * - * The walker may return nodes that are not totaly included into the - * range boundaires. Let's take the following range representation, - * where the square brackets indicate the boundaries: - * - * [<p>Some <b>sample] text</b> - * - * While walking forward into the above range, the following nodes are - * returned: <p>, "Some ", <b> and "sample". Going - * backwards instead we have: "sample" and "Some ". So note that the - * walker always returns nodes when "entering" them, but not when - * "leaving" them. The guard function is instead called both when - * entering and leaving nodes. - * - * @constructor - * @param {CKEDITOR.dom.range} range The range within which walk. - */ - $ : function( range ) - { - this.range = range; - - /** - * A function executed for every matched node, to check whether - * it's to be considered into the walk or not. If not provided, all - * matched nodes are considered good. - * If the function returns "false" the node is ignored. - * @name CKEDITOR.dom.walker.prototype.evaluator - * @property - * @type Function - */ - // this.evaluator = null; - - /** - * A function executed for every node the walk pass by to check - * whether the walk is to be finished. It's called when both - * entering and exiting nodes, as well as for the matched nodes. - * If this function returns "false", the walking ends and no more - * nodes are evaluated. - * @name CKEDITOR.dom.walker.prototype.guard - * @property - * @type Function - */ - // this.guard = null; - - /** @private */ - this._ = {}; - }, - -// statics : -// { -// /* Creates a CKEDITOR.dom.walker instance to walk inside DOM boundaries set by nodes. -// * @param {CKEDITOR.dom.node} startNode The node from wich the walk -// * will start. -// * @param {CKEDITOR.dom.node} [endNode] The last node to be considered -// * in the walk. No more nodes are retrieved after touching or -// * passing it. If not provided, the walker stops at the -// * <body> closing boundary. -// * @returns {CKEDITOR.dom.walker} A DOM walker for the nodes between the -// * provided nodes. -// */ -// createOnNodes : function( startNode, endNode, startInclusive, endInclusive ) -// { -// var range = new CKEDITOR.dom.range(); -// if ( startNode ) -// range.setStartAt( startNode, startInclusive ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END ) ; -// else -// range.setStartAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_AFTER_START ) ; -// -// if ( endNode ) -// range.setEndAt( endNode, endInclusive ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START ) ; -// else -// range.setEndAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_BEFORE_END ) ; -// -// return new CKEDITOR.dom.walker( range ); -// } -// }, -// - proto : - { - /** - * Stop walking. No more nodes are retrieved if this function gets - * called. - */ - end : function() - { - this._.end = 1; - }, - - /** - * Retrieves the next node (at right). - * @returns {CKEDITOR.dom.node} The next node or null if no more - * nodes are available. - */ - next : function() - { - return iterate.call( this ); - }, - - /** - * Retrieves the previous node (at left). - * @returns {CKEDITOR.dom.node} The previous node or null if no more - * nodes are available. - */ - previous : function() - { - return iterate.call( this, 1 ); - }, - - /** - * Check all nodes at right, executing the evaluation fuction. - * @returns {Boolean} "false" if the evaluator function returned - * "false" for any of the matched nodes. Otherwise "true". - */ - checkForward : function() - { - return iterate.call( this, 0, 1 ) !== false; - }, - - /** - * Check all nodes at left, executing the evaluation fuction. - * @returns {Boolean} "false" if the evaluator function returned - * "false" for any of the matched nodes. Otherwise "true". - */ - checkBackward : function() - { - return iterate.call( this, 1, 1 ) !== false; - }, - - /** - * Executes a full walk forward (to the right), until no more nodes - * are available, returning the last valid node. - * @returns {CKEDITOR.dom.node} The last node at the right or null - * if no valid nodes are available. - */ - lastForward : function() - { - return iterateToLast.call( this ); - }, - - /** - * Executes a full walk backwards (to the left), until no more nodes - * are available, returning the last valid node. - * @returns {CKEDITOR.dom.node} The last node at the left or null - * if no valid nodes are available. - */ - lastBackward : function() - { - return iterateToLast.call( this, 1 ); - }, - - reset : function() - { - delete this.current; - this._ = {}; - } - - } - }); - - /* - * Anything whose display computed style is block, list-item, table, - * table-row-group, table-header-group, table-footer-group, table-row, - * table-column-group, table-column, table-cell, table-caption, or whose node - * name is hr, br (when enterMode is br only) is a block boundary. - */ - var blockBoundaryDisplayMatch = - { - 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 - }; - - CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) - { - var nodeNameMatches = customNodeNames ? - CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} ) : - CKEDITOR.dtd.$block; - - // Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297) - return this.getComputedStyle( 'float' ) == 'none' && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] - || nodeNameMatches[ this.getName() ]; - }; - - CKEDITOR.dom.walker.blockBoundary = function( customNodeNames ) - { - return function( node , type ) - { - return ! ( node.type == CKEDITOR.NODE_ELEMENT - && node.isBlockBoundary( customNodeNames ) ); - }; - }; - - CKEDITOR.dom.walker.listItemBoundary = function() - { - return this.blockBoundary( { br : 1 } ); - }; - - /** - * Whether the to-be-evaluated node is a bookmark node OR bookmark node - * inner contents. - * @param {Boolean} contentOnly Whether only test againt the text content of - * bookmark node instead of the element itself(default). - * @param {Boolean} isReject Whether should return 'false' for the bookmark - * node instead of 'true'(default). - */ - CKEDITOR.dom.walker.bookmark = function( contentOnly, isReject ) - { - function isBookmarkNode( node ) - { - return ( node && node.getName - && node.getName() == 'span' - && node.data( 'cke-bookmark' ) ); - } - - return function( node ) - { - var isBookmark, parent; - // Is bookmark inner text node? - isBookmark = ( node && !node.getName && ( parent = node.getParent() ) - && isBookmarkNode( parent ) ); - // Is bookmark node? - isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node ); - return !! ( isReject ^ isBookmark ); - }; - }; - - /** - * Whether the node is a text node containing only whitespaces characters. - * @param isReject - */ - CKEDITOR.dom.walker.whitespaces = function( isReject ) - { - return function( node ) - { - var isWhitespace; - if ( node && node.type == CKEDITOR.NODE_TEXT ) - { - // whitespace, as well as the text cursor filler node we used in Webkit. (#9384) - isWhitespace = !CKEDITOR.tools.trim( node.getText() ) || - CKEDITOR.env.webkit && node.getText() == '\u200b'; - } - - return !! ( isReject ^ isWhitespace ); - }; - }; - - /** - * Whether the node is invisible in wysiwyg mode. - * @param isReject - */ - CKEDITOR.dom.walker.invisible = function( isReject ) - { - var whitespace = CKEDITOR.dom.walker.whitespaces(); - return function( node ) - { - var invisible; - - if ( whitespace( node ) ) - invisible = 1; - else - { - // Visibility should be checked on element. - if ( node.type == CKEDITOR.NODE_TEXT ) - node = node.getParent(); - - // Nodes that take no spaces in wysiwyg: - // 1. White-spaces but not including NBSP; - // 2. Empty inline elements, e.g. we're checking here - // 'offsetHeight' instead of 'offsetWidth' for properly excluding - // all sorts of empty paragraph, e.g.
      . - invisible = !node.$.offsetHeight; - } - - return !! ( isReject ^ invisible ); - }; - }; - - CKEDITOR.dom.walker.nodeType = function( type, isReject ) - { - return function( node ) - { - return !! ( isReject ^ ( node.type == type ) ); - }; - }; - - CKEDITOR.dom.walker.bogus = function( isReject ) - { - function nonEmpty( node ) - { - return !isWhitespaces( node ) && !isBookmark( node ); - } - - return function( node ) - { - var isBogus = !CKEDITOR.env.ie ? node.is && node.is( 'br' ) : - node.getText && tailNbspRegex.test( node.getText() ); - - if ( isBogus ) - { - var parent = node.getParent(), next = node.getNext( nonEmpty ); - isBogus = parent.isBlockBoundary() && - ( !next || - next.type == CKEDITOR.NODE_ELEMENT && - next.isBlockBoundary() ); - } - - return !! ( isReject ^ isBogus ); - }; - }; - - var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/, - isWhitespaces = CKEDITOR.dom.walker.whitespaces(), - isBookmark = CKEDITOR.dom.walker.bookmark(), - toSkip = function( node ) - { - return isBookmark( node ) - || isWhitespaces( node ) - || node.type == CKEDITOR.NODE_ELEMENT - && node.getName() in CKEDITOR.dtd.$inline - && !( node.getName() in CKEDITOR.dtd.$empty ); - }; - - // Check if there's a filler node at the end of an element, and return it. - CKEDITOR.dom.element.prototype.getBogus = function() - { - // Bogus are not always at the end, e.g.

      text

      (#7070). - var tail = this; - do { tail = tail.getPreviousSourceNode(); } - while ( toSkip( tail ) ) - - if ( tail && ( !CKEDITOR.env.ie ? tail.is && tail.is( 'br' ) - : tail.getText && tailNbspRegex.test( tail.getText() ) ) ) - { - return tail; - } - return false; - }; - -})(); diff --git a/_source/core/dom/window.js b/_source/core/dom/window.js deleted file mode 100644 index 813cd20..0000000 --- a/_source/core/dom/window.js +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.dom.document} class, which - * represents a DOM document. - */ - -/** - * Represents a DOM window. - * @constructor - * @augments CKEDITOR.dom.domObject - * @param {Object} domWindow A native DOM window. - * @example - * var document = new CKEDITOR.dom.window( window ); - */ -CKEDITOR.dom.window = function( domWindow ) -{ - CKEDITOR.dom.domObject.call( this, domWindow ); -}; - -CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject(); - -CKEDITOR.tools.extend( CKEDITOR.dom.window.prototype, - /** @lends CKEDITOR.dom.window.prototype */ - { - /** - * Moves the selection focus to this window. - * @function - * @example - * var win = new CKEDITOR.dom.window( window ); - * win.focus(); - */ - focus : function() - { - // Webkit is sometimes failed to focus iframe, blur it first(#3835). - if ( CKEDITOR.env.webkit && this.$.parent ) - this.$.parent.focus(); - this.$.focus(); - }, - - /** - * Gets the width and height of this window's viewable area. - * @function - * @returns {Object} An object with the "width" and "height" - * properties containing the size. - * @example - * var win = new CKEDITOR.dom.window( window ); - * var size = win.getViewPaneSize(); - * alert( size.width ); - * alert( size.height ); - */ - getViewPaneSize : function() - { - var doc = this.$.document, - stdMode = doc.compatMode == 'CSS1Compat'; - return { - width : ( stdMode ? doc.documentElement.clientWidth : doc.body.clientWidth ) || 0, - height : ( stdMode ? doc.documentElement.clientHeight : doc.body.clientHeight ) || 0 - }; - }, - - /** - * Gets the current position of the window's scroll. - * @function - * @returns {Object} An object with the "x" and "y" properties - * containing the scroll position. - * @example - * var win = new CKEDITOR.dom.window( window ); - * var pos = win.getScrollPosition(); - * alert( pos.x ); - * alert( pos.y ); - */ - getScrollPosition : function() - { - var $ = this.$; - - if ( 'pageXOffset' in $ ) - { - return { - x : $.pageXOffset || 0, - y : $.pageYOffset || 0 - }; - } - else - { - var doc = $.document; - return { - x : doc.documentElement.scrollLeft || doc.body.scrollLeft || 0, - y : doc.documentElement.scrollTop || doc.body.scrollTop || 0 - }; - } - } - }); diff --git a/_source/core/dtd.js b/_source/core/dtd.js deleted file mode 100644 index 76260b2..0000000 --- a/_source/core/dtd.js +++ /dev/null @@ -1,266 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.dtd} object, which holds the DTD - * mapping for XHTML 1.0 Transitional. This file was automatically - * generated from the file: xhtml1-transitional.dtd. - */ - -/** - * @namespace Holds and object representation of the HTML DTD to be used by the - * editor in its internal operations.
      - *
      - * Each element in the DTD is represented by a property in this object. Each - * property contains the list of elements that can be contained by the element. - * Text is represented by the "#" property.
      - *
      - * Several special grouping properties are also available. Their names start - * with the "$" character. - * @example - * // Check if "div" can be contained in a "p" element. - * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false" - * @example - * // Check if "p" can be contained in a "div" element. - * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true" - * @example - * // Check if "p" is a block element. - * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true" - */ -CKEDITOR.dtd = (function() -{ - var X = CKEDITOR.tools.extend, - - A = {isindex:1,fieldset:1}, - B = {input:1,button:1,select:1,textarea:1,label:1}, - C = X({a:1},B), - D = X({iframe:1},C), - E = {hr:1,ul:1,menu:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1}, - F = {ins:1,del:1,script:1,style:1}, - G = X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1,wbr:1},F), - H = X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1,mark:1},G), - I = X({p:1},H), - J = X({iframe:1},H,B), - K = {img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1}, - - L = X({a:1},J), - M = {tr:1}, - N = {'#':1}, - O = X({param:1},K), - P = X({form:1},A,D,E,I), - Q = {li:1}, - R = {style:1,script:1}, - S = {base:1,link:1,meta:1,title:1}, - T = X(S,R), - U = {head:1,body:1}, - V = {html:1}; - - var block = {address:1,blockquote:1,center:1,dir:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1}; - - return /** @lends CKEDITOR.dtd */ { - - // The "$" items have been added manually. - - // List of elements living outside body. - $nonBodyContent: X(V,U,S), - - /** - * List of block elements, like "p" or "div". - * @type Object - * @example - */ - $block : block, - - /** - * List of block limit elements. - * @type Object - * @example - */ - $blockLimit : { body:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,td:1,th:1,caption:1,form:1 }, - - /** - * List of inline (<span> like) elements. - */ - $inline : L, // Just like span. - - /** - * list of elements that can be children at <body>. - */ - $body : X({script:1,style:1}, block), - - $cdata : {script:1,style:1}, - - /** - * List of empty (self-closing) elements, like "br" or "img". - * @type Object - * @example - */ - $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1}, - - /** - * List of list item elements, like "li" or "dd". - * @type Object - * @example - */ - $listItem : {dd:1,dt:1,li:1}, - - /** - * List of list root elements. - * @type Object - * @example - */ - $list: {ul:1,ol:1,dl:1}, - - /** - * Elements that accept text nodes, but are not possible to edit into - * the browser. - * @type Object - * @example - */ - $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1,audio:1,video:1}, - - /** - * List of block tags with each one a singleton element lives in the corresponding structure for description. - */ - $captionBlock : { caption:1, legend:1 }, - - /** - * List of elements that can be ignored if empty, like "b" or "span". - * @type Object - * @example - */ - $removeEmpty : {abbr:1,acronym:1,address: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,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1,mark:1}, - - /** - * List of elements that have tabindex set to zero by default. - * @type Object - * @example - */ - $tabIndex : {a:1,area:1,button:1,input:1,object:1,select:1,textarea:1}, - - /** - * List of elements used inside the "table" element, like "tbody" or "td". - * @type Object - * @example - */ - $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}, - - html: U, - head: T, - style: N, - script: N, - body: P, - base: {}, - link: {}, - meta: {}, - title: N, - col : {}, - tr : {td:1,th:1}, - img : {}, - colgroup : {col:1}, - noscript : P, - td : P, - br : {}, - wbr : {}, - th : P, - center : P, - kbd : L, - button : X(I,E), - basefont : {}, - h5 : L, - h4 : L, - samp : L, - h6 : L, - ol : Q, - h1 : L, - h3 : L, - option : N, - h2 : L, - form : X(A,D,E,I), - select : {optgroup:1,option:1}, - font : L, - ins : L, - menu : Q, - abbr : L, - label : L, - table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}, - code : L, - tfoot : M, - cite : L, - li : P, - input : {}, - iframe : P, - strong : L, - textarea : N, - noframes : P, - big : L, - small : L, - span : L, - hr : {}, - dt : L, - sub : L, - optgroup : {option:1}, - param : {}, - bdo : L, - 'var' : L, - div : P, - object : O, - sup : L, - dd : P, - strike : L, - area : {}, - dir : Q, - map : X({area:1,form:1,p:1},A,F,E), - applet : O, - dl : {dt:1,dd:1}, - del : L, - isindex : {}, - fieldset : X({legend:1},K), - thead : M, - ul : Q, - acronym : L, - b : L, - a : J, - blockquote : P, - caption : L, - i : L, - u : L, - tbody : M, - s : L, - address : X(D,I), - tt : L, - legend : L, - q : L, - pre : X(G,C), - p : L, - em : L, - dfn : L, - //HTML5 - section : P, - header : P, - footer : P, - nav : P, - article : P, - aside : P, - figure: P, - dialog : P, - hgroup : P, - mark : L, - time : L, - meter : L, - menu : L, - command : L, - keygen : L, - output : L, - progress : O, - audio : O, - video : O, - details : O, - datagrid : O, - datalist : O - }; -})(); - -// PACKAGER_RENAME( CKEDITOR.dtd ) diff --git a/_source/core/editor.js b/_source/core/editor.js deleted file mode 100644 index 41276a9..0000000 --- a/_source/core/editor.js +++ /dev/null @@ -1,1059 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.editor} class, which represents an - * editor instance. - */ - -(function() -{ - // The counter for automatic instance names. - var nameCounter = 0; - - var getNewName = function() - { - var name = 'editor' + ( ++nameCounter ); - return ( CKEDITOR.instances && CKEDITOR.instances[ name ] ) ? getNewName() : name; - }; - - // ##### START: Config Privates - - // These function loads custom configuration files and cache the - // CKEDITOR.editorConfig functions defined on them, so there is no need to - // download them more than once for several instances. - var loadConfigLoaded = {}; - var loadConfig = function( editor ) - { - var customConfig = editor.config.customConfig; - - // Check if there is a custom config to load. - if ( !customConfig ) - return false; - - customConfig = CKEDITOR.getUrl( customConfig ); - - var loadedConfig = loadConfigLoaded[ customConfig ] || ( loadConfigLoaded[ customConfig ] = {} ); - - // If the custom config has already been downloaded, reuse it. - if ( loadedConfig.fn ) - { - // Call the cached CKEDITOR.editorConfig defined in the custom - // config file for the editor instance depending on it. - loadedConfig.fn.call( editor, editor.config ); - - // If there is no other customConfig in the chain, fire the - // "configLoaded" event. - if ( CKEDITOR.getUrl( editor.config.customConfig ) == customConfig || !loadConfig( editor ) ) - editor.fireOnce( 'customConfigLoaded' ); - } - else - { - // Load the custom configuration file. - CKEDITOR.scriptLoader.load( customConfig, function() - { - // If the CKEDITOR.editorConfig function has been properly - // defined in the custom configuration file, cache it. - if ( CKEDITOR.editorConfig ) - loadedConfig.fn = CKEDITOR.editorConfig; - else - loadedConfig.fn = function(){}; - - // Call the load config again. This time the custom - // config is already cached and so it will get loaded. - loadConfig( editor ); - }); - } - - return true; - }; - - var initConfig = function( editor, instanceConfig ) - { - // Setup the lister for the "customConfigLoaded" event. - editor.on( 'customConfigLoaded', function() - { - if ( instanceConfig ) - { - // Register the events that may have been set at the instance - // configuration object. - if ( instanceConfig.on ) - { - for ( var eventName in instanceConfig.on ) - { - editor.on( eventName, instanceConfig.on[ eventName ] ); - } - } - - // Overwrite the settings from the in-page config. - CKEDITOR.tools.extend( editor.config, instanceConfig, true ); - - delete editor.config.on; - } - - onConfigLoaded( editor ); - }); - - // The instance config may override the customConfig setting to avoid - // loading the default ~/config.js file. - if ( instanceConfig && instanceConfig.customConfig != undefined ) - editor.config.customConfig = instanceConfig.customConfig; - - // Load configs from the custom configuration files. - if ( !loadConfig( editor ) ) - editor.fireOnce( 'customConfigLoaded' ); - }; - - // ##### END: Config Privates - - var onConfigLoaded = function( editor ) - { - // Set config related properties. - - var skin = editor.config.skin.split( ',' ), - skinName = skin[ 0 ], - skinPath = CKEDITOR.getUrl( skin[ 1 ] || ( - '_source/' + // @Packager.RemoveLine - 'skins/' + skinName + '/' ) ); - - /** - * The name of the skin used by this editor instance. The skin name can - * be set through the {@link CKEDITOR.config.skin} setting. - * @name CKEDITOR.editor.prototype.skinName - * @type String - * @example - * alert( editor.skinName ); // E.g. "kama" - */ - editor.skinName = skinName; - - /** - * The full URL of the skin directory. - * @name CKEDITOR.editor.prototype.skinPath - * @type String - * @example - * alert( editor.skinPath ); // E.g. "http://example.com/ckeditor/skins/kama/" - */ - editor.skinPath = skinPath; - - /** - * The CSS class name used for skin identification purposes. - * @name CKEDITOR.editor.prototype.skinClass - * @type String - * @example - * alert( editor.skinClass ); // E.g. "cke_skin_kama" - */ - editor.skinClass = 'cke_skin_' + skinName; - - /** - * The tabbing - * navigation order that has been calculated for this editor - * instance. This can be set by the {@link CKEDITOR.config.tabIndex} - * setting or taken from the tabindex attribute of the - * {@link #element} associated with the editor. - * @name CKEDITOR.editor.prototype.tabIndex - * @type Number - * @default 0 (zero) - * @example - * alert( editor.tabIndex ); // E.g. "0" - */ - editor.tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; - - /** - * Indicates the read-only state of this editor. This is a read-only property. - * @name CKEDITOR.editor.prototype.readOnly - * @type Boolean - * @since 3.6 - * @see CKEDITOR.editor#setReadOnly - */ - editor.readOnly = !!( editor.config.readOnly || editor.element.getAttribute( 'disabled' ) ); - - // Fire the "configLoaded" event. - editor.fireOnce( 'configLoaded' ); - - // Load language file. - loadSkin( editor ); - }; - - var loadLang = function( editor ) - { - CKEDITOR.lang.load( editor.config.language, editor.config.defaultLanguage, function( languageCode, lang ) - { - /** - * The code for the language resources that have been loaded - * for the user interface elements of this editor instance. - * @name CKEDITOR.editor.prototype.langCode - * @type String - * @example - * alert( editor.langCode ); // E.g. "en" - */ - editor.langCode = languageCode; - - /** - * An object that contains all language strings used by the editor - * interface. - * @name CKEDITOR.editor.prototype.lang - * @type CKEDITOR.lang - * @example - * alert( editor.lang.bold ); // E.g. "Negrito" (if the language is set to Portuguese) - */ - // As we'll be adding plugin specific entries that could come - // from different language code files, we need a copy of lang, - // not a direct reference to it. - editor.lang = CKEDITOR.tools.prototypedCopy( lang ); - - // We're not able to support RTL in Firefox 2 at this time. - if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' ) - editor.lang.dir = 'ltr'; - - editor.fire( 'langLoaded' ); - - var config = editor.config; - config.contentsLangDirection == 'ui' && ( config.contentsLangDirection = editor.lang.dir ); - - loadPlugins( editor ); - }); - }; - - var loadPlugins = function( editor ) - { - var config = editor.config, - plugins = config.plugins, - extraPlugins = config.extraPlugins, - removePlugins = config.removePlugins; - - if ( extraPlugins ) - { - // Remove them first to avoid duplications. - var removeRegex = new RegExp( '(?:^|,)(?:' + extraPlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); - plugins = plugins.replace( removeRegex, '' ); - - plugins += ',' + extraPlugins; - } - - if ( removePlugins ) - { - removeRegex = new RegExp( '(?:^|,)(?:' + removePlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); - plugins = plugins.replace( removeRegex, '' ); - } - - // Load the Adobe AIR plugin conditionally. - CKEDITOR.env.air && ( plugins += ',adobeair' ); - - // Load all plugins defined in the "plugins" setting. - CKEDITOR.plugins.load( plugins.split( ',' ), function( plugins ) - { - // The list of plugins. - var pluginsArray = []; - - // The language code to get loaded for each plugin. Null - // entries will be appended for plugins with no language files. - var languageCodes = []; - - // The list of URLs to language files. - var languageFiles = []; - - /** - * An object that contains references to all plugins used by this - * editor instance. - * @name CKEDITOR.editor.prototype.plugins - * @type Object - * @example - * alert( editor.plugins.dialog.path ); // E.g. "http://example.com/ckeditor/plugins/dialog/" - */ - editor.plugins = plugins; - - // Loop through all plugins, to build the list of language - // files to get loaded. - for ( var pluginName in plugins ) - { - var plugin = plugins[ pluginName ], - pluginLangs = plugin.lang, - pluginPath = CKEDITOR.plugins.getPath( pluginName ), - lang = null; - - // Set the plugin path in the plugin. - plugin.path = pluginPath; - - // If the plugin has "lang". - if ( pluginLangs ) - { - // Resolve the plugin language. If the current language - // is not available, get the first one (default one). - lang = ( CKEDITOR.tools.indexOf( pluginLangs, editor.langCode ) >= 0 ? editor.langCode : pluginLangs[ 0 ] ); - - if ( !plugin.langEntries || !plugin.langEntries[ lang ] ) - { - // Put the language file URL into the list of files to - // get downloaded. - languageFiles.push( CKEDITOR.getUrl( pluginPath + 'lang/' + lang + '.js' ) ); - } - else - { - CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ lang ] ); - lang = null; - } - } - - // Save the language code, so we know later which - // language has been resolved to this plugin. - languageCodes.push( lang ); - - pluginsArray.push( plugin ); - } - - // Load all plugin specific language files in a row. - CKEDITOR.scriptLoader.load( languageFiles, function() - { - // Initialize all plugins that have the "beforeInit" and "init" methods defined. - var methods = [ 'beforeInit', 'init', 'afterInit' ]; - for ( var m = 0 ; m < methods.length ; m++ ) - { - for ( var i = 0 ; i < pluginsArray.length ; i++ ) - { - var plugin = pluginsArray[ i ]; - - // Uses the first loop to update the language entries also. - if ( m === 0 && languageCodes[ i ] && plugin.lang ) - CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ languageCodes[ i ] ] ); - - // Call the plugin method (beforeInit and init). - if ( plugin[ methods[ m ] ] ) - plugin[ methods[ m ] ]( editor ); - } - } - - // Load the editor skin. - editor.fire( 'pluginsLoaded' ); - loadTheme( editor ); - }); - }); - }; - - var loadSkin = function( editor ) - { - CKEDITOR.skins.load( editor, 'editor', function() - { - loadLang( editor ); - }); - }; - - var loadTheme = function( editor ) - { - var theme = editor.config.theme; - CKEDITOR.themes.load( theme, function() - { - /** - * The theme used by this editor instance. - * @name CKEDITOR.editor.prototype.theme - * @type CKEDITOR.theme - * @example - * alert( editor.theme ); // E.g. "http://example.com/ckeditor/themes/default/" - */ - var editorTheme = editor.theme = CKEDITOR.themes.get( theme ); - editorTheme.path = CKEDITOR.themes.getPath( theme ); - editorTheme.build( editor ); - - if ( editor.config.autoUpdateElement ) - attachToForm( editor ); - }); - }; - - var attachToForm = function( editor ) - { - var element = editor.element; - - // If are replacing a textarea, we must - if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.is( 'textarea' ) ) - { - var form = element.$.form && new CKEDITOR.dom.element( element.$.form ); - if ( form ) - { - function onSubmit() - { - editor.updateElement(); - } - form.on( 'submit',onSubmit ); - - // Setup the submit function because it doesn't fire the - // "submit" event. - if ( !form.$.submit.nodeName && !form.$.submit.length ) - { - form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit ) - { - return function() - { - editor.updateElement(); - - // For IE, the DOM submit function is not a - // function, so we need thid check. - if ( originalSubmit.apply ) - originalSubmit.apply( this, arguments ); - else - originalSubmit(); - }; - }); - } - - // Remove 'submit' events registered on form element before destroying.(#3988) - editor.on( 'destroy', function() - { - form.removeListener( 'submit', onSubmit ); - } ); - } - } - }; - - function updateCommands() - { - var command, - commands = this._.commands, - mode = this.mode; - - if ( !mode ) - return; - - for ( var name in commands ) - { - command = commands[ name ]; - command[ command.startDisabled ? 'disable' : - this.readOnly && !command.readOnly ? 'disable' : command.modes[ mode ] ? 'enable' : 'disable' ](); - } - } - - /** - * Initializes the editor instance. This function is called by the editor - * contructor (editor_basic.js). - * @private - */ - CKEDITOR.editor.prototype._init = function() - { - // Get the properties that have been saved in the editor_base - // implementation. - var element = CKEDITOR.dom.element.get( this._.element ), - instanceConfig = this._.instanceConfig; - delete this._.element; - delete this._.instanceConfig; - - this._.commands = {}; - this._.styles = []; - - /** - * The DOM element that was replaced by this editor instance. This - * element stores the editor data on load and post. - * @name CKEDITOR.editor.prototype.element - * @type CKEDITOR.dom.element - * @example - * var editor = CKEDITOR.instances.editor1; - * alert( editor.element.getName() ); // E.g. "textarea" - */ - this.element = element; - - /** - * The editor instance name. It may be the replaced element ID, name, or - * a default name using the progressive counter (editor1, - * editor2, ...). - * @name CKEDITOR.editor.prototype.name - * @type String - * @example - * var editor = CKEDITOR.instances.editor1; - * alert( editor.name ); // "editor1" - */ - this.name = ( element && ( this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) - && ( element.getId() || element.getNameAtt() ) ) - || getNewName(); - - if ( this.name in CKEDITOR.instances ) - throw '[CKEDITOR.editor] The instance "' + this.name + '" already exists.'; - - /** - * A unique random string assigned to each editor instance on the page. - * @name CKEDITOR.editor.prototype.id - * @type String - */ - this.id = CKEDITOR.tools.getNextId(); - - /** - * The configurations for this editor instance. It inherits all - * settings defined in (@link CKEDITOR.config}, combined with settings - * loaded from custom configuration files and those defined inline in - * the page when creating the editor. - * @name CKEDITOR.editor.prototype.config - * @type Object - * @example - * var editor = CKEDITOR.instances.editor1; - * alert( editor.config.theme ); // E.g. "default" - */ - this.config = CKEDITOR.tools.prototypedCopy( CKEDITOR.config ); - - /** - * The namespace containing UI features related to this editor instance. - * @name CKEDITOR.editor.prototype.ui - * @type CKEDITOR.ui - * @example - */ - this.ui = new CKEDITOR.ui( this ); - - /** - * Controls the focus state of this editor instance. This property - * is rarely used for normal API operations. It is mainly - * intended for developers adding UI elements to the editor interface. - * @name CKEDITOR.editor.prototype.focusManager - * @type CKEDITOR.focusManager - * @example - */ - this.focusManager = new CKEDITOR.focusManager( this ); - - CKEDITOR.fire( 'instanceCreated', null, this ); - - this.on( 'mode', updateCommands, null, null, 1 ); - this.on( 'readOnly', updateCommands, null, null, 1 ); - - initConfig( this, instanceConfig ); - }; -})(); - -CKEDITOR.tools.extend( CKEDITOR.editor.prototype, - /** @lends CKEDITOR.editor.prototype */ - { - /** - * Adds a command definition to the editor instance. Commands added with - * this function can be executed later with the {@link #execCommand} method. - * @param {String} commandName The indentifier name of the command. - * @param {CKEDITOR.commandDefinition} commandDefinition The command definition. - * @example - * editorInstance.addCommand( 'sample', - * { - * exec : function( editor ) - * { - * alert( 'Executing a command for the editor name "' + editor.name + '"!' ); - * } - * }); - */ - addCommand : function( commandName, commandDefinition ) - { - return this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition ); - }, - - /** - * Adds a piece of CSS code to the editor which will be applied to the WYSIWYG editing document. - * This CSS would not be added to the output, and is there mainly for editor-specific editing requirements. - * Note: This function should be called before the editor is loaded to take effect. - * @param css {String} CSS text. - * @example - * editorInstance.addCss( 'body { background-color: grey; }' ); - */ - addCss : function( css ) - { - this._.styles.push( css ); - }, - - /** - * Destroys the editor instance, releasing all resources used by it. - * If the editor replaced an element, the element will be recovered. - * @param {Boolean} [noUpdate] If the instance is replacing a DOM - * element, this parameter indicates whether or not to update the - * element with the instance contents. - * @example - * alert( CKEDITOR.instances.editor1 ); // E.g "object" - * CKEDITOR.instances.editor1.destroy(); - * alert( CKEDITOR.instances.editor1 ); // "undefined" - */ - destroy : function( noUpdate ) - { - if ( !noUpdate ) - this.updateElement(); - - this.fire( 'destroy' ); - this.theme && this.theme.destroy( this ); - - CKEDITOR.remove( this ); - CKEDITOR.fire( 'instanceDestroyed', null, this ); - }, - - /** - * Executes a command associated with the editor. - * @param {String} commandName The indentifier name of the command. - * @param {Object} [data] Data to be passed to the command. - * @returns {Boolean} true if the command was executed - * successfully, otherwise false. - * @see CKEDITOR.editor.addCommand - * @example - * editorInstance.execCommand( 'bold' ); - */ - execCommand : function( commandName, data ) - { - var command = this.getCommand( commandName ); - - var eventData = - { - name: commandName, - commandData: data, - command: command - }; - - if ( command && command.state != CKEDITOR.TRISTATE_DISABLED ) - { - if ( this.fire( 'beforeCommandExec', eventData ) !== true ) - { - eventData.returnValue = command.exec( eventData.commandData ); - - // Fire the 'afterCommandExec' immediately if command is synchronous. - if ( !command.async && this.fire( 'afterCommandExec', eventData ) !== true ) - return eventData.returnValue; - } - } - - // throw 'Unknown command name "' + commandName + '"'; - return false; - }, - - /** - * Gets one of the registered commands. Note that after registering a - * command definition with {@link #addCommand}, it is - * transformed internally into an instance of - * {@link CKEDITOR.command}, which will then be returned - * by this function. - * @param {String} commandName The name of the command to be returned. - * This is the same name that is used to register the command with - * addCommand. - * @returns {CKEDITOR.command} The command object identified by the - * provided name. - */ - getCommand : function( commandName ) - { - return this._.commands[ commandName ]; - }, - - /** - * Gets the editor data. The data will be in raw format. It is the same - * data that is posted by the editor. - * @type String - * @returns (String) The editor data. - * @example - * if ( CKEDITOR.instances.editor1.getData() == '' ) - * alert( 'There is no data available' ); - */ - getData : function() - { - this.fire( 'beforeGetData' ); - - var eventData = this._.data; - - if ( typeof eventData != 'string' ) - { - var element = this.element; - if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) - eventData = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); - else - eventData = ''; - } - - eventData = { dataValue : eventData }; - - // Fire "getData" so data manipulation may happen. - this.fire( 'getData', eventData ); - - return eventData.dataValue; - }, - - /** - * Gets the "raw data" currently available in the editor. This is a - * fast method which returns the data as is, without processing, so it is - * not recommended to use it on resulting pages. Instead it can be used - * combined with the {@link #loadSnapshot} method in order - * to be able to automatically save the editor data from time to time - * while the user is using the editor, to avoid data loss, without risking - * performance issues. - * @see CKEDITOR.editor.getData - * @example - * alert( editor.getSnapshot() ); - */ - getSnapshot : function() - { - var data = this.fire( 'getSnapshot' ); - - if ( typeof data != 'string' ) - { - var element = this.element; - if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) - data = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); - } - - return data; - }, - - /** - * Loads "raw data" into the editor. The data is loaded with processing - * straight to the editing area. It should not be used as a way to load - * any kind of data, but instead in combination with - * {@link #getSnapshot} produced data. - * @see CKEDITOR.editor.setData - * @example - * var data = editor.getSnapshot(); - * editor.loadSnapshot( data ); - */ - loadSnapshot : function( snapshot ) - { - this.fire( 'loadSnapshot', snapshot ); - }, - - /** - * Sets the editor data. The data must be provided in the raw format (HTML).
      - *
      - * Note that this method is asynchronous. The callback parameter must - * be used if interaction with the editor is needed after setting the data. - * @param {String} data HTML code to replace the curent content in the - * editor. - * @param {Function} callback Function to be called after the setData - * is completed. - *@param {Boolean} internal Whether to suppress any event firing when copying data - * internally inside the editor. - * @example - * CKEDITOR.instances.editor1.setData( '<p>This is the editor data.</p>' ); - * @example - * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() - * { - * this.checkDirty(); // true - * }); - */ - setData : function( data , callback, internal ) - { - if( callback ) - { - this.on( 'dataReady', function( evt ) - { - evt.removeListener(); - callback.call( evt.editor ); - } ); - } - - // Fire "setData" so data manipulation may happen. - var eventData = { dataValue : data }; - !internal && this.fire( 'setData', eventData ); - - this._.data = eventData.dataValue; - - !internal && this.fire( 'afterSetData', eventData ); - }, - - /** - * Puts or restores the editor into read-only state. When in read-only, - * the user is not able to change the editor contents, but can still use - * some editor features. This function sets the {@link CKEDITOR.config.readOnly} - * property of the editor, firing the {@link CKEDITOR.editor#readOnly} event.

      - * Note: the current editing area will be reloaded. - * @param {Boolean} [isReadOnly] Indicates that the editor must go - * read-only (true, default) or be restored and made editable - * (false). - * @since 3.6 - */ - setReadOnly : function( isReadOnly ) - { - isReadOnly = ( isReadOnly == undefined ) || isReadOnly; - - if ( this.readOnly != isReadOnly ) - { - this.readOnly = isReadOnly; - - // Fire the readOnly event so the editor features can update - // their state accordingly. - this.fire( 'readOnly' ); - } - }, - - /** - * Inserts HTML code into the currently selected position in the editor in WYSIWYG mode. - * @param {String} data HTML code to be inserted into the editor. - * @example - * CKEDITOR.instances.editor1.insertHtml( '<p>This is a new paragraph.</p>' ); - */ - insertHtml : function( data ) - { - this.fire( 'insertHtml', data ); - }, - - /** - * Insert text content into the currently selected position in the - * editor in WYSIWYG mode. The styles of the selected element will be applied to the inserted text. - * Spaces around the text will be leaving untouched. - * Note: two subsequent line-breaks will introduce one paragraph. This depends on {@link CKEDITOR.config.enterMode}; - * A single line-break will be instead translated into one <br />. - * @since 3.5 - * @param {String} text Text to be inserted into the editor. - * @example - * CKEDITOR.instances.editor1.insertText( ' line1 \n\n line2' ); - */ - insertText : function( text ) - { - this.fire( 'insertText', text ); - }, - - /** - * Inserts an element into the currently selected position in the - * editor in WYSIWYG mode. - * @param {CKEDITOR.dom.element} element The element to be inserted - * into the editor. - * @example - * var element = CKEDITOR.dom.element.createFromHtml( '<img src="hello.png" border="0" title="Hello" />' ); - * CKEDITOR.instances.editor1.insertElement( element ); - */ - insertElement : function( element ) - { - this.fire( 'insertElement', element ); - }, - - /** - * Checks whether the current editor contents contain changes when - * compared to the contents loaded into the editor at startup, or to - * the contents available in the editor when {@link #resetDirty} - * was called. - * @returns {Boolean} "true" is the contents contain changes. - * @example - * function beforeUnload( e ) - * { - * if ( CKEDITOR.instances.editor1.checkDirty() ) - * return e.returnValue = "You will lose the changes made in the editor."; - * } - * - * if ( window.addEventListener ) - * window.addEventListener( 'beforeunload', beforeUnload, false ); - * else - * window.attachEvent( 'onbeforeunload', beforeUnload ); - */ - checkDirty : function() - { - return ( this.mayBeDirty && this._.previousValue !== this.getSnapshot() ); - }, - - /** - * Resets the "dirty state" of the editor so subsequent calls to - * {@link #checkDirty} will return false if the user will not - * have made further changes to the contents. - * @example - * alert( editor.checkDirty() ); // E.g. "true" - * editor.resetDirty(); - * alert( editor.checkDirty() ); // "false" - */ - resetDirty : function() - { - if ( this.mayBeDirty ) - this._.previousValue = this.getSnapshot(); - }, - - /** - * Updates the <textarea> element that was replaced by the editor with - * the current data available in the editor. - * @see CKEDITOR.editor.element - * @example - * CKEDITOR.instances.editor1.updateElement(); - * alert( document.getElementById( 'editor1' ).value ); // The current editor data. - */ - updateElement : function() - { - var element = this.element; - if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) - { - var data = this.getData(); - - if ( this.config.htmlEncodeOutput ) - data = CKEDITOR.tools.htmlEncode( data ); - - if ( element.is( 'textarea' ) ) - element.setValue( data ); - else - element.setHtml( data ); - } - } - }); - -CKEDITOR.on( 'loaded', function() - { - // Run the full initialization for pending editors. - var pending = CKEDITOR.editor._pending; - if ( pending ) - { - delete CKEDITOR.editor._pending; - - for ( var i = 0 ; i < pending.length ; i++ ) - pending[ i ]._init(); - } - }); - -/** - * Whether to escape HTML when the editor updates the original input element. - * @name CKEDITOR.config.htmlEncodeOutput - * @since 3.1 - * @type Boolean - * @default false - * @example - * config.htmlEncodeOutput = true; - */ - -/** - * If true, makes the editor start in read-only state. Otherwise, it will check - * if the linked <textarea> element has the disabled attribute. - * @name CKEDITOR.config.readOnly - * @see CKEDITOR.editor#setReadOnly - * @type Boolean - * @default false - * @since 3.6 - * @example - * config.readOnly = true; - */ - -/** - * Fired when a CKEDITOR instance is created, but still before initializing it. - * To interact with a fully initialized instance, use the - * {@link CKEDITOR#instanceReady} event instead. - * @name CKEDITOR#instanceCreated - * @event - * @param {CKEDITOR.editor} editor The editor instance that has been created. - */ - -/** - * Fired when a CKEDITOR instance is destroyed. - * @name CKEDITOR#instanceDestroyed - * @event - * @param {CKEDITOR.editor} editor The editor instance that has been destroyed. - */ - -/** - * Fired when the language is loaded into the editor instance. - * @name CKEDITOR.editor#langLoaded - * @event - * @since 3.6.1 - * @param {CKEDITOR.editor} editor This editor instance. - */ - -/** - * Fired when all plugins are loaded and initialized into the editor instance. - * @name CKEDITOR.editor#pluginsLoaded - * @event - * @param {CKEDITOR.editor} editor This editor instance. - */ - -/** - * Fired before the command execution when {@link #execCommand} is called. - * @name CKEDITOR.editor#beforeCommandExec - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} data.name The command name. - * @param {Object} data.commandData The data to be sent to the command. This - * can be manipulated by the event listener. - * @param {CKEDITOR.command} data.command The command itself. - */ - -/** - * Fired after the command execution when {@link #execCommand} is called. - * @name CKEDITOR.editor#afterCommandExec - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} data.name The command name. - * @param {Object} data.commandData The data sent to the command. - * @param {CKEDITOR.command} data.command The command itself. - * @param {Object} data.returnValue The value returned by the command execution. - */ - -/** - * Fired when the custom configuration file is loaded, before the final - * configurations initialization.
      - *
      - * Custom configuration files can be loaded thorugh the - * {@link CKEDITOR.config.customConfig} setting. Several files can be loaded - * by changing this setting. - * @name CKEDITOR.editor#customConfigLoaded - * @event - * @param {CKEDITOR.editor} editor This editor instance. - */ - -/** - * Fired once the editor configuration is ready (loaded and processed). - * @name CKEDITOR.editor#configLoaded - * @event - * @param {CKEDITOR.editor} editor This editor instance. - */ - -/** - * Fired when this editor instance is destroyed. The editor at this - * point is not usable and this event should be used to perform the clean-up - * in any plugin. - * @name CKEDITOR.editor#destroy - * @event - */ - -/** - * Internal event to get the current data. - * @name CKEDITOR.editor#beforeGetData - * @event - */ - -/** - * Internal event to perform the #getSnapshot call. - * @name CKEDITOR.editor#getSnapshot - * @event - */ - -/** - * Internal event to perform the #loadSnapshot call. - * @name CKEDITOR.editor#loadSnapshot - * @event - */ - -/** - * Event fired before the #getData call returns allowing additional manipulation. - * @name CKEDITOR.editor#getData - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} data.dataValue The data that will be returned. - */ - -/** - * Event fired before the #setData call is executed allowing additional manipulation. - * @name CKEDITOR.editor#setData - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} data.dataValue The data that will be used. - */ - -/** - * Event fired at the end of the #setData call execution. Usually it is better to use the - * {@link CKEDITOR.editor.prototype.dataReady} event. - * @name CKEDITOR.editor#afterSetData - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} data.dataValue The data that has been set. - */ - -/** - * Internal event to perform the #insertHtml call - * @name CKEDITOR.editor#insertHtml - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} data The HTML to insert. - */ - -/** - * Internal event to perform the #insertText call - * @name CKEDITOR.editor#insertText - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {String} text The text to insert. - */ - -/** - * Internal event to perform the #insertElement call - * @name CKEDITOR.editor#insertElement - * @event - * @param {CKEDITOR.editor} editor This editor instance. - * @param {Object} element The element to insert. - */ - -/** - * Event fired after the {@link CKEDITOR.editor#readOnly} property changes. - * @name CKEDITOR.editor#readOnly - * @event - * @since 3.6 - * @param {CKEDITOR.editor} editor This editor instance. - */ diff --git a/_source/core/editor_basic.js b/_source/core/editor_basic.js deleted file mode 100644 index 3372380..0000000 --- a/_source/core/editor_basic.js +++ /dev/null @@ -1,186 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -if ( !CKEDITOR.editor ) -{ - /** - * No element is linked to the editor instance. - * @constant - * @example - */ - CKEDITOR.ELEMENT_MODE_NONE = 0; - - /** - * The element is to be replaced by the editor instance. - * @constant - * @example - */ - CKEDITOR.ELEMENT_MODE_REPLACE = 1; - - /** - * The editor is to be created inside the element. - * @constant - * @example - */ - CKEDITOR.ELEMENT_MODE_APPENDTO = 2; - - /** - * Creates an editor class instance. This constructor should be rarely - * used, in favor of the {@link CKEDITOR} editor creation functions. - * @ class Represents an editor instance. - * @param {Object} instanceConfig Configuration values for this specific - * instance. - * @param {CKEDITOR.dom.element} [element] The element linked to this - * instance. - * @param {Number} [mode] The mode in which the element is linked to this - * instance. See {@link #elementMode}. - * @param {String} [data] Since 3.3. Initial value for the instance. - * @augments CKEDITOR.event - * @example - */ - CKEDITOR.editor = function( instanceConfig, element, mode, data ) - { - this._ = - { - // Save the config to be processed later by the full core code. - instanceConfig : instanceConfig, - element : element, - data : data - }; - - /** - * The mode in which the {@link #element} is linked to this editor - * instance. It can be any of the following values: - *
        - *
      • {@link CKEDITOR.ELEMENT_MODE_NONE}: No element is linked to the - * editor instance.
      • - *
      • {@link CKEDITOR.ELEMENT_MODE_REPLACE}: The element is to be - * replaced by the editor instance.
      • - *
      • {@link CKEDITOR.ELEMENT_MODE_APPENDTO}: The editor is to be - * created inside the element.
      • - *
      - * @name CKEDITOR.editor.prototype.elementMode - * @type Number - * @example - * var editor = CKEDITOR.replace( 'editor1' ); - * alert( editor.elementMode ); "1" - */ - this.elementMode = mode || CKEDITOR.ELEMENT_MODE_NONE; - - // Call the CKEDITOR.event constructor to initialize this instance. - CKEDITOR.event.call( this ); - - this._init(); - }; - - /** - * Replaces a <textarea> or a DOM element (DIV) with a CKEditor - * instance. For textareas, the initial value in the editor will be the - * textarea value. For DOM elements, their innerHTML will be used - * instead. We recommend using TEXTAREA and DIV elements only. Do not use - * this function directly. Use {@link CKEDITOR.replace} instead. - * @param {Object|String} elementOrIdOrName The DOM element (textarea), its - * ID or name. - * @param {Object} [config] The specific configurations to apply to this - * editor instance. Configurations set here will override global CKEditor - * settings. - * @returns {CKEDITOR.editor} The editor instance created. - * @example - */ - CKEDITOR.editor.replace = function( elementOrIdOrName, config ) - { - var element = elementOrIdOrName; - - if ( typeof element != 'object' ) - { - // Look for the element by id. We accept any kind of element here. - element = document.getElementById( elementOrIdOrName ); - - // Elements that should go into head are unacceptable (#6791). - if ( element && element.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1} ) - element = null; - - // If not found, look for elements by name. In this case we accept only - // textareas. - if ( !element ) - { - var i = 0, - textareasByName = document.getElementsByName( elementOrIdOrName ); - - while ( ( element = textareasByName[ i++ ] ) && element.tagName.toLowerCase() != 'textarea' ) - { /*jsl:pass*/ } - } - - if ( !element ) - throw '[CKEDITOR.editor.replace] The element with id or name "' + elementOrIdOrName + '" was not found.'; - } - - // Do not replace the textarea right now, just hide it. The effective - // replacement will be done by the _init function. - element.style.visibility = 'hidden'; - - // Create the editor instance. - return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_REPLACE ); - }; - - /** - * Creates a new editor instance inside a specific DOM element. Do not use - * this function directly. Use {@link CKEDITOR.appendTo} instead. - * @param {Object|String} elementOrId The DOM element or its ID. - * @param {Object} [config] The specific configurations to apply to this - * editor instance. Configurations set here will override global CKEditor - * settings. - * @param {String} [data] Since 3.3. Initial value for the instance. - * @returns {CKEDITOR.editor} The editor instance created. - * @example - */ - CKEDITOR.editor.appendTo = function( elementOrId, config, data ) - { - var element = elementOrId; - if ( typeof element != 'object' ) - { - element = document.getElementById( elementOrId ); - - if ( !element ) - throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; - } - - // Create the editor instance. - return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO, data ); - }; - - CKEDITOR.editor.prototype = - { - /** - * Initializes the editor instance. This function will be overriden by the - * full CKEDITOR.editor implementation (editor.js). - * @private - */ - _init : function() - { - var pending = CKEDITOR.editor._pending || ( CKEDITOR.editor._pending = [] ); - pending.push( this ); - }, - - // Both fire and fireOnce will always pass this editor instance as the - // "editor" param in CKEDITOR.event.fire. So, we override it to do that - // automaticaly. - - /** @ignore */ - fire : function( eventName, data ) - { - return CKEDITOR.event.prototype.fire.call( this, eventName, data, this ); - }, - - /** @ignore */ - fireOnce : function( eventName, data ) - { - return CKEDITOR.event.prototype.fireOnce.call( this, eventName, data, this ); - } - }; - - // "Inherit" (copy actually) from CKEDITOR.event. - CKEDITOR.event.implementOn( CKEDITOR.editor.prototype, true ); -} diff --git a/_source/core/env.js b/_source/core/env.js deleted file mode 100644 index 9f1f6d6..0000000 --- a/_source/core/env.js +++ /dev/null @@ -1,308 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.env} object, which constains - * environment and browser information. - */ - -if ( !CKEDITOR.env ) -{ - /** - * @namespace Environment and browser information. - */ - CKEDITOR.env = (function() - { - var agent = navigator.userAgent.toLowerCase(); - var opera = window.opera; - - var env = - /** @lends CKEDITOR.env */ - { - /** - * Indicates that CKEditor is running on Internet Explorer. - * @type Boolean - * @example - * if ( CKEDITOR.env.ie ) - * alert( "I'm on IE!" ); - */ - ie : /*@cc_on!@*/false, - - /** - * Indicates that CKEditor is running on Opera. - * @type Boolean - * @example - * if ( CKEDITOR.env.opera ) - * alert( "I'm on Opera!" ); - */ - opera : ( !!opera && opera.version ), - - /** - * Indicates that CKEditor is running on a WebKit based browser, like - * Safari. - * @type Boolean - * @example - * if ( CKEDITOR.env.webkit ) - * alert( "I'm on WebKit!" ); - */ - webkit : ( agent.indexOf( ' applewebkit/' ) > -1 ), - - /** - * Indicates that CKEditor is running on Adobe AIR. - * @type Boolean - * @example - * if ( CKEDITOR.env.air ) - * alert( "I'm on AIR!" ); - */ - air : ( agent.indexOf( ' adobeair/' ) > -1 ), - - /** - * Indicates that CKEditor is running on Macintosh. - * @type Boolean - * @example - * if ( CKEDITOR.env.mac ) - * alert( "I love apples!" ); - */ - mac : ( agent.indexOf( 'macintosh' ) > -1 ), - - /** - * Indicates that CKEditor is running on a quirks mode environemnt. - * @type Boolean - * @example - * if ( CKEDITOR.env.quirks ) - * alert( "Nooooo!" ); - */ - quirks : ( document.compatMode == 'BackCompat' ), - - /** - * Indicates that CKEditor is running on a mobile like environemnt. - * @type Boolean - * @example - * if ( CKEDITOR.env.mobile ) - * alert( "I'm running with CKEditor today!" ); - */ - mobile : ( agent.indexOf( 'mobile' ) > -1 ), - - /** - * Indicates that CKEditor is running on Apple iPhone/iPad/iPod devices. - * @type Boolean - * @example - * if ( CKEDITOR.env.iOS ) - * alert( "I like little apples!" ); - */ - iOS : /(ipad|iphone|ipod)/.test(agent), - - /** - * Indicates that the browser has a custom domain enabled. This has - * been set with "document.domain". - * @returns {Boolean} "true" if a custom domain is enabled. - * @example - * if ( CKEDITOR.env.isCustomDomain() ) - * alert( "I'm in a custom domain!" ); - */ - isCustomDomain : function() - { - if ( !this.ie ) - return false; - - var domain = document.domain, - hostname = window.location.hostname; - - return domain != hostname && - domain != ( '[' + hostname + ']' ); // IPv6 IP support (#5434) - }, - - /** - * Indicates that page is running under an encrypted connection. - * @returns {Boolean} "true" if the page has an encrypted connection. - * @example - * if ( CKEDITOR.env.secure ) - * alert( "I'm in SSL!" ); - */ - secure : location.protocol == 'https:' - }; - - /** - * Indicates that CKEditor is running on a Gecko based browser, like - * Firefox. - * @name CKEDITOR.env.gecko - * @type Boolean - * @example - * if ( CKEDITOR.env.gecko ) - * alert( "I'm riding a gecko!" ); - */ - env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.opera ); - - var version = 0; - - // Internet Explorer 6.0+ - if ( env.ie ) - { - version = parseFloat( agent.match( /msie (\d+)/ )[1] ); - - /** - * Indicates that CKEditor is running on Internet Explorer 8. - * @name CKEDITOR.env.ie8 - * @type Boolean - * @example - * if ( CKEDITOR.env.ie8 ) - * alert( "I'm on IE8!" ); - */ - env.ie8 = !!document.documentMode; - - /** - * Indicates that CKEditor is running on Internet Explorer 8 on - * standards mode. - * @name CKEDITOR.env.ie8Compat - * @type Boolean - * @example - * if ( CKEDITOR.env.ie8Compat ) - * alert( "Now I'm on IE8, for real!" ); - */ - env.ie8Compat = document.documentMode == 8; - - /** - * Indicates that CKEditor is running on Internet Explorer 9's standards mode. - * @name CKEDITOR.env.ie9Compat - * @type Boolean - * @example - * if ( CKEDITOR.env.ie9Compat ) - * alert( "IE9, the beauty of the web!" ); - */ - env.ie9Compat = document.documentMode == 9; - - /** - * Indicates that CKEditor is running on an IE7-like environment, which - * includes IE7 itself and IE8's IE7 document mode. - * @name CKEDITOR.env.ie7Compat - * @type Boolean - * @example - * if ( CKEDITOR.env.ie8Compat ) - * alert( "I'm on IE7 or on an IE7 like IE8!" ); - */ - env.ie7Compat = ( ( version == 7 && !document.documentMode ) - || document.documentMode == 7 ); - - /** - * Indicates that CKEditor is running on an IE6-like environment, which - * includes IE6 itself and IE7 and IE8 quirks mode. - * @name CKEDITOR.env.ie6Compat - * @type Boolean - * @example - * if ( CKEDITOR.env.ie6Compat ) - * alert( "I'm on IE6 or quirks mode!" ); - */ - env.ie6Compat = ( version < 7 || env.quirks ); - } - - // Gecko. - if ( env.gecko ) - { - var geckoRelease = agent.match( /rv:([\d\.]+)/ ); - if ( geckoRelease ) - { - geckoRelease = geckoRelease[1].split( '.' ); - version = geckoRelease[0] * 10000 + ( geckoRelease[1] || 0 ) * 100 + ( geckoRelease[2] || 0 ) * 1; - } - } - - // Opera 9.50+ - if ( env.opera ) - version = parseFloat( opera.version() ); - - // Adobe AIR 1.0+ - // Checked before Safari because AIR have the WebKit rich text editor - // features from Safari 3.0.4, but the version reported is 420. - if ( env.air ) - version = parseFloat( agent.match( / adobeair\/(\d+)/ )[1] ); - - // WebKit 522+ (Safari 3+) - if ( env.webkit ) - version = parseFloat( agent.match( / applewebkit\/(\d+)/ )[1] ); - - /** - * Contains the browser version.
      - *
      - * For gecko based browsers (like Firefox) it contains the revision - * number with first three parts concatenated with a padding zero - * (e.g. for revision 1.9.0.2 we have 10900).
      - *
      - * For webkit based browser (like Safari and Chrome) it contains the - * WebKit build version (e.g. 522). - * @name CKEDITOR.env.version - * @type Boolean - * @example - * if ( CKEDITOR.env.ie && CKEDITOR.env.version <= 6 ) - * alert( "Ouch!" ); - */ - env.version = version; - - /** - * Indicates that CKEditor is running on a compatible browser. - * @name CKEDITOR.env.isCompatible - * @type Boolean - * @example - * if ( CKEDITOR.env.isCompatible ) - * alert( "Your browser is pretty cool!" ); - */ - env.isCompatible = - - // White list of mobile devices that supports. - env.iOS && version >= 534 || - - !env.mobile && ( - - ( env.ie && version >= 6 ) || - ( env.gecko && version >= 10801 ) || - ( env.opera && version >= 9.5 ) || - ( env.air && version >= 1 ) || - ( env.webkit && version >= 522 ) || - false ); - - /** - * The CSS class to be appended on the main UI containers, making it - * easy to apply browser specific styles to it. - * @name CKEDITOR.env.cssClass - * @type String - * @example - * myDiv.className = CKEDITOR.env.cssClass; - */ - env.cssClass = - 'cke_browser_' + ( - env.ie ? 'ie' : - env.gecko ? 'gecko' : - env.opera ? 'opera' : - env.webkit ? 'webkit' : - 'unknown' ); - - if ( env.quirks ) - env.cssClass += ' cke_browser_quirks'; - - if ( env.ie ) - { - env.cssClass += ' cke_browser_ie' + ( - env.version < 7 ? '6' : - env.version >= 8 ? document.documentMode: - '7' ); - - if ( env.quirks ) - env.cssClass += ' cke_browser_iequirks'; - - if ( document.documentMode && document.documentMode >=9 ) - env.cssClass += ' cke_browser_ie9plus'; - } - - if ( env.gecko && version < 10900 ) - env.cssClass += ' cke_browser_gecko18'; - - if ( env.air ) - env.cssClass += ' cke_browser_air'; - - return env; - })(); -} - -// PACKAGER_RENAME( CKEDITOR.env ) -// PACKAGER_RENAME( CKEDITOR.env.ie ) diff --git a/_source/core/event.js b/_source/core/event.js deleted file mode 100644 index 8c1fe96..0000000 --- a/_source/core/event.js +++ /dev/null @@ -1,342 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.event} class, which serves as the - * base for classes and objects that require event handling features. - */ - -if ( !CKEDITOR.event ) -{ - /** - * Creates an event class instance. This constructor is rearely used, being - * the {@link #.implementOn} function used in class prototypes directly - * instead. - * @class This is a base class for classes and objects that require event - * handling features.
      - *
      - * Do not confuse this class with {@link CKEDITOR.dom.event} which is - * instead used for DOM events. The CKEDITOR.event class implements the - * internal event system used by the CKEditor to fire API related events. - * @example - */ - CKEDITOR.event = function() - {}; - - /** - * Implements the {@link CKEDITOR.event} features in an object. - * @param {Object} targetObject The object into which implement the features. - * @example - * var myObject = { message : 'Example' }; - * CKEDITOR.event.implementOn( myObject }; - * myObject.on( 'testEvent', function() - * { - * alert( this.message ); // "Example" - * }); - * myObject.fire( 'testEvent' ); - */ - CKEDITOR.event.implementOn = function( targetObject ) - { - var eventProto = CKEDITOR.event.prototype; - - for ( var prop in eventProto ) - { - if ( targetObject[ prop ] == undefined ) - targetObject[ prop ] = eventProto[ prop ]; - } - }; - - CKEDITOR.event.prototype = (function() - { - // Returns the private events object for a given object. - var getPrivate = function( obj ) - { - var _ = ( obj.getPrivate && obj.getPrivate() ) || obj._ || ( obj._ = {} ); - return _.events || ( _.events = {} ); - }; - - var eventEntry = function( eventName ) - { - this.name = eventName; - this.listeners = []; - }; - - eventEntry.prototype = - { - // Get the listener index for a specified function. - // Returns -1 if not found. - getListenerIndex : function( listenerFunction ) - { - for ( var i = 0, listeners = this.listeners ; i < listeners.length ; i++ ) - { - if ( listeners[i].fn == listenerFunction ) - return i; - } - return -1; - } - }; - - return /** @lends CKEDITOR.event.prototype */ { - /** - * Registers a listener to a specific event in the current object. - * @param {String} eventName The event name to which listen. - * @param {Function} listenerFunction The function listening to the - * event. A single {@link CKEDITOR.eventInfo} object instanced - * is passed to this function containing all the event data. - * @param {Object} [scopeObj] The object used to scope the listener - * call (the this object. If omitted, the current object is used. - * @param {Object} [listenerData] Data to be sent as the - * {@link CKEDITOR.eventInfo#listenerData} when calling the - * listener. - * @param {Number} [priority] The listener priority. Lower priority - * listeners are called first. Listeners with the same priority - * value are called in registration order. Defaults to 10. - * @example - * someObject.on( 'someEvent', function() - * { - * alert( this == someObject ); // "true" - * }); - * @example - * someObject.on( 'someEvent', function() - * { - * alert( this == anotherObject ); // "true" - * } - * , anotherObject ); - * @example - * someObject.on( 'someEvent', function( event ) - * { - * alert( event.listenerData ); // "Example" - * } - * , null, 'Example' ); - * @example - * someObject.on( 'someEvent', function() { ... } ); // 2nd called - * someObject.on( 'someEvent', function() { ... }, null, null, 100 ); // 3rd called - * someObject.on( 'someEvent', function() { ... }, null, null, 1 ); // 1st called - */ - on : function( eventName, listenerFunction, scopeObj, listenerData, priority ) - { - // Get the event entry (create it if needed). - var events = getPrivate( this ), - event = events[ eventName ] || ( events[ eventName ] = new eventEntry( eventName ) ); - - if ( event.getListenerIndex( listenerFunction ) < 0 ) - { - // Get the listeners. - var listeners = event.listeners; - - // Fill the scope. - if ( !scopeObj ) - scopeObj = this; - - // Default the priority, if needed. - if ( isNaN( priority ) ) - priority = 10; - - var me = this; - - // Create the function to be fired for this listener. - var listenerFirer = function( editor, publisherData, stopFn, cancelFn ) - { - var ev = - { - name : eventName, - sender : this, - editor : editor, - data : publisherData, - listenerData : listenerData, - stop : stopFn, - cancel : cancelFn, - removeListener : function() - { - me.removeListener( eventName, listenerFunction ); - } - }; - - listenerFunction.call( scopeObj, ev ); - - return ev.data; - }; - listenerFirer.fn = listenerFunction; - listenerFirer.priority = priority; - - // Search for the right position for this new listener, based on its - // priority. - for ( var i = listeners.length - 1 ; i >= 0 ; i-- ) - { - // Find the item which should be before the new one. - if ( listeners[ i ].priority <= priority ) - { - // Insert the listener in the array. - listeners.splice( i + 1, 0, listenerFirer ); - return; - } - } - - // If no position has been found (or zero length), put it in - // the front of list. - listeners.unshift( listenerFirer ); - } - }, - - /** - * Fires an specific event in the object. All registered listeners are - * called at this point. - * @function - * @param {String} eventName The event name to fire. - * @param {Object} [data] Data to be sent as the - * {@link CKEDITOR.eventInfo#data} when calling the - * listeners. - * @param {CKEDITOR.editor} [editor] The editor instance to send as the - * {@link CKEDITOR.eventInfo#editor} when calling the - * listener. - * @returns {Boolean|Object} A booloan indicating that the event is to be - * canceled, or data returned by one of the listeners. - * @example - * someObject.on( 'someEvent', function() { ... } ); - * someObject.on( 'someEvent', function() { ... } ); - * someObject.fire( 'someEvent' ); // both listeners are called - * @example - * someObject.on( 'someEvent', function( event ) - * { - * alert( event.data ); // "Example" - * }); - * someObject.fire( 'someEvent', 'Example' ); - */ - fire : (function() - { - // Create the function that marks the event as stopped. - var stopped = false; - var stopEvent = function() - { - stopped = true; - }; - - // Create the function that marks the event as canceled. - var canceled = false; - var cancelEvent = function() - { - canceled = true; - }; - - return function( eventName, data, editor ) - { - // Get the event entry. - var event = getPrivate( this )[ eventName ]; - - // Save the previous stopped and cancelled states. We may - // be nesting fire() calls. - var previousStopped = stopped, - previousCancelled = canceled; - - // Reset the stopped and canceled flags. - stopped = canceled = false; - - if ( event ) - { - var listeners = event.listeners; - - if ( listeners.length ) - { - // As some listeners may remove themselves from the - // event, the original array length is dinamic. So, - // let's make a copy of all listeners, so we are - // sure we'll call all of them. - listeners = listeners.slice( 0 ); - - // Loop through all listeners. - for ( var i = 0 ; i < listeners.length ; i++ ) - { - // Call the listener, passing the event data. - var retData = listeners[i].call( this, editor, data, stopEvent, cancelEvent ); - - if ( typeof retData != 'undefined' ) - data = retData; - - // No further calls is stopped or canceled. - if ( stopped || canceled ) - break; - } - } - } - - var ret = canceled || ( typeof data == 'undefined' ? false : data ); - - // Restore the previous stopped and canceled states. - stopped = previousStopped; - canceled = previousCancelled; - - return ret; - }; - })(), - - /** - * Fires an specific event in the object, releasing all listeners - * registered to that event. The same listeners are not called again on - * successive calls of it or of {@link #fire}. - * @param {String} eventName The event name to fire. - * @param {Object} [data] Data to be sent as the - * {@link CKEDITOR.eventInfo#data} when calling the - * listeners. - * @param {CKEDITOR.editor} [editor] The editor instance to send as the - * {@link CKEDITOR.eventInfo#editor} when calling the - * listener. - * @returns {Boolean|Object} A booloan indicating that the event is to be - * canceled, or data returned by one of the listeners. - * @example - * someObject.on( 'someEvent', function() { ... } ); - * someObject.fire( 'someEvent' ); // above listener called - * someObject.fireOnce( 'someEvent' ); // above listener called - * someObject.fire( 'someEvent' ); // no listeners called - */ - fireOnce : function( eventName, data, editor ) - { - var ret = this.fire( eventName, data, editor ); - delete getPrivate( this )[ eventName ]; - return ret; - }, - - /** - * Unregisters a listener function from being called at the specified - * event. No errors are thrown if the listener has not been - * registered previously. - * @param {String} eventName The event name. - * @param {Function} listenerFunction The listener function to unregister. - * @example - * var myListener = function() { ... }; - * someObject.on( 'someEvent', myListener ); - * someObject.fire( 'someEvent' ); // myListener called - * someObject.removeListener( 'someEvent', myListener ); - * someObject.fire( 'someEvent' ); // myListener not called - */ - removeListener : function( eventName, listenerFunction ) - { - // Get the event entry. - var event = getPrivate( this )[ eventName ]; - - if ( event ) - { - var index = event.getListenerIndex( listenerFunction ); - if ( index >= 0 ) - event.listeners.splice( index, 1 ); - } - }, - - /** - * Checks if there is any listener registered to a given event. - * @param {String} eventName The event name. - * @example - * var myListener = function() { ... }; - * someObject.on( 'someEvent', myListener ); - * alert( someObject.hasListeners( 'someEvent' ) ); // "true" - * alert( someObject.hasListeners( 'noEvent' ) ); // "false" - */ - hasListeners : function( eventName ) - { - var event = getPrivate( this )[ eventName ]; - return ( event && event.listeners.length > 0 ) ; - } - }; - })(); -} diff --git a/_source/core/eventInfo.js b/_source/core/eventInfo.js deleted file mode 100644 index 7e39cf4..0000000 --- a/_source/core/eventInfo.js +++ /dev/null @@ -1,132 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the "virtual" {@link CKEDITOR.eventInfo} class, which - * contains the defintions of the event object passed to event listeners. - * This file is for documentation purposes only. - */ - -/** - * (Virtual Class) Do not call this constructor. This class is not really part - * of the API. - * @class Virtual class that illustrates the features of the event object to be - * passed to event listeners by a {@link CKEDITOR.event} based object. - * @name CKEDITOR.eventInfo - * @example - * // Do not do this. - * var myEvent = new CKEDITOR.eventInfo(); // Error: CKEDITOR.eventInfo is undefined - */ - -/** - * The event name. - * @name CKEDITOR.eventInfo.prototype.name - * @field - * @type String - * @example - * someObject.on( 'someEvent', function( event ) - * { - * alert( event.name ); // "someEvent" - * }); - * someObject.fire( 'someEvent' ); - */ - -/** - * The object that publishes (sends) the event. - * @name CKEDITOR.eventInfo.prototype.sender - * @field - * @type Object - * @example - * someObject.on( 'someEvent', function( event ) - * { - * alert( event.sender == someObject ); // "true" - * }); - * someObject.fire( 'someEvent' ); - */ - -/** - * The editor instance that holds the sender. May be the same as sender. May be - * null if the sender is not part of an editor instance, like a component - * running in standalone mode. - * @name CKEDITOR.eventInfo.prototype.editor - * @field - * @type CKEDITOR.editor - * @example - * myButton.on( 'someEvent', function( event ) - * { - * alert( event.editor == myEditor ); // "true" - * }); - * myButton.fire( 'someEvent', null, myEditor ); - */ - -/** - * Any kind of additional data. Its format and usage is event dependent. - * @name CKEDITOR.eventInfo.prototype.data - * @field - * @type Object - * @example - * someObject.on( 'someEvent', function( event ) - * { - * alert( event.data ); // "Example" - * }); - * someObject.fire( 'someEvent', 'Example' ); - */ - -/** - * Any extra data appended during the listener registration. - * @name CKEDITOR.eventInfo.prototype.listenerData - * @field - * @type Object - * @example - * someObject.on( 'someEvent', function( event ) - * { - * alert( event.listenerData ); // "Example" - * } - * , null, 'Example' ); - */ - -/** - * Indicates that no further listeners are to be called. - * @name CKEDITOR.eventInfo.prototype.stop - * @function - * @example - * someObject.on( 'someEvent', function( event ) - * { - * event.stop(); - * }); - * someObject.on( 'someEvent', function( event ) - * { - * // This one will not be called. - * }); - * alert( someObject.fire( 'someEvent' ) ); // "false" - */ - -/** - * Indicates that the event is to be cancelled (if cancelable). - * @name CKEDITOR.eventInfo.prototype.cancel - * @function - * @example - * someObject.on( 'someEvent', function( event ) - * { - * event.cancel(); - * }); - * someObject.on( 'someEvent', function( event ) - * { - * // This one will not be called. - * }); - * alert( someObject.fire( 'someEvent' ) ); // "true" - */ - -/** - * Removes the current listener. - * @name CKEDITOR.eventInfo.prototype.removeListener - * @function - * @example - * someObject.on( 'someEvent', function( event ) - * { - * event.removeListener(); - * // Now this function won't be called again by 'someEvent' - * }); - */ diff --git a/_source/core/focusmanager.js b/_source/core/focusmanager.js deleted file mode 100644 index 902920e..0000000 --- a/_source/core/focusmanager.js +++ /dev/null @@ -1,152 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview Defines the {@link CKEDITOR.focusManager} class, which is used - * to handle the focus on editor instances.. - */ - -/** - * Creates a focusManager class instance. - * @class Manages the focus activity in an editor instance. This class is to be - * used mainly by UI elements coders when adding interface elements that need - * to set the focus state of the editor. - * @param {CKEDITOR.editor} editor The editor instance. - * @example - * var focusManager = new CKEDITOR.focusManager( editor ); - * focusManager.focus(); - */ -CKEDITOR.focusManager = function( editor ) -{ - if ( editor.focusManager ) - return editor.focusManager; - - /** - * Indicates that the editor instance has focus. - * @type Boolean - * @example - * alert( CKEDITOR.instances.editor1.focusManager.hasFocus ); // e.g "true" - */ - this.hasFocus = false; - - /** - * Object used to hold private stuff. - * @private - */ - this._ = - { - editor : editor - }; - - return this; -}; - -CKEDITOR.focusManager.prototype = -{ - /** - * Used to indicate that the editor instance has the focus.
      - *
      - * Note that this function will not explicitelly set the focus in the - * editor (for example, making the caret blinking on it). Use - * {@link CKEDITOR.editor#focus} for it instead. - * @example - * var editor = CKEDITOR.instances.editor1; - * editor.focusManager.focus(); - */ - focus : function() - { - if ( this._.timer ) - clearTimeout( this._.timer ); - - if ( !this.hasFocus ) - { - // If another editor has the current focus, we first "blur" it. In - // this way the events happen in a more logical sequence, like: - // "focus 1" > "blur 1" > "focus 2" - // ... instead of: - // "focus 1" > "focus 2" > "blur 1" - if ( CKEDITOR.currentInstance ) - CKEDITOR.currentInstance.focusManager.forceBlur(); - - var editor = this._.editor; - - editor.container.getChild( 1 ).addClass( 'cke_focus' ); - - this.hasFocus = true; - editor.fire( 'focus' ); - } - }, - - /** - * Used to indicate that the editor instance has lost the focus.
      - *
      - * Note that this functions acts asynchronously with a delay of 100ms to - * avoid subsequent blur/focus effects. If you want the "blur" to happen - * immediately, use the {@link #forceBlur} function instead. - * @example - * var editor = CKEDITOR.instances.editor1; - * editor.focusManager.blur(); - */ - blur : function() - { - var focusManager = this; - - if ( focusManager._.timer ) - clearTimeout( focusManager._.timer ); - - focusManager._.timer = setTimeout( - function() - { - delete focusManager._.timer; - focusManager.forceBlur(); - } - , 100 ); - }, - - /** - * Used to indicate that the editor instance has lost the focus. Unlike - * {@link #blur}, this function is synchronous, marking the instance as - * "blured" immediately. - * @example - * var editor = CKEDITOR.instances.editor1; - * editor.focusManager.forceBlur(); - */ - forceBlur : function() - { - if ( this.hasFocus ) - { - var editor = this._.editor; - - editor.container.getChild( 1 ).removeClass( 'cke_focus' ); - - this.hasFocus = false; - editor.fire( 'blur' ); - } - } -}; - -/** - * Fired when the editor instance receives the input focus. - * @name CKEDITOR.editor#focus - * @event - * @param {CKEDITOR.editor} editor The editor instance. - * @example - * editor.on( 'focus', function( e ) - * { - * alert( 'The editor named ' + e.editor.name + ' is now focused' ); - * }); - */ - -/** - * Fired when the editor instance loses the input focus. - * @name CKEDITOR.editor#blur - * @event - * @param {CKEDITOR.editor} editor The editor instance. - * @example - * editor.on( 'blur', function( e ) - * { - * alert( 'The editor named ' + e.editor.name + ' lost the focus' ); - * }); - */ diff --git a/_source/core/htmlparser.js b/_source/core/htmlparser.js deleted file mode 100644 index 29fee08..0000000 --- a/_source/core/htmlparser.js +++ /dev/null @@ -1,224 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * Creates a {@link CKEDITOR.htmlParser} class instance. - * @class Provides an "event like" system to parse strings of HTML data. - * @example - * var parser = new CKEDITOR.htmlParser(); - * parser.onTagOpen = function( tagName, attributes, selfClosing ) - * { - * alert( tagName ); - * }; - * parser.parse( '<p>Some <b>text</b>.</p>' ); - */ -CKEDITOR.htmlParser = function() -{ - this._ = - { - htmlPartsRegex : new RegExp( '<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:"[^"]*")|(?:\'[^\']*\')|[^"\'>])*)\\/?>))', 'g' ) - }; -}; - -(function() -{ - var attribsRegex = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g, - emptyAttribs = {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}; - - CKEDITOR.htmlParser.prototype = - { - /** - * Function to be fired when a tag opener is found. This function - * should be overriden when using this class. - * @param {String} tagName The tag name. The name is guarantted to be - * lowercased. - * @param {Object} attributes An object containing all tag attributes. Each - * property in this object represent and attribute name and its - * value is the attribute value. - * @param {Boolean} selfClosing true if the tag closes itself, false if the - * tag doesn't. - * @example - * var parser = new CKEDITOR.htmlParser(); - * parser.onTagOpen = function( tagName, attributes, selfClosing ) - * { - * alert( tagName ); // e.g. "b" - * }); - * parser.parse( "<!-- Example --><b>Hello</b>" ); - */ - onTagOpen : function() {}, - - /** - * Function to be fired when a tag closer is found. This function - * should be overriden when using this class. - * @param {String} tagName The tag name. The name is guarantted to be - * lowercased. - * @example - * var parser = new CKEDITOR.htmlParser(); - * parser.onTagClose = function( tagName ) - * { - * alert( tagName ); // e.g. "b" - * }); - * parser.parse( "<!-- Example --><b>Hello</b>" ); - */ - onTagClose : function() {}, - - /** - * Function to be fired when text is found. This function - * should be overriden when using this class. - * @param {String} text The text found. - * @example - * var parser = new CKEDITOR.htmlParser(); - * parser.onText = function( text ) - * { - * alert( text ); // e.g. "Hello" - * }); - * parser.parse( "<!-- Example --><b>Hello</b>" ); - */ - onText : function() {}, - - /** - * Function to be fired when CDATA section is found. This function - * should be overriden when using this class. - * @param {String} cdata The CDATA been found. - * @example - * var parser = new CKEDITOR.htmlParser(); - * parser.onCDATA = function( cdata ) - * { - * alert( cdata ); // e.g. "var hello;" - * }); - * parser.parse( "<script>var hello;</script>" ); - */ - onCDATA : function() {}, - - /** - * Function to be fired when a commend is found. This function - * should be overriden when using this class. - * @param {String} comment The comment text. - * @example - * var parser = new CKEDITOR.htmlParser(); - * parser.onComment = function( comment ) - * { - * alert( comment ); // e.g. " Example " - * }); - * parser.parse( "<!-- Example --><b>Hello</b>" ); - */ - onComment : function() {}, - - /** - * Parses text, looking for HTML tokens, like tag openers or closers, - * or comments. This function fires the onTagOpen, onTagClose, onText - * and onComment function during its execution. - * @param {String} html The HTML to be parsed. - * @example - * var parser = new CKEDITOR.htmlParser(); - * // The onTagOpen, onTagClose, onText and onComment should be overriden - * // at this point. - * parser.parse( "<!-- Example --><b>Hello</b>" ); - */ - parse : function( html ) - { - var parts, - tagName, - nextIndex = 0, - cdata; // The collected data inside a CDATA section. - - while ( ( parts = this._.htmlPartsRegex.exec( html ) ) ) - { - var tagIndex = parts.index; - if ( tagIndex > nextIndex ) - { - var text = html.substring( nextIndex, tagIndex ); - - if ( cdata ) - cdata.push( text ); - else - this.onText( text ); - } - - nextIndex = this._.htmlPartsRegex.lastIndex; - - /* - "parts" is an array with the following items: - 0 : The entire match for opening/closing tags and comments. - 1 : Group filled with the tag name for closing tags. - 2 : Group filled with the comment text. - 3 : Group filled with the tag name for opening tags. - 4 : Group filled with the attributes part of opening tags. - */ - - // Closing tag - if ( ( tagName = parts[ 1 ] ) ) - { - tagName = tagName.toLowerCase(); - - if ( cdata && CKEDITOR.dtd.$cdata[ tagName ] ) - { - // Send the CDATA data. - this.onCDATA( cdata.join('') ); - cdata = null; - } - - if ( !cdata ) - { - this.onTagClose( tagName ); - continue; - } - } - - // If CDATA is enabled, just save the raw match. - if ( cdata ) - { - cdata.push( parts[ 0 ] ); - continue; - } - - // Opening tag - if ( ( tagName = parts[ 3 ] ) ) - { - tagName = tagName.toLowerCase(); - - // There are some tag names that can break things, so let's - // simply ignore them when parsing. (#5224) - if ( /="/.test( tagName ) ) - continue; - - var attribs = {}, - attribMatch, - attribsPart = parts[ 4 ], - selfClosing = !!( attribsPart && attribsPart.charAt( attribsPart.length - 1 ) == '/' ); - - if ( attribsPart ) - { - while ( ( attribMatch = attribsRegex.exec( attribsPart ) ) ) - { - var attName = attribMatch[1].toLowerCase(), - attValue = attribMatch[2] || attribMatch[3] || attribMatch[4] || ''; - - if ( !attValue && emptyAttribs[ attName ] ) - attribs[ attName ] = attName; - else - attribs[ attName ] = attValue; - } - } - - this.onTagOpen( tagName, attribs, selfClosing ); - - // Open CDATA mode when finding the appropriate tags. - if ( !cdata && CKEDITOR.dtd.$cdata[ tagName ] ) - cdata = []; - - continue; - } - - // Comment - if ( ( tagName = parts[ 2 ] ) ) - this.onComment( tagName ); - } - - if ( html.length > nextIndex ) - this.onText( html.substring( nextIndex, html.length ) ); - } - }; -})(); diff --git a/_source/core/htmlparser/basicwriter.js b/_source/core/htmlparser/basicwriter.js deleted file mode 100644 index 269ca8d..0000000 --- a/_source/core/htmlparser/basicwriter.js +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( -{ - $ : function() - { - this._ = - { - output : [] - }; - }, - - proto : - { - /** - * Writes the tag opening part for a opener tag. - * @param {String} tagName The element name for this tag. - * @param {Object} attributes The attributes defined for this tag. The - * attributes could be used to inspect the tag. - * @example - * // Writes "<p". - * writer.openTag( 'p', { class : 'MyClass', id : 'MyId' } ); - */ - openTag : function( tagName, attributes ) - { - this._.output.push( '<', tagName ); - }, - - /** - * Writes the tag closing part for a opener tag. - * @param {String} tagName The element name for this tag. - * @param {Boolean} isSelfClose Indicates that this is a self-closing tag, - * like "br" or "img". - * @example - * // Writes ">". - * writer.openTagClose( 'p', false ); - * @example - * // Writes " />". - * writer.openTagClose( 'br', true ); - */ - openTagClose : function( tagName, isSelfClose ) - { - if ( isSelfClose ) - this._.output.push( ' />' ); - else - this._.output.push( '>' ); - }, - - /** - * Writes an attribute. This function should be called after opening the - * tag with {@link #openTagClose}. - * @param {String} attName The attribute name. - * @param {String} attValue The attribute value. - * @example - * // Writes ' class="MyClass"'. - * writer.attribute( 'class', 'MyClass' ); - */ - attribute : function( attName, attValue ) - { - // Browsers don't always escape special character in attribute values. (#4683, #4719). - if ( typeof attValue == 'string' ) - attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); - - this._.output.push( ' ', attName, '="', attValue, '"' ); - }, - - /** - * Writes a closer tag. - * @param {String} tagName The element name for this tag. - * @example - * // Writes "</p>". - * writer.closeTag( 'p' ); - */ - closeTag : function( tagName ) - { - this._.output.push( '' ); - }, - - /** - * Writes text. - * @param {String} text The text value - * @example - * // Writes "Hello Word". - * writer.text( 'Hello Word' ); - */ - text : function( text ) - { - this._.output.push( text ); - }, - - /** - * Writes a comment. - * @param {String} comment The comment text. - * @example - * // Writes "<!-- My comment -->". - * writer.comment( ' My comment ' ); - */ - comment : function( comment ) - { - this._.output.push( '' ); - }, - - /** - * Writes any kind of data to the ouput. - * @example - * writer.write( 'This is an <b>example</b>.' ); - */ - write : function( data ) - { - this._.output.push( data ); - }, - - /** - * Empties the current output buffer. - * @example - * writer.reset(); - */ - reset : function() - { - this._.output = []; - this._.indent = false; - }, - - /** - * Empties the current output buffer. - * @param {Boolean} reset Indicates that the {@link reset} function is to - * be automatically called after retrieving the HTML. - * @returns {String} The HTML written to the writer so far. - * @example - * var html = writer.getHtml(); - */ - getHtml : function( reset ) - { - var html = this._.output.join( '' ); - - if ( reset ) - this.reset(); - - return html; - } - } -}); diff --git a/_source/core/htmlparser/cdata.js b/_source/core/htmlparser/cdata.js deleted file mode 100644 index b2519cf..0000000 --- a/_source/core/htmlparser/cdata.js +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - - /** - * A lightweight representation of HTML text. - * @constructor - * @example - */ - CKEDITOR.htmlParser.cdata = function( value ) - { - /** - * The CDATA value. - * @type String - * @example - */ - this.value = value; - }; - - CKEDITOR.htmlParser.cdata.prototype = - { - /** - * CDATA has the same type as {@link CKEDITOR.htmlParser.text} This is - * a constant value set to {@link CKEDITOR.NODE_TEXT}. - * @type Number - * @example - */ - type : CKEDITOR.NODE_TEXT, - - /** - * Writes write the CDATA with no special manipulations. - * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. - */ - writeHtml : function( writer ) - { - writer.write( this.value ); - } - }; -})(); diff --git a/_source/core/htmlparser/comment.js b/_source/core/htmlparser/comment.js deleted file mode 100644 index 4ca896d..0000000 --- a/_source/core/htmlparser/comment.js +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * A lightweight representation of an HTML comment. - * @constructor - * @example - */ -CKEDITOR.htmlParser.comment = function( value ) -{ - /** - * The comment text. - * @type String - * @example - */ - this.value = value; - - /** @private */ - this._ = - { - isBlockLike : false - }; -}; - -CKEDITOR.htmlParser.comment.prototype = -{ - /** - * The node type. This is a constant value set to {@link CKEDITOR.NODE_COMMENT}. - * @type Number - * @example - */ - type : CKEDITOR.NODE_COMMENT, - - /** - * Writes the HTML representation of this comment to a CKEDITOR.htmlWriter. - * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. - * @example - */ - writeHtml : function( writer, filter ) - { - var comment = this.value; - - if ( filter ) - { - if ( !( comment = filter.onComment( comment, this ) ) ) - return; - - if ( typeof comment != 'string' ) - { - comment.parent = this.parent; - comment.writeHtml( writer, filter ); - return; - } - } - - writer.comment( comment ); - } -}; diff --git a/_source/core/htmlparser/element.js b/_source/core/htmlparser/element.js deleted file mode 100644 index 9643e0d..0000000 --- a/_source/core/htmlparser/element.js +++ /dev/null @@ -1,306 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * A lightweight representation of an HTML element. - * @param {String} name The element name. - * @param {Object} attributes And object holding all attributes defined for - * this element. - * @constructor - * @example - */ -CKEDITOR.htmlParser.element = function( name, attributes ) -{ - /** - * The element name. - * @type String - * @example - */ - this.name = name; - - /** - * Holds the attributes defined for this element. - * @type Object - * @example - */ - this.attributes = attributes || {}; - - /** - * The nodes that are direct children of this element. - * @type Array - * @example - */ - this.children = []; - - // Reveal the real semantic of our internal custom tag name (#6639), - // when resolving whether it's block like. - var realName = name || '', - prefixed = realName.match( /^cke:(.*)/ ); - prefixed && ( realName = prefixed[ 1 ] ); - - var isBlockLike = !!( CKEDITOR.dtd.$nonBodyContent[ realName ] - || CKEDITOR.dtd.$block[ realName ] - || CKEDITOR.dtd.$listItem[ realName ] - || CKEDITOR.dtd.$tableContent[ realName ] - || CKEDITOR.dtd.$nonEditable[ realName ] - || realName == 'br' ); - - this.isEmpty = !!CKEDITOR.dtd.$empty[ name ]; - this.isUnknown = !CKEDITOR.dtd[ name ]; - - /** @private */ - this._ = - { - isBlockLike : isBlockLike, - hasInlineStarted : this.isEmpty || !isBlockLike - }; -}; - -/** - * Object presentation of CSS style declaration text. - * @param {CKEDITOR.htmlParser.element|String} elementOrStyleText A html parser element or the inline style text. - */ -CKEDITOR.htmlParser.cssStyle = function() -{ - var styleText, - arg = arguments[ 0 ], - rules = {}; - - styleText = arg instanceof CKEDITOR.htmlParser.element ? arg.attributes.style : arg; - - // html-encoded quote might be introduced by 'font-family' - // from MS-Word which confused the following regexp. e.g. - //'font-family: "Lucida, Console"' - ( styleText || '' ) - .replace( /"/g, '"' ) - .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, - function( match, name, value ) - { - name == 'font-family' && ( value = value.replace( /["']/g, '' ) ); - rules[ name.toLowerCase() ] = value; - }); - - return { - - rules : rules, - - /** - * Apply the styles onto the specified element or object. - * @param {CKEDITOR.htmlParser.element|CKEDITOR.dom.element|Object} obj - */ - populate : function( obj ) - { - var style = this.toString(); - if ( style ) - { - obj instanceof CKEDITOR.dom.element ? - obj.setAttribute( 'style', style ) : - obj instanceof CKEDITOR.htmlParser.element ? - obj.attributes.style = style : - obj.style = style; - } - }, - - toString : function() - { - var output = []; - for ( var i in rules ) - rules[ i ] && output.push( i, ':', rules[ i ], ';' ); - return output.join( '' ); - } - }; -}; - -(function() -{ - // Used to sort attribute entries in an array, where the first element of - // each object is the attribute name. - var sortAttribs = function( a, b ) - { - a = a[0]; - b = b[0]; - return a < b ? -1 : a > b ? 1 : 0; - }; - - CKEDITOR.htmlParser.element.prototype = - { - /** - * The node type. This is a constant value set to {@link CKEDITOR.NODE_ELEMENT}. - * @type Number - * @example - */ - type : CKEDITOR.NODE_ELEMENT, - - /** - * Adds a node to the element children list. - * @param {Object} node The node to be added. It can be any of of the - * following types: {@link CKEDITOR.htmlParser.element}, - * {@link CKEDITOR.htmlParser.text} and - * {@link CKEDITOR.htmlParser.comment}. - * @function - * @example - */ - add : CKEDITOR.htmlParser.fragment.prototype.add, - - /** - * Clone this element. - * @returns {CKEDITOR.htmlParser.element} The element clone. - * @example - */ - clone : function() - { - return new CKEDITOR.htmlParser.element( this.name, this.attributes ); - }, - - /** - * Writes the element HTML to a CKEDITOR.htmlWriter. - * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. - * @example - */ - writeHtml : function( writer, filter ) - { - var attributes = this.attributes; - - // Ignore cke: prefixes when writing HTML. - var element = this, - writeName = element.name, - a, newAttrName, value; - - var isChildrenFiltered; - - /** - * Providing an option for bottom-up filtering order ( element - * children to be pre-filtered before the element itself ). - */ - element.filterChildren = function() - { - if ( !isChildrenFiltered ) - { - var writer = new CKEDITOR.htmlParser.basicWriter(); - CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter ); - element.children = new CKEDITOR.htmlParser.fragment.fromHtml( writer.getHtml(), 0, element.clone() ).children; - isChildrenFiltered = 1; - } - }; - - if ( filter ) - { - while ( true ) - { - if ( !( writeName = filter.onElementName( writeName ) ) ) - return; - - element.name = writeName; - - if ( !( element = filter.onElement( element ) ) ) - return; - - element.parent = this.parent; - - if ( element.name == writeName ) - break; - - // If the element has been replaced with something of a - // different type, then make the replacement write itself. - if ( element.type != CKEDITOR.NODE_ELEMENT ) - { - element.writeHtml( writer, filter ); - return; - } - - writeName = element.name; - - // This indicate that the element has been dropped by - // filter but not the children. - if ( !writeName ) - { - // Fix broken parent refs. - for ( var c = 0, length = this.children.length ; c < length ; c++ ) - this.children[ c ].parent = element.parent; - - this.writeChildrenHtml.call( element, writer, isChildrenFiltered ? null : filter ); - return; - } - } - - // The element may have been changed, so update the local - // references. - attributes = element.attributes; - } - - // Open element tag. - writer.openTag( writeName, attributes ); - - // Copy all attributes to an array. - var attribsArray = []; - // Iterate over the attributes twice since filters may alter - // other attributes. - for ( var i = 0 ; i < 2; i++ ) - { - for ( a in attributes ) - { - newAttrName = a; - value = attributes[ a ]; - if ( i == 1 ) - attribsArray.push( [ a, value ] ); - else if ( filter ) - { - while ( true ) - { - if ( !( newAttrName = filter.onAttributeName( a ) ) ) - { - delete attributes[ a ]; - break; - } - else if ( newAttrName != a ) - { - delete attributes[ a ]; - a = newAttrName; - continue; - } - else - break; - } - if ( newAttrName ) - { - if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) - delete attributes[ newAttrName ]; - else - attributes [ newAttrName ] = value; - } - } - } - } - // Sort the attributes by name. - if ( writer.sortAttributes ) - attribsArray.sort( sortAttribs ); - - // Send the attributes. - var len = attribsArray.length; - for ( i = 0 ; i < len ; i++ ) - { - var attrib = attribsArray[ i ]; - writer.attribute( attrib[0], attrib[1] ); - } - - // Close the tag. - writer.openTagClose( writeName, element.isEmpty ); - - if ( !element.isEmpty ) - { - this.writeChildrenHtml.call( element, writer, isChildrenFiltered ? null : filter ); - // Close the element. - writer.closeTag( writeName ); - } - }, - - writeChildrenHtml : function( writer, filter ) - { - // Send children. - CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.apply( this, arguments ); - - } - }; -})(); diff --git a/_source/core/htmlparser/filter.js b/_source/core/htmlparser/filter.js deleted file mode 100644 index afe67df..0000000 --- a/_source/core/htmlparser/filter.js +++ /dev/null @@ -1,288 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass( - { - $ : function( rules ) - { - this._ = - { - elementNames : [], - attributeNames : [], - elements : { $length : 0 }, - attributes : { $length : 0 } - }; - - if ( rules ) - this.addRules( rules, 10 ); - }, - - proto : - { - addRules : function( rules, priority ) - { - if ( typeof priority != 'number' ) - priority = 10; - - // Add the elementNames. - addItemsToList( this._.elementNames, rules.elementNames, priority ); - - // Add the attributeNames. - addItemsToList( this._.attributeNames, rules.attributeNames, priority ); - - // Add the elements. - addNamedItems( this._.elements, rules.elements, priority ); - - // Add the attributes. - addNamedItems( this._.attributes, rules.attributes, priority ); - - // Add the text. - this._.text = transformNamedItem( this._.text, rules.text, priority ) || this._.text; - - // Add the comment. - this._.comment = transformNamedItem( this._.comment, rules.comment, priority ) || this._.comment; - - // Add root fragment. - this._.root = transformNamedItem( this._.root, rules.root, priority ) || this._.root; - }, - - onElementName : function( name ) - { - return filterName( name, this._.elementNames ); - }, - - onAttributeName : function( name ) - { - return filterName( name, this._.attributeNames ); - }, - - onText : function( text ) - { - var textFilter = this._.text; - return textFilter ? textFilter.filter( text ) : text; - }, - - onComment : function( commentText, comment ) - { - var textFilter = this._.comment; - return textFilter ? textFilter.filter( commentText, comment ) : commentText; - }, - - onFragment : function( element ) - { - var rootFilter = this._.root; - return rootFilter ? rootFilter.filter( element ) : element; - }, - - onElement : function( element ) - { - // We must apply filters set to the specific element name as - // well as those set to the generic $ name. So, add both to an - // array and process them in a small loop. - var filters = [ this._.elements[ '^' ], this._.elements[ element.name ], this._.elements.$ ], - filter, ret; - - for ( var i = 0 ; i < 3 ; i++ ) - { - filter = filters[ i ]; - if ( filter ) - { - ret = filter.filter( element, this ); - - if ( ret === false ) - return null; - - if ( ret && ret != element ) - return this.onNode( ret ); - - // The non-root element has been dismissed by one of the filters. - if ( element.parent && !element.name ) - break; - } - } - - return element; - }, - - onNode : function( node ) - { - var type = node.type; - - return type == CKEDITOR.NODE_ELEMENT ? this.onElement( node ) : - type == CKEDITOR.NODE_TEXT ? new CKEDITOR.htmlParser.text( this.onText( node.value ) ) : - type == CKEDITOR.NODE_COMMENT ? new CKEDITOR.htmlParser.comment( this.onComment( node.value ) ): - null; - }, - - onAttribute : function( element, name, value ) - { - var filter = this._.attributes[ name ]; - - if ( filter ) - { - var ret = filter.filter( value, element, this ); - - if ( ret === false ) - return false; - - if ( typeof ret != 'undefined' ) - return ret; - } - - return value; - } - } - }); - - function filterName( name, filters ) - { - for ( var i = 0 ; name && i < filters.length ; i++ ) - { - var filter = filters[ i ]; - name = name.replace( filter[ 0 ], filter[ 1 ] ); - } - return name; - } - - function addItemsToList( list, items, priority ) - { - if ( typeof items == 'function' ) - items = [ items ]; - - var i, j, - listLength = list.length, - itemsLength = items && items.length; - - if ( itemsLength ) - { - // Find the index to insert the items at. - for ( i = 0 ; i < listLength && list[ i ].pri < priority ; i++ ) - { /*jsl:pass*/ } - - // Add all new items to the list at the specific index. - for ( j = itemsLength - 1 ; j >= 0 ; j-- ) - { - var item = items[ j ]; - if ( item ) - { - item.pri = priority; - list.splice( i, 0, item ); - } - } - } - } - - function addNamedItems( hashTable, items, priority ) - { - if ( items ) - { - for ( var name in items ) - { - var current = hashTable[ name ]; - - hashTable[ name ] = - transformNamedItem( - current, - items[ name ], - priority ); - - if ( !current ) - hashTable.$length++; - } - } - } - - function transformNamedItem( current, item, priority ) - { - if ( item ) - { - item.pri = priority; - - if ( current ) - { - // If the current item is not an Array, transform it. - if ( !current.splice ) - { - if ( current.pri > priority ) - current = [ item, current ]; - else - current = [ current, item ]; - - current.filter = callItems; - } - else - addItemsToList( current, item, priority ); - - return current; - } - else - { - item.filter = item; - return item; - } - } - } - - // Invoke filters sequentially on the array, break the iteration - // when it doesn't make sense to continue anymore. - function callItems( currentEntry ) - { - var isNode = currentEntry.type - || currentEntry instanceof CKEDITOR.htmlParser.fragment; - - for ( var i = 0 ; i < this.length ; i++ ) - { - // Backup the node info before filtering. - if ( isNode ) - { - var orgType = currentEntry.type, - orgName = currentEntry.name; - } - - var item = this[ i ], - ret = item.apply( window, arguments ); - - if ( ret === false ) - return ret; - - // We're filtering node (element/fragment). - if ( isNode ) - { - // No further filtering if it's not anymore - // fitable for the subsequent filters. - if ( ret && ( ret.name != orgName - || ret.type != orgType ) ) - { - return ret; - } - } - // Filtering value (nodeName/textValue/attrValue). - else - { - // No further filtering if it's not - // any more values. - if ( typeof ret != 'string' ) - return ret; - } - - ret != undefined && ( currentEntry = ret ); - } - - return currentEntry; - } -})(); - -// "entities" plugin -/* -{ - text : function( text ) - { - // TODO : Process entities. - return text.toUpperCase(); - } -}; -*/ diff --git a/_source/core/htmlparser/fragment.js b/_source/core/htmlparser/fragment.js deleted file mode 100644 index a00ac2e..0000000 --- a/_source/core/htmlparser/fragment.js +++ /dev/null @@ -1,537 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * A lightweight representation of an HTML DOM structure. - * @constructor - * @example - */ -CKEDITOR.htmlParser.fragment = function() -{ - /** - * The nodes contained in the root of this fragment. - * @type Array - * @example - * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( 'Sample Text' ); - * alert( fragment.children.length ); "2" - */ - this.children = []; - - /** - * Get the fragment parent. Should always be null. - * @type Object - * @default null - * @example - */ - this.parent = null; - - /** @private */ - this._ = - { - isBlockLike : true, - hasInlineStarted : false - }; -}; - -(function() -{ - // Block-level elements whose internal structure should be respected during - // parser fixing. - var nonBreakingBlocks = CKEDITOR.tools.extend( { table:1,ul:1,ol:1,dl:1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl ); - - // IE < 8 don't output the close tag on definition list items. (#6975) - var optionalCloseTags = CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? { dd : 1, dt :1 } : {}; - - var listBlocks = { ol:1, ul:1 }; - - // Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan
    1. . - var rootDtd = CKEDITOR.tools.extend( {}, { html: 1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style:1,script:1 } ); - - function isRemoveEmpty( node ) - { - // Empty link is to be removed when empty but not anchor. (#7894) - return node.name == 'a' && node.attributes.href - || CKEDITOR.dtd.$removeEmpty[ node.name ]; - } - - /** - * Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string. - * @param {String} fragmentHtml The HTML to be parsed, filling the fragment. - * @param {Number} [fixForBody=false] Wrap body with specified element if needed. - * @param {CKEDITOR.htmlParser.element} contextNode Parse the html as the content of this element. - * @returns CKEDITOR.htmlParser.fragment The fragment created. - * @example - * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( 'Sample Text' ); - * alert( fragment.children[0].name ); "b" - * alert( fragment.children[1].value ); " Text" - */ - CKEDITOR.htmlParser.fragment.fromHtml = function( fragmentHtml, fixForBody, contextNode ) - { - var parser = new CKEDITOR.htmlParser(), - fragment = contextNode || new CKEDITOR.htmlParser.fragment(), - pendingInline = [], - pendingBRs = [], - currentNode = fragment, - // Indicate we're inside a ' ); - return html.join( '' ); - }; - CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); - }, - - /** - * A single checkbox with a label on the right. - * @constructor - * @extends CKEDITOR.ui.dialog.uiElement - * @example - * @param {CKEDITOR.dialog} dialog - * Parent dialog object. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition - * The element definition. Accepted fields: - *
        - *
      • checked (Optional) Whether the checkbox is checked - * on instantiation. Defaults to false.
      • - *
      • validate (Optional) The validation function.
      • - *
      • label (Optional) The checkbox label.
      • - *
      - * @param {Array} htmlList - * List of HTML code to output to. - */ - checkbox : function( dialog, elementDefinition, htmlList ) - { - if ( arguments.length < 3 ) - return; - - var _ = initPrivateObject.call( this, elementDefinition, { 'default' : !!elementDefinition[ 'default' ] } ); - - if ( elementDefinition.validate ) - this.validate = elementDefinition.validate; - - /** @ignore */ - var innerHTML = function() - { - var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition, - { - id : elementDefinition.id ? elementDefinition.id + '_checkbox' : CKEDITOR.tools.getNextId() + '_checkbox' - }, true ), - html = []; - - var labelId = CKEDITOR.tools.getNextId() + '_label'; - var attributes = { 'class' : 'cke_dialog_ui_checkbox_input', type : 'checkbox', 'aria-labelledby' : labelId }; - cleanInnerDefinition( myDefinition ); - if ( elementDefinition[ 'default' ] ) - attributes.checked = 'checked'; - - if ( typeof myDefinition.inputStyle != 'undefined' ) - myDefinition.style = myDefinition.inputStyle; - - _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes ); - html.push( ' ' ); - return html.join( '' ); - }; - - CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'span', null, null, innerHTML ); - }, - - /** - * A group of radio buttons. - * @constructor - * @example - * @extends CKEDITOR.ui.dialog.labeledElement - * @param {CKEDITOR.dialog} dialog - * Parent dialog object. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition - * The element definition. Accepted fields: - *
        - *
      • default (Required) The default value.
      • - *
      • validate (Optional) The validation function.
      • - *
      • items (Required) An array of options. Each option - * is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' - * is missing, then the value would be assumed to be the same as the - * description.
      • - *
      - * @param {Array} htmlList - * List of HTML code to output to. - */ - radio : function( dialog, elementDefinition, htmlList ) - { - if ( arguments.length < 3) - return; - - initPrivateObject.call( this, elementDefinition ); - if ( !this._['default'] ) - this._['default'] = this._.initValue = elementDefinition.items[0][1]; - if ( elementDefinition.validate ) - this.validate = elementDefinition.valdiate; - var children = [], me = this; - - /** @ignore */ - var innerHTML = function() - { - var inputHtmlList = [], html = [], - commonAttributes = { 'class' : 'cke_dialog_ui_radio_item', 'aria-labelledby' : this._.labelId }, - commonName = elementDefinition.id ? elementDefinition.id + '_radio' : CKEDITOR.tools.getNextId() + '_radio'; - for ( var i = 0 ; i < elementDefinition.items.length ; i++ ) - { - var item = elementDefinition.items[i], - title = item[2] !== undefined ? item[2] : item[0], - value = item[1] !== undefined ? item[1] : item[0], - inputId = CKEDITOR.tools.getNextId() + '_radio_input', - labelId = inputId + '_label', - inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition, - { - id : inputId, - title : null, - type : null - }, true ), - labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition, - { - title : title - }, true ), - inputAttributes = - { - type : 'radio', - 'class' : 'cke_dialog_ui_radio_input', - name : commonName, - value : value, - 'aria-labelledby' : labelId - }, - inputHtml = []; - if ( me._['default'] == value ) - inputAttributes.checked = 'checked'; - cleanInnerDefinition( inputDefinition ); - cleanInnerDefinition( labelDefinition ); - - if ( typeof inputDefinition.inputStyle != 'undefined' ) - inputDefinition.style = inputDefinition.inputStyle; - - children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) ); - inputHtml.push( ' ' ); - new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { id : labelId, 'for' : inputAttributes.id }, - item[0] ); - inputHtmlList.push( inputHtml.join( '' ) ); - } - new CKEDITOR.ui.dialog.hbox( dialog, children, inputHtmlList, html ); - return html.join( '' ); - }; - - CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); - this._.children = children; - }, - - /** - * A button with a label inside. - * @constructor - * @example - * @extends CKEDITOR.ui.dialog.uiElement - * @param {CKEDITOR.dialog} dialog - * Parent dialog object. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition - * The element definition. Accepted fields: - *
        - *
      • label (Required) The button label.
      • - *
      • disabled (Optional) Set to true if you want the - * button to appear in disabled state.
      • - *
      - * @param {Array} htmlList - * List of HTML code to output to. - */ - button : function( dialog, elementDefinition, htmlList ) - { - if ( !arguments.length ) - return; - - if ( typeof elementDefinition == 'function' ) - elementDefinition = elementDefinition( dialog.getParentEditor() ); - - initPrivateObject.call( this, elementDefinition, { disabled : elementDefinition.disabled || false } ); - - // Add OnClick event to this input. - CKEDITOR.event.implementOn( this ); - - var me = this; - - // Register an event handler for processing button clicks. - dialog.on( 'load', function( eventInfo ) - { - var element = this.getElement(); - - (function() - { - element.on( 'click', function( evt ) - { - me.fire( 'click', { dialog : me.getDialog() } ); - evt.data.preventDefault(); - } ); - - element.on( 'keydown', function( evt ) - { - if ( evt.data.getKeystroke() in { 32:1 } ) - { - me.click(); - evt.data.preventDefault(); - } - } ); - })(); - - element.unselectable(); - }, this ); - - var outerDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); - delete outerDefinition.style; - - var labelId = CKEDITOR.tools.getNextId() + '_label'; - CKEDITOR.ui.dialog.uiElement.call( - this, - dialog, - outerDefinition, - htmlList, - 'a', - null, - { - style : elementDefinition.style, - href : 'javascript:void(0)', - title : elementDefinition.label, - hidefocus : 'true', - 'class' : elementDefinition['class'], - role : 'button', - 'aria-labelledby' : labelId - }, - '' + - CKEDITOR.tools.htmlEncode( elementDefinition.label ) + - '' ); - }, - - /** - * A select box. - * @extends CKEDITOR.ui.dialog.uiElement - * @example - * @constructor - * @param {CKEDITOR.dialog} dialog - * Parent dialog object. - * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition - * The element definition. Accepted fields: - *
        - *
      • default (Required) The default value.
      • - *
      • validate (Optional) The validation function.
      • - *
      • items (Required) An array of options. Each option - * is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' - * is missing, then the value would be assumed to be the same as the - * description.
      • - *
      • multiple (Optional) Set this to true if you'd like - * to have a multiple-choice select box.
      • - *
      • size (Optional) The number of items to display in - * the select box.
      • - *
      - * @param {Array} htmlList - * List of HTML code to output to. - */ - select : function( dialog, elementDefinition, htmlList ) - { - if ( arguments.length < 3 ) - return; - - var _ = initPrivateObject.call( this, elementDefinition ); - - if ( elementDefinition.validate ) - this.validate = elementDefinition.validate; - - _.inputId = CKEDITOR.tools.getNextId() + '_select'; - /** @ignore */ - var innerHTML = function() - { - var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition, - { - id : elementDefinition.id ? elementDefinition.id + '_select' : CKEDITOR.tools.getNextId() + '_select' - }, true ), - html = [], - innerHTML = [], - attributes = { 'id' : _.inputId, 'class' : 'cke_dialog_ui_input_select', 'aria-labelledby' : this._.labelId }; - - // Add multiple and size attributes from element definition. - if ( elementDefinition.size != undefined ) - attributes.size = elementDefinition.size; - if ( elementDefinition.multiple != undefined ) - attributes.multiple = elementDefinition.multiple; - - cleanInnerDefinition( myDefinition ); - for ( var i = 0, item ; i < elementDefinition.items.length && ( item = elementDefinition.items[i] ) ; i++ ) - { - innerHTML.push( '
    2. child (nested - // lists) or the next sibling
    3. . - - this._.nextNode = ( block.equals( lastNode ) ? null : getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) ); - } - } - - if ( removePreviousBr ) - { - var previousSibling = block.getPrevious(); - if ( previousSibling && previousSibling.type == CKEDITOR.NODE_ELEMENT ) - { - if ( previousSibling.getName() == 'br' ) - previousSibling.remove(); - else if ( previousSibling.getLast() && previousSibling.getLast().$.nodeName.toLowerCase() == 'br' ) - previousSibling.getLast().remove(); - } - } - - if ( removeLastBr ) - { - var lastChild = block.getLast(); - if ( lastChild && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.getName() == 'br' ) - { - // Take care not to remove the block expanding
      in non-IE browsers. - if ( CKEDITOR.env.ie - || lastChild.getPrevious( bookmarkGuard ) - || lastChild.getNext( bookmarkGuard ) ) - lastChild.remove(); - } - } - - // Get a reference for the next element. This is important because the - // above block can be removed or changed, so we can rely on it for the - // next interation. - if ( !this._.nextNode ) - { - this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null : - getNextSourceNode( block, 1, lastNode ); - } - - return block; - } - }; - - CKEDITOR.dom.range.prototype.createIterator = function() - { - return new iterator( this ); - }; -})(); diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js deleted file mode 100644 index 8676a11..0000000 --- a/_source/plugins/editingblock/plugin.js +++ /dev/null @@ -1,278 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview The default editing block plugin, which holds the editing area - * and source view. - */ - -(function() -{ - // This is a semaphore used to avoid recursive calls between - // the following data handling functions. - var isHandlingData; - - CKEDITOR.plugins.add( 'editingblock', - { - init : function( editor ) - { - if ( !editor.config.editingBlock ) - return; - - editor.on( 'themeSpace', function( event ) - { - if ( event.data.space == 'contents' ) - event.data.html += '
      '; - }); - - editor.on( 'themeLoaded', function() - { - editor.fireOnce( 'editingBlockReady' ); - }); - - editor.on( 'uiReady', function() - { - editor.setMode( editor.config.startupMode ); - }); - - editor.on( 'afterSetData', function() - { - if ( !isHandlingData ) - { - function setData() - { - isHandlingData = true; - editor.getMode().loadData( editor.getData() ); - isHandlingData = false; - } - - if ( editor.mode ) - setData(); - else - { - editor.on( 'mode', function() - { - if ( editor.mode ) - { - setData(); - editor.removeListener( 'mode', arguments.callee ); - } - }); - } - } - }); - - editor.on( 'beforeGetData', function() - { - if ( !isHandlingData && editor.mode ) - { - isHandlingData = true; - editor.setData( editor.getMode().getData(), null, 1 ); - isHandlingData = false; - } - }); - - editor.on( 'getSnapshot', function( event ) - { - if ( editor.mode ) - event.data = editor.getMode().getSnapshotData(); - }); - - editor.on( 'loadSnapshot', function( event ) - { - if ( editor.mode ) - editor.getMode().loadSnapshotData( event.data ); - }); - - // For the first "mode" call, we'll also fire the "instanceReady" - // event. - editor.on( 'mode', function( event ) - { - // 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(); - - // Fire instanceReady for both the editor and CKEDITOR, but - // defer this until the whole execution has completed - // to guarantee the editor is fully responsible. - setTimeout( function(){ - editor.fireOnce( 'instanceReady' ); - CKEDITOR.fire( 'instanceReady', null, editor ); - }, 0 ); - }); - - editor.on( 'destroy', function () - { - // -> currentMode.unload( holderElement ); - if ( this.mode ) - this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) ); - }); - } - }); - - /** - * The current editing mode. An editing mode is basically a viewport for - * editing or content viewing. By default the possible values for this - * property are "wysiwyg" and "source". - * @type String - * @example - * alert( CKEDITOR.instances.editor1.mode ); // "wysiwyg" (e.g.) - */ - CKEDITOR.editor.prototype.mode = ''; - - /** - * Registers an editing mode. This function is to be used mainly by plugins. - * @param {String} mode The mode name. - * @param {Object} modeEditor The mode editor definition. - * @example - */ - CKEDITOR.editor.prototype.addMode = function( mode, modeEditor ) - { - modeEditor.name = mode; - ( this._.modes || ( this._.modes = {} ) )[ mode ] = modeEditor; - }; - - /** - * Sets the current editing mode in this editor instance. - * @param {String} mode A registered mode name. - * @example - * // Switch to "source" view. - * CKEDITOR.instances.editor1.setMode( 'source' ); - */ - CKEDITOR.editor.prototype.setMode = function( mode ) - { - this.fire( 'beforeSetMode', { newMode : mode } ); - - var data, - holderElement = this.getThemeSpace( 'contents' ), - isDirty = this.checkDirty(); - - // Unload the previous mode. - if ( this.mode ) - { - if ( mode == this.mode ) - return; - - this._.previousMode = this.mode; - - this.fire( 'beforeModeUnload' ); - - var currentMode = this.getMode(); - data = currentMode.getData(); - currentMode.unload( holderElement ); - this.mode = ''; - } - - holderElement.setHtml( '' ); - - // Load required mode. - var modeEditor = this.getMode( mode ); - if ( !modeEditor ) - throw '[CKEDITOR.editor.setMode] Unknown mode "' + mode + '".'; - - if ( !isDirty ) - { - this.on( 'mode', function() - { - this.resetDirty(); - this.removeListener( 'mode', arguments.callee ); - }); - } - - modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data ); - }; - - /** - * Gets the current or any of the objects that represent the editing - * area modes. The two most common editing modes are "wysiwyg" and "source". - * @param {String} [mode] The mode to be retrieved. If not specified, the - * current one is returned. - */ - CKEDITOR.editor.prototype.getMode = function( mode ) - { - return this._.modes && this._.modes[ mode || this.mode ]; - }; - - /** - * Moves the selection focus to the editing are space in the editor. - */ - CKEDITOR.editor.prototype.focus = function() - { - this.forceNextSelectionCheck(); - var mode = this.getMode(); - if ( mode ) - mode.focus(); - }; -})(); - -/** - * The mode to load at the editor startup. It depends on the plugins - * loaded. By default, the "wysiwyg" and "source" modes are available. - * @type String - * @default 'wysiwyg' - * @example - * config.startupMode = 'source'; - */ -CKEDITOR.config.startupMode = 'wysiwyg'; - -/** - * Sets whether the editor should have the focus when the page loads. - * @name CKEDITOR.config.startupFocus - * @type Boolean - * @default false - * @example - * config.startupFocus = true; - */ - -/** - * Whether to render or not the editing block area in the editor interface. - * @type Boolean - * @default true - * @example - * config.editingBlock = false; - */ -CKEDITOR.config.editingBlock = true; - -/** - * Fired when a CKEDITOR instance is created, fully initialized and ready for interaction. - * @name CKEDITOR#instanceReady - * @event - * @param {CKEDITOR.editor} editor The editor instance that has been created. - */ - -/** - * Fired when the CKEDITOR instance is created, fully initialized and ready for interaction. - * @name CKEDITOR.editor#instanceReady - * @event - */ - -/** - * Fired before changing the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#mode - * @name CKEDITOR.editor#beforeModeUnload - * @event - */ - - /** - * Fired before the editor mode is set. See also CKEDITOR.editor#mode and CKEDITOR.editor#beforeModeUnload - * @name CKEDITOR.editor#beforeSetMode - * @event - * @since 3.5.3 - * @param {String} newMode The name of the mode which is about to be set. - */ - -/** - * Fired after setting the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#beforeModeUnload - * @name CKEDITOR.editor#mode - * @event - * @param {String} previousMode The previous mode of the editor. - */ diff --git a/_source/plugins/elementspath/plugin.js b/_source/plugins/elementspath/plugin.js deleted file mode 100644 index 7b81d61..0000000 --- a/_source/plugins/elementspath/plugin.js +++ /dev/null @@ -1,218 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview The "elementspath" plugin. It shows all elements in the DOM - * parent tree relative to the current selection in the editing area. - */ - -(function() -{ - var commands = - { - toolbarFocus : - { - editorFocus : false, - readOnly : 1, - exec : function( editor ) - { - var idBase = editor._.elementsPath.idBase; - var element = CKEDITOR.document.getById( idBase + '0' ); - - // Make the first button focus accessible for IE. (#3417) - // Adobe AIR instead need while of delay. - element && element.focus( CKEDITOR.env.ie || CKEDITOR.env.air ); - } - } - }; - - var emptyHtml = ' '; - - CKEDITOR.plugins.add( 'elementspath', - { - requires : [ 'selection' ], - - init : function( editor ) - { - var spaceId = 'cke_path_' + editor.name; - var spaceElement; - var getSpaceElement = function() - { - if ( !spaceElement ) - spaceElement = CKEDITOR.document.getById( spaceId ); - return spaceElement; - }; - - var idBase = 'cke_elementspath_' + CKEDITOR.tools.getNextNumber() + '_'; - - editor._.elementsPath = { idBase : idBase, filters : [] }; - - editor.on( 'themeSpace', function( event ) - { - if ( event.data.space == 'bottom' ) - { - event.data.html += - '' + editor.lang.elementsPath.eleLabel + '' + - '
      ' + emptyHtml + '
      '; - } - }); - - function onClick( elementIndex ) - { - editor.focus(); - var element = editor._.elementsPath.list[ elementIndex ]; - if ( element.is( 'body' ) ) - { - var range = new CKEDITOR.dom.range( editor.document ); - range.selectNodeContents( element ); - range.select(); - } - else - editor.getSelection().selectElement( element ); - } - - var onClickHanlder = CKEDITOR.tools.addFunction( onClick ); - - var onKeyDownHandler = CKEDITOR.tools.addFunction( function( elementIndex, ev ) - { - var idBase = editor._.elementsPath.idBase, - element; - - ev = new CKEDITOR.dom.event( ev ); - - var rtl = editor.lang.dir == 'rtl'; - switch ( ev.getKeystroke() ) - { - case rtl ? 39 : 37 : // LEFT-ARROW - case 9 : // TAB - element = CKEDITOR.document.getById( idBase + ( elementIndex + 1 ) ); - if ( !element ) - element = CKEDITOR.document.getById( idBase + '0' ); - element.focus(); - return false; - - case rtl ? 37 : 39 : // RIGHT-ARROW - case CKEDITOR.SHIFT + 9 : // SHIFT + TAB - element = CKEDITOR.document.getById( idBase + ( elementIndex - 1 ) ); - if ( !element ) - element = CKEDITOR.document.getById( idBase + ( editor._.elementsPath.list.length - 1 ) ); - element.focus(); - return false; - - case 27 : // ESC - editor.focus(); - return false; - - case 13 : // ENTER // Opera - case 32 : // SPACE - onClick( elementIndex ); - return false; - } - return true; - }); - - editor.on( 'selectionChange', function( ev ) - { - var env = CKEDITOR.env, - selection = ev.data.selection, - element = selection.getStartElement(), - html = [], - editor = ev.editor, - elementsList = editor._.elementsPath.list = [], - filters = editor._.elementsPath.filters; - - while ( element ) - { - var ignore = 0, - name; - - if ( element.data( 'cke-display-name' ) ) - name = element.data( 'cke-display-name' ); - else if ( element.data( 'cke-real-element-type' ) ) - name = element.data( 'cke-real-element-type' ); - else - name = element.getName(); - - for ( var i = 0; i < filters.length; i++ ) - { - var ret = filters[ i ]( element, name ); - if ( ret === false ) - { - ignore = 1; - break; - } - name = ret || name; - } - - if ( !ignore ) - { - var index = elementsList.push( element ) - 1; - - // Use this variable to add conditional stuff to the - // HTML (because we are doing it in reverse order... unshift). - var extra = ''; - - // Some browsers don't cancel key events in the keydown but in the - // keypress. - // TODO: Check if really needed for Gecko+Mac. - if ( env.opera || ( env.gecko && env.mac ) ) - extra += ' onkeypress="return false;"'; - - // With Firefox, we need to force the button to redraw, otherwise it - // will remain in the focus state. - if ( env.gecko ) - extra += ' onblur="this.style.cssText = this.style.cssText;"'; - - var label = editor.lang.elementsPath.eleTitle.replace( /%1/, name ); - html.unshift( - '', - name, - '' + label + '', - '' ); - - } - - if ( name == 'body' ) - break; - - element = element.getParent(); - } - - var space = getSpaceElement(); - space.setHtml( html.join('') + emptyHtml ); - editor.fire( 'elementsPathUpdate', { space : space } ); - }); - - function empty() - { - spaceElement && spaceElement.setHtml( emptyHtml ); - delete editor._.elementsPath.list; - } - - editor.on( 'readOnly', empty ); - editor.on( 'contentDomUnload', empty ); - - editor.addCommand( 'elementsPathFocus', commands.toolbarFocus ); - } - }); -})(); - -/** - * Fired when the contents of the elementsPath are changed - * @name CKEDITOR.editor#elementsPathUpdate - * @event - * @param {Object} eventData.space The elementsPath container - */ diff --git a/_source/plugins/enterkey/plugin.js b/_source/plugins/enterkey/plugin.js deleted file mode 100644 index 8a38916..0000000 --- a/_source/plugins/enterkey/plugin.js +++ /dev/null @@ -1,433 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - CKEDITOR.plugins.add( 'enterkey', - { - requires : [ 'keystrokes', 'indent' ], - - init : function( editor ) - { - editor.addCommand( 'enter', { - modes : { wysiwyg:1 }, - editorFocus : false, - exec : function( editor ){ enter( editor ); } - }); - - editor.addCommand( 'shiftEnter', { - modes : { wysiwyg:1 }, - editorFocus : false, - exec : function( editor ){ shiftEnter( editor ); } - }); - - var keystrokes = editor.keystrokeHandler.keystrokes; - keystrokes[ 13 ] = 'enter'; - keystrokes[ CKEDITOR.SHIFT + 13 ] = 'shiftEnter'; - } - }); - - CKEDITOR.plugins.enterkey = - { - enterBlock : function( editor, mode, range, forceMode ) - { - // Get the range for the current selection. - range = range || getRange( editor ); - - // We may not have valid ranges to work on, like when inside a - // contenteditable=false element. - if ( !range ) - return; - - var doc = range.document; - - var atBlockStart = range.checkStartOfBlock(), - atBlockEnd = range.checkEndOfBlock(), - path = new CKEDITOR.dom.elementPath( range.startContainer ), - block = path.block; - - if ( atBlockStart && atBlockEnd ) - { - // Exit the list when we're inside an empty list item block. (#5376) - if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) ) - { - editor.execCommand( 'outdent' ); - return; - } - - if ( block && block.getParent().is( 'blockquote' ) ) - { - block.breakParent( block.getParent() ); - - // If we were at the start of
      , there will be an empty element before it now. - if ( !block.getPrevious().getFirst( CKEDITOR.dom.walker.invisible(1) ) ) - block.getPrevious().remove(); - - // If we were at the end of
      , there will be an empty element after it now. - if ( !block.getNext().getFirst( CKEDITOR.dom.walker.invisible(1) ) ) - block.getNext().remove(); - - range.moveToElementEditStart( block ); - range.select(); - return; - } - } - // Don't split
       if we're in the middle of it, act as shift enter key.
      -			else if ( block && block.is( 'pre' ) )
      -			{
      -				if ( !atBlockEnd )
      -				{
      -					enterBr( editor, mode, range, forceMode );
      -					return;
      -				}
      -			}
      -			// Don't split caption blocks. (#7944)
      -			else if ( block && CKEDITOR.dtd.$captionBlock[ block.getName() ] )
      -			{
      -				enterBr( editor, mode, range, forceMode );
      -				return;
      -			}
      -
      -			// Determine the block element to be used.
      -			var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
      -
      -			// Split the range.
      -			var splitInfo = range.splitBlock( blockTag );
      -
      -			if ( !splitInfo )
      -				return;
      -
      -			// Get the current blocks.
      -			var previousBlock	= splitInfo.previousBlock,
      -				nextBlock		= splitInfo.nextBlock;
      -
      -			var isStartOfBlock	= splitInfo.wasStartOfBlock,
      -				isEndOfBlock	= splitInfo.wasEndOfBlock;
      -
      -			var node;
      -
      -			// If this is a block under a list item, split it as well. (#1647)
      -			if ( nextBlock )
      -			{
      -				node = nextBlock.getParent();
      -				if ( node.is( 'li' ) )
      -				{
      -					nextBlock.breakParent( node );
      -					nextBlock.move( nextBlock.getNext(), 1 );
      -				}
      -			}
      -			else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) )
      -			{
      -				previousBlock.breakParent( node );
      -				node = previousBlock.getNext();
      -				range.moveToElementEditStart( node );
      -				previousBlock.move( previousBlock.getPrevious() );
      -			}
      -
      -			// If we have both the previous and next blocks, it means that the
      -			// boundaries were on separated blocks, or none of them where on the
      -			// block limits (start/end).
      -			if ( !isStartOfBlock && !isEndOfBlock )
      -			{
      -				// If the next block is an 
    4. with another list tree as the first - // child, we'll need to append a filler (
      /NBSP) or the list item - // wouldn't be editable. (#1420) - if ( nextBlock.is( 'li' ) - && ( node = nextBlock.getFirst( CKEDITOR.dom.walker.invisible( true ) ) ) - && node.is && node.is( 'ul', 'ol' ) ) - ( CKEDITOR.env.ie ? doc.createText( '\xa0' ) : doc.createElement( 'br' ) ).insertBefore( node ); - - // Move the selection to the end block. - if ( nextBlock ) - range.moveToElementEditStart( nextBlock ); - } - else - { - var newBlock, - newBlockDir; - - if ( previousBlock ) - { - // Do not enter this block if it's a header tag, or we are in - // a Shift+Enter (#77). Create a new block element instead - // (later in the code). - if ( previousBlock.is( 'li' ) || - ! ( headerTagRegex.test( previousBlock.getName() ) || previousBlock.is( 'pre' ) ) ) - { - // Otherwise, duplicate the previous block. - newBlock = previousBlock.clone(); - } - } - else if ( nextBlock ) - newBlock = nextBlock.clone(); - - if ( !newBlock ) - { - // We have already created a new list item. (#6849) - if ( node && node.is( 'li' ) ) - newBlock = node; - else - { - newBlock = doc.createElement( blockTag ); - if ( previousBlock && ( newBlockDir = previousBlock.getDirection() ) ) - newBlock.setAttribute( 'dir', newBlockDir ); - } - } - // Force the enter block unless we're talking of a list item. - else if ( forceMode && !newBlock.is( 'li' ) ) - newBlock.renameNode( blockTag ); - - // Recreate the inline elements tree, which was available - // before hitting enter, so the same styles will be available in - // the new block. - var elementPath = splitInfo.elementPath; - if ( elementPath ) - { - for ( var i = 0, len = elementPath.elements.length ; i < len ; i++ ) - { - var element = elementPath.elements[ i ]; - - if ( element.equals( elementPath.block ) || element.equals( elementPath.blockLimit ) ) - break; - - if ( CKEDITOR.dtd.$removeEmpty[ element.getName() ] ) - { - element = element.clone(); - newBlock.moveChildren( element ); - newBlock.append( element ); - } - } - } - - if ( !CKEDITOR.env.ie ) - newBlock.appendBogus(); - - if ( !newBlock.getParent() ) - range.insertNode( newBlock ); - - // list item start number should not be duplicated (#7330), but we need - // to remove the attribute after it's onto the DOM tree because of old IEs (#7581). - newBlock.is( 'li' ) && newBlock.removeAttribute( 'value' ); - - // This is tricky, but to make the new block visible correctly - // we must select it. - // The previousBlock check has been included because it may be - // empty if we have fixed a block-less space (like ENTER into an - // empty table cell). - if ( CKEDITOR.env.ie && isStartOfBlock && ( !isEndOfBlock || !previousBlock.getChildCount() ) ) - { - // Move the selection to the new block. - range.moveToElementEditStart( isEndOfBlock ? previousBlock : newBlock ); - range.select(); - } - - // Move the selection to the new block. - range.moveToElementEditStart( isStartOfBlock && !isEndOfBlock ? nextBlock : newBlock ); - } - - if ( !CKEDITOR.env.ie ) - { - if ( nextBlock ) - { - // If we have split the block, adds a temporary span at the - // range position and scroll relatively to it. - var tmpNode = doc.createElement( 'span' ); - - // We need some content for Safari. - tmpNode.setHtml( ' ' ); - - range.insertNode( tmpNode ); - tmpNode.scrollIntoView(); - range.deleteContents(); - } - else - { - // We may use the above scroll logic for the new block case - // too, but it gives some weird result with Opera. - newBlock.scrollIntoView(); - } - } - - range.select(); - }, - - enterBr : function( editor, mode, range, forceMode ) - { - // Get the range for the current selection. - range = range || getRange( editor ); - - // We may not have valid ranges to work on, like when inside a - // contenteditable=false element. - if ( !range ) - return; - - var doc = range.document; - - // Determine the block element to be used. - var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); - - var isEndOfBlock = range.checkEndOfBlock(); - - var elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() ); - - var startBlock = elementPath.block, - startBlockTag = startBlock && elementPath.block.getName(); - - var isPre = false; - - if ( !forceMode && startBlockTag == 'li' ) - { - enterBlock( editor, mode, range, forceMode ); - return; - } - - // If we are at the end of a header block. - if ( !forceMode && isEndOfBlock && headerTagRegex.test( startBlockTag ) ) - { - var newBlock, - newBlockDir; - - if ( ( newBlockDir = startBlock.getDirection() ) ) - { - newBlock = doc.createElement( 'div' ); - newBlock.setAttribute( 'dir', newBlockDir ); - newBlock.insertAfter( startBlock ); - range.setStart( newBlock, 0 ); - } - else - { - // Insert a
      after the current paragraph. - doc.createElement( 'br' ).insertAfter( startBlock ); - - // A text node is required by Gecko only to make the cursor blink. - if ( CKEDITOR.env.gecko ) - doc.createText( '' ).insertAfter( startBlock ); - - // IE has different behaviors regarding position. - range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START ); - } - } - else - { - var lineBreak; - - isPre = ( startBlockTag == 'pre' ); - - // IE<8 prefers text node as line-break inside of
       (#4711).
      -				if ( startBlockTag == 'pre' && CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
      -					lineBreak = doc.createText( '\r' );
      -				else
      -					lineBreak = doc.createElement( 'br' );
      -
      -				range.deleteContents();
      -				range.insertNode( lineBreak );
      -
      -				// IE has different behavior regarding position.
      -				if ( CKEDITOR.env.ie )
      -					range.setStartAt( lineBreak, CKEDITOR.POSITION_AFTER_END );
      -				else
      -				{
      -					// A text node is required by Gecko only to make the cursor blink.
      -					// We need some text inside of it, so the bogus 
      is properly - // created. - doc.createText( '\ufeff' ).insertAfter( lineBreak ); - - // If we are at the end of a block, we must be sure the bogus node is available in that block. - if ( isEndOfBlock ) - lineBreak.getParent().appendBogus(); - - // Now we can remove the text node contents, so the caret doesn't - // stop on it. - lineBreak.getNext().$.nodeValue = ''; - - range.setStartAt( lineBreak.getNext(), CKEDITOR.POSITION_AFTER_START ); - - // Scroll into view, for non IE. - var dummy = null; - - // BR is not positioned in Opera and Webkit. - if ( !CKEDITOR.env.gecko ) - { - dummy = doc.createElement( 'span' ); - // We need have some contents for Webkit to position it - // under parent node. ( #3681) - dummy.setHtml(' '); - } - else - dummy = doc.createElement( 'br' ); - - dummy.insertBefore( lineBreak.getNext() ); - dummy.scrollIntoView(); - dummy.remove(); - } - } - - // This collapse guarantees the cursor will be blinking. - range.collapse( true ); - - range.select( isPre ); - } - }; - - var plugin = CKEDITOR.plugins.enterkey, - enterBr = plugin.enterBr, - enterBlock = plugin.enterBlock, - headerTagRegex = /^h[1-6]$/; - - function shiftEnter( editor ) - { - // Only effective within document. - if ( editor.mode != 'wysiwyg' ) - return false; - - // On SHIFT+ENTER: - // 1. We want to enforce the mode to be respected, instead - // of cloning the current block. (#77) - return enter( editor, editor.config.shiftEnterMode, 1 ); - } - - function enter( editor, mode, forceMode ) - { - forceMode = editor.config.forceEnterMode || forceMode; - - // Only effective within document. - if ( editor.mode != 'wysiwyg' ) - return false; - - if ( !mode ) - mode = editor.config.enterMode; - - // Use setTimout so the keys get cancelled immediatelly. - setTimeout( function() - { - editor.fire( 'saveSnapshot' ); // Save undo step. - - if ( mode == CKEDITOR.ENTER_BR ) - enterBr( editor, mode, null, forceMode ); - else - enterBlock( editor, mode, null, forceMode ); - - editor.fire( 'saveSnapshot' ); - - }, 0 ); - - return true; - } - - function getRange( editor ) - { - // Get the selection ranges. - var ranges = editor.getSelection().getRanges( true ); - - // Delete the contents of all ranges except the first one. - for ( var i = ranges.length - 1 ; i > 0 ; i-- ) - { - ranges[ i ].deleteContents(); - } - - // Return the first range. - return ranges[ 0 ]; - } -})(); diff --git a/_source/plugins/entities/plugin.js b/_source/plugins/entities/plugin.js deleted file mode 100644 index 1745348..0000000 --- a/_source/plugins/entities/plugin.js +++ /dev/null @@ -1,254 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - // Base HTML entities. - var htmlbase = 'nbsp,gt,lt,amp'; - - var entities = - // Latin-1 Entities - '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,' + - - // Symbols - '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,' + - - // Other Special Characters - 'circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,' + - 'rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,' + - 'euro'; - - // Latin Letters Entities - var latin = - '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'; - - // Greek Letters Entities. - var greek = - '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'; - - /** - * Create a mapping table between one character and its entity form from a list of entity names. - * @param reverse {Boolean} Whether to create a reverse map from the entity string form to an actual character. - */ - function buildTable( entities, reverse ) - { - var table = {}, - regex = []; - - // Entities that the browsers DOM don't transform to the final char - // automatically. - var specialTable = - { - nbsp : '\u00A0', // IE | FF - shy : '\u00AD', // IE - gt : '\u003E', // IE | FF | -- | Opera - lt : '\u003C', // IE | FF | Safari | Opera - amp : '\u0026', // ALL - apos : '\u0027', // IE - quot : '\u0022' // IE - }; - - entities = entities.replace( /\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function( match, entity ) - { - var org = reverse ? '&' + entity + ';' : specialTable[ entity ], - result = reverse ? specialTable[ entity ] : '&' + entity + ';'; - - table[ org ] = result; - regex.push( org ); - return ''; - }); - - if ( !reverse && entities ) - { - // Transforms the entities string into an array. - entities = entities.split( ',' ); - - // Put all entities inside a DOM element, transforming them to their - // final chars. - var div = document.createElement( 'div' ), - chars; - div.innerHTML = '&' + entities.join( ';&' ) + ';'; - chars = div.innerHTML; - div = null; - - // Add all chars to the table. - for ( var i = 0 ; i < chars.length ; i++ ) - { - var charAt = chars.charAt( i ); - table[ charAt ] = '&' + entities[ i ] + ';'; - regex.push( charAt ); - } - } - - table.regex = regex.join( reverse ? '|' : '' ); - - return table; - } - - CKEDITOR.plugins.add( 'entities', - { - afterInit : function( editor ) - { - var config = editor.config; - - var dataProcessor = editor.dataProcessor, - htmlFilter = dataProcessor && dataProcessor.htmlFilter; - - if ( htmlFilter ) - { - // Mandatory HTML base entities. - var selectedEntities = []; - - if ( config.basicEntities !== false ) - selectedEntities.push( htmlbase ); - - if ( config.entities ) - { - if ( selectedEntities.length ) - selectedEntities.push( entities ); - - if ( config.entities_latin ) - selectedEntities.push( latin ); - - if ( config.entities_greek ) - selectedEntities.push( greek ); - - if ( config.entities_additional ) - selectedEntities.push( config.entities_additional ); - } - - var entitiesTable = buildTable( selectedEntities.join( ',' ) ); - - // Create the Regex used to find entities in the text, leave it matches nothing if entities are empty. - var entitiesRegex = entitiesTable.regex ? '[' + entitiesTable.regex + ']' : 'a^'; - delete entitiesTable.regex; - - if ( config.entities && config.entities_processNumerical ) - entitiesRegex = '[^ -~]|' + entitiesRegex ; - - entitiesRegex = new RegExp( entitiesRegex, 'g' ); - - function getEntity( character ) - { - return config.entities_processNumerical == 'force' || !entitiesTable[ character ] ? - '&#' + character.charCodeAt(0) + ';' - : entitiesTable[ character ]; - } - - // Decode entities that the browsers has transformed - // at first place. - var baseEntitiesTable = buildTable( [ htmlbase, 'shy' ].join( ',' ) , true ), - baseEntitiesRegex = new RegExp( baseEntitiesTable.regex, 'g' ); - - function getChar( character ) - { - return baseEntitiesTable[ character ]; - } - - htmlFilter.addRules( - { - text : function( text ) - { - return text.replace( baseEntitiesRegex, getChar ) - .replace( entitiesRegex, getEntity ); - } - }); - } - } - }); -})(); - -/** - * Whether to escape basic HTML entities in the document, including: - *
        - *
      • nbsp
      • - *
      • gt
      • - *
      • lt
      • - *
      • amp
      • - *
      - * Note: It should not be subject to change unless when outputting a non-HTML data format like BBCode. - * @type Boolean - * @default true - * @example - * config.basicEntities = false; - */ -CKEDITOR.config.basicEntities = true; - -/** - * Whether to use HTML entities in the output. - * @name CKEDITOR.config.entities - * @type Boolean - * @default true - * @example - * config.entities = false; - */ -CKEDITOR.config.entities = true; - -/** - * Whether to convert some Latin characters (Latin alphabet No. 1, ISO 8859-1) - * to HTML entities. The list of entities can be found in the - * W3C HTML 4.01 Specification, section 24.2.1. - * @name CKEDITOR.config.entities_latin - * @type Boolean - * @default true - * @example - * config.entities_latin = false; - */ -CKEDITOR.config.entities_latin = true; - -/** - * Whether to convert some symbols, mathematical symbols, and Greek letters to - * HTML entities. This may be more relevant for users typing text written in Greek. - * The list of entities can be found in the - * W3C HTML 4.01 Specification, section 24.3.1. - * @name CKEDITOR.config.entities_greek - * @type Boolean - * @default true - * @example - * config.entities_greek = false; - */ -CKEDITOR.config.entities_greek = true; - -/** - * Whether to convert all remaining characters not included in the ASCII - * character table to their relative decimal numeric representation of HTML entity. - * When set to force, it will convert all entities into this format. - * For example the phrase "This is Chinese: 汉语." is output - * as "This is Chinese: &#27721;&#35821;." - * @name CKEDITOR.config.entities_processNumerical - * @type Boolean|String - * @default false - * @example - * config.entities_processNumerical = true; - * config.entities_processNumerical = 'force'; //Converts from " " into " "; - */ - -/** - * A comma separated list of additional entities to be used. Entity names - * or numbers must be used in a form that excludes the "&" prefix and the ";" ending. - * @name CKEDITOR.config.entities_additional - * @default '#39' (The single quote (') character.) - * @type String - * @example - * config.entities_additional = '#1049'; // Adds Cyrillic capital letter Short I (Й). - */ -CKEDITOR.config.entities_additional = '#39'; diff --git a/_source/plugins/fakeobjects/plugin.js b/_source/plugins/fakeobjects/plugin.js deleted file mode 100644 index f81bdb6..0000000 --- a/_source/plugins/fakeobjects/plugin.js +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - var cssStyle = CKEDITOR.htmlParser.cssStyle, - cssLength = CKEDITOR.tools.cssLength; - - var cssLengthRegex = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i; - - /* - * Replacing the former CSS length value with the later one, with - * adjustment to the length unit. - */ - function replaceCssLength( length1, length2 ) - { - var parts1 = cssLengthRegex.exec( length1 ), - parts2 = cssLengthRegex.exec( length2 ); - - // Omit pixel length unit when necessary, - // e.g. replaceCssLength( 10, '20px' ) -> 20 - if ( parts1 ) - { - if ( !parts1[ 2 ] && parts2[ 2 ] == 'px' ) - return parts2[ 1 ]; - if ( parts1[ 2 ] == 'px' && !parts2[ 2 ] ) - return parts2[ 1 ] + 'px'; - } - - return length2; - } - - var htmlFilterRules = - { - elements : - { - $ : function( element ) - { - var attributes = element.attributes, - realHtml = attributes && attributes[ 'data-cke-realelement' ], - realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ), - realElement = realFragment && realFragment.children[ 0 ]; - - // Width/height in the fake object are subjected to clone into the real element. - if ( realElement && element.attributes[ 'data-cke-resizable' ] ) - { - var styles = new cssStyle( element ).rules, - realAttrs = realElement.attributes, - width = styles.width, - height = styles.height; - - width && ( realAttrs.width = replaceCssLength( realAttrs.width, width ) ); - height && ( realAttrs.height = replaceCssLength( realAttrs.height, height ) ); - } - - return realElement; - } - } - }; - - CKEDITOR.plugins.add( 'fakeobjects', - { - requires : [ 'htmlwriter' ], - - afterInit : function( editor ) - { - var dataProcessor = editor.dataProcessor, - htmlFilter = dataProcessor && dataProcessor.htmlFilter; - - if ( htmlFilter ) - htmlFilter.addRules( htmlFilterRules ); - } - }); - - CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable ) - { - var lang = this.lang.fakeobjects, - label = lang[ realElementType ] || lang.unknown; - - var attributes = - { - 'class' : className, - 'data-cke-realelement' : encodeURIComponent( realElement.getOuterHtml() ), - 'data-cke-real-node-type' : realElement.type, - alt : label, - title : label, - align : realElement.getAttribute( 'align' ) || '' - }; - - // Do not set "src" on high-contrast so the alt text is displayed. (#8945) - if ( !CKEDITOR.env.hc ) - attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' ); - - if ( realElementType ) - attributes[ 'data-cke-real-element-type' ] = realElementType; - - if ( isResizable ) - { - attributes[ 'data-cke-resizable' ] = isResizable; - - var fakeStyle = new cssStyle(); - - var width = realElement.getAttribute( 'width' ), - height = realElement.getAttribute( 'height' ); - - width && ( fakeStyle.rules.width = cssLength( width ) ); - height && ( fakeStyle.rules.height = cssLength( height ) ); - fakeStyle.populate( attributes ); - } - - return this.document.createElement( 'img', { attributes : attributes } ); - }; - - CKEDITOR.editor.prototype.createFakeParserElement = function( realElement, className, realElementType, isResizable ) - { - var lang = this.lang.fakeobjects, - label = lang[ realElementType ] || lang.unknown, - html; - - var writer = new CKEDITOR.htmlParser.basicWriter(); - realElement.writeHtml( writer ); - html = writer.getHtml(); - - var attributes = - { - 'class' : className, - 'data-cke-realelement' : encodeURIComponent( html ), - 'data-cke-real-node-type' : realElement.type, - alt : label, - title : label, - align : realElement.attributes.align || '' - }; - - // Do not set "src" on high-contrast so the alt text is displayed. (#8945) - if ( !CKEDITOR.env.hc ) - attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' ); - - if ( realElementType ) - attributes[ 'data-cke-real-element-type' ] = realElementType; - - if ( isResizable ) - { - attributes[ 'data-cke-resizable' ] = isResizable; - var realAttrs = realElement.attributes, - fakeStyle = new cssStyle(); - - var width = realAttrs.width, - height = realAttrs.height; - - width != undefined && ( fakeStyle.rules.width = cssLength( width ) ); - height != undefined && ( fakeStyle.rules.height = cssLength ( height ) ); - fakeStyle.populate( attributes ); - } - - return new CKEDITOR.htmlParser.element( 'img', attributes ); - }; - - CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement ) - { - if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT ) - return null; - - var element = CKEDITOR.dom.element.createFromHtml( - decodeURIComponent( fakeElement.data( 'cke-realelement' ) ), - this.document ); - - if ( fakeElement.data( 'cke-resizable') ) - { - var width = fakeElement.getStyle( 'width' ), - height = fakeElement.getStyle( 'height' ); - - width && element.setAttribute( 'width', replaceCssLength( element.getAttribute( 'width' ), width ) ); - height && element.setAttribute( 'height', replaceCssLength( element.getAttribute( 'height' ), height ) ); - } - - return element; - }; - -})(); diff --git a/_source/plugins/filebrowser/plugin.js b/_source/plugins/filebrowser/plugin.js deleted file mode 100644 index fbef990..0000000 --- a/_source/plugins/filebrowser/plugin.js +++ /dev/null @@ -1,533 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @fileOverview The "filebrowser" plugin that adds support for file uploads and - * browsing. - * - * When a file is uploaded or selected inside the file browser, its URL is - * inserted automatically into a field defined in the filebrowser - * attribute. In order to specify a field that should be updated, pass the tab ID and - * the element ID, separated with a colon.

      - * - * Example 1: (Browse) - * - *
      - * {
      - * 	type : 'button',
      - * 	id : 'browse',
      - * 	filebrowser : 'tabId:elementId',
      - * 	label : editor.lang.common.browseServer
      - * }
      - * 
      - * - * If you set the filebrowser attribute for an element other than - * the fileButton, the Browse action will be triggered.

      - * - * Example 2: (Quick Upload) - * - *
      - * {
      - * 	type : 'fileButton',
      - * 	id : 'uploadButton',
      - * 	filebrowser : 'tabId:elementId',
      - * 	label : editor.lang.common.uploadSubmit,
      - * 	'for' : [ 'upload', 'upload' ]
      - * }
      - * 
      - * - * If you set the filebrowser attribute for a fileButton - * element, the QuickUpload action will be executed.

      - * - * The filebrowser plugin also supports more advanced configuration performed through - * a JavaScript object. - * - * The following settings are supported: - * - *
        - *
      • actionBrowse or QuickUpload.
      • - *
      • target – the field to update in the tabId:elementId format.
      • - *
      • params – additional arguments to be passed to the server connector (optional).
      • - *
      • onSelect – a function to execute when the file is selected/uploaded (optional).
      • - *
      • url – the URL to be called (optional).
      • - *
      - * - * Example 3: (Quick Upload) - * - *
      - * {
      - * 	type : 'fileButton',
      - * 	label : editor.lang.common.uploadSubmit,
      - * 	id : 'buttonId',
      - * 	filebrowser :
      - * 	{
      - * 		action : 'QuickUpload', // required
      - * 		target : 'tab1:elementId', // required
      - * 		params : // optional
      - * 		{
      - * 			type : 'Files',
      - * 			currentFolder : '/folder/'
      - * 		},
      - * 		onSelect : function( fileUrl, errorMessage ) // optional
      - * 		{
      - * 			// Do not call the built-in selectFuntion.
      - * 			// return false;
      - * 		}
      - * 	},
      - * 	'for' : [ 'tab1', 'myFile' ]
      - * }
      - * 
      - * - * Suppose you have a file element with an ID of myFile, a text - * field with an ID of elementId and a fileButton. - * If the filebowser.url attribute is not specified explicitly, - * the form action will be set to filebrowser[DialogWindowName]UploadUrl - * or, if not specified, to filebrowserUploadUrl. Additional parameters - * from the params object will be added to the query string. It is - * possible to create your own uploadHandler and cancel the built-in - * updateTargetElement command.

      - * - * Example 4: (Browse) - * - *
      - * {
      - * 	type : 'button',
      - * 	id : 'buttonId',
      - * 	label : editor.lang.common.browseServer,
      - * 	filebrowser :
      - * 	{
      - * 		action : 'Browse',
      - * 		url : '/ckfinder/ckfinder.html&type=Images',
      - * 		target : 'tab1:elementId'
      - * 	}
      - * }
      - * 
      - * - * In this example, when the button is pressed, the file browser will be opened in a - * popup window. If you do not specify the filebrowser.url attribute, - * filebrowser[DialogName]BrowseUrl or - * filebrowserBrowseUrl will be used. After selecting a file in the file - * browser, an element with an ID of elementId will be updated. Just - * like in the third example, a custom onSelect function may be defined. - */ -( function() -{ - /* - * Adds (additional) arguments to given url. - * - * @param {String} - * url The url. - * @param {Object} - * params Additional parameters. - */ - function addQueryString( url, params ) - { - var queryString = []; - - if ( !params ) - return url; - else - { - for ( var i in params ) - queryString.push( i + "=" + encodeURIComponent( params[ i ] ) ); - } - - return url + ( ( url.indexOf( "?" ) != -1 ) ? "&" : "?" ) + queryString.join( "&" ); - } - - /* - * Make a string's first character uppercase. - * - * @param {String} - * str String. - */ - function ucFirst( str ) - { - str += ''; - var f = str.charAt( 0 ).toUpperCase(); - return f + str.substr( 1 ); - } - - /* - * The onlick function assigned to the 'Browse Server' button. Opens the - * file browser and updates target field when file is selected. - * - * @param {CKEDITOR.event} - * evt The event object. - */ - function browseServer( evt ) - { - var dialog = this.getDialog(); - var editor = dialog.getParentEditor(); - - editor._.filebrowserSe = this; - - var width = editor.config[ 'filebrowser' + ucFirst( dialog.getName() ) + 'WindowWidth' ] - || editor.config.filebrowserWindowWidth || '80%'; - var height = editor.config[ 'filebrowser' + ucFirst( dialog.getName() ) + 'WindowHeight' ] - || editor.config.filebrowserWindowHeight || '70%'; - - var params = this.filebrowser.params || {}; - params.CKEditor = editor.name; - params.CKEditorFuncNum = editor._.filebrowserFn; - if ( !params.langCode ) - params.langCode = editor.langCode; - - var url = addQueryString( this.filebrowser.url, params ); - // TODO: V4: Remove backward compatibility (#8163). - editor.popup( url, width, height, editor.config.filebrowserWindowFeatures || editor.config.fileBrowserWindowFeatures ); - } - - /* - * The onlick function assigned to the 'Upload' button. Makes the final - * decision whether form is really submitted and updates target field when - * file is uploaded. - * - * @param {CKEDITOR.event} - * evt The event object. - */ - function uploadFile( evt ) - { - var dialog = this.getDialog(); - var editor = dialog.getParentEditor(); - - editor._.filebrowserSe = this; - - // If user didn't select the file, stop the upload. - if ( !dialog.getContentElement( this[ 'for' ][ 0 ], this[ 'for' ][ 1 ] ).getInputElement().$.value ) - return false; - - if ( !dialog.getContentElement( this[ 'for' ][ 0 ], this[ 'for' ][ 1 ] ).getAction() ) - return false; - - return true; - } - - /* - * Setups the file element. - * - * @param {CKEDITOR.ui.dialog.file} - * fileInput The file element used during file upload. - * @param {Object} - * filebrowser Object containing filebrowser settings assigned to - * the fileButton associated with this file element. - */ - function setupFileElement( editor, fileInput, filebrowser ) - { - var params = filebrowser.params || {}; - params.CKEditor = editor.name; - params.CKEditorFuncNum = editor._.filebrowserFn; - if ( !params.langCode ) - params.langCode = editor.langCode; - - fileInput.action = addQueryString( filebrowser.url, params ); - fileInput.filebrowser = filebrowser; - } - - /* - * Traverse through the content definition and attach filebrowser to - * elements with 'filebrowser' attribute. - * - * @param String - * dialogName Dialog name. - * @param {CKEDITOR.dialog.definitionObject} - * definition Dialog definition. - * @param {Array} - * elements Array of {@link CKEDITOR.dialog.definition.content} - * objects. - */ - function attachFileBrowser( editor, dialogName, definition, elements ) - { - var element, fileInput; - - for ( var i in elements ) - { - element = elements[ i ]; - - if ( element.type == 'hbox' || element.type == 'vbox' || element.type == 'fieldset' ) - attachFileBrowser( editor, dialogName, definition, element.children ); - - if ( !element.filebrowser ) - continue; - - if ( typeof element.filebrowser == 'string' ) - { - var fb = - { - action : ( element.type == 'fileButton' ) ? 'QuickUpload' : 'Browse', - target : element.filebrowser - }; - element.filebrowser = fb; - } - - if ( element.filebrowser.action == 'Browse' ) - { - var url = element.filebrowser.url; - if ( url === undefined ) - { - url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ]; - if ( url === undefined ) - url = editor.config.filebrowserBrowseUrl; - } - - if ( url ) - { - element.onClick = browseServer; - element.filebrowser.url = url; - element.hidden = false; - } - } - else if ( element.filebrowser.action == 'QuickUpload' && element[ 'for' ] ) - { - url = element.filebrowser.url; - if ( url === undefined ) - { - url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ]; - if ( url === undefined ) - url = editor.config.filebrowserUploadUrl; - } - - if ( url ) - { - var onClick = element.onClick; - element.onClick = function( evt ) - { - // "element" here means the definition object, so we need to find the correct - // button to scope the event call - var sender = evt.sender; - if ( onClick && onClick.call( sender, evt ) === false ) - return false; - - return uploadFile.call( sender, evt ); - }; - - element.filebrowser.url = url; - element.hidden = false; - setupFileElement( editor, definition.getContents( element[ 'for' ][ 0 ] ).get( element[ 'for' ][ 1 ] ), element.filebrowser ); - } - } - } - } - - /* - * Updates the target element with the url of uploaded/selected file. - * - * @param {String} - * url The url of a file. - */ - function updateTargetElement( url, sourceElement ) - { - var dialog = sourceElement.getDialog(); - var targetElement = sourceElement.filebrowser.target || null; - - // If there is a reference to targetElement, update it. - if ( targetElement ) - { - var target = targetElement.split( ':' ); - var element = dialog.getContentElement( target[ 0 ], target[ 1 ] ); - if ( element ) - { - element.setValue( url ); - dialog.selectPage( target[ 0 ] ); - } - } - } - - /* - * Returns true if filebrowser is configured in one of the elements. - * - * @param {CKEDITOR.dialog.definitionObject} - * definition Dialog definition. - * @param String - * tabId The tab id where element(s) can be found. - * @param String - * elementId The element id (or ids, separated with a semicolon) to check. - */ - function isConfigured( definition, tabId, elementId ) - { - if ( elementId.indexOf( ";" ) !== -1 ) - { - var ids = elementId.split( ";" ); - for ( var i = 0 ; i < ids.length ; i++ ) - { - if ( isConfigured( definition, tabId, ids[i] ) ) - return true; - } - return false; - } - - var elementFileBrowser = definition.getContents( tabId ).get( elementId ).filebrowser; - return ( elementFileBrowser && elementFileBrowser.url ); - } - - function setUrl( fileUrl, data ) - { - var dialog = this._.filebrowserSe.getDialog(), - targetInput = this._.filebrowserSe[ 'for' ], - onSelect = this._.filebrowserSe.filebrowser.onSelect; - - if ( targetInput ) - dialog.getContentElement( targetInput[ 0 ], targetInput[ 1 ] ).reset(); - - if ( typeof data == 'function' && data.call( this._.filebrowserSe ) === false ) - return; - - if ( onSelect && onSelect.call( this._.filebrowserSe, fileUrl, data ) === false ) - return; - - // The "data" argument may be used to pass the error message to the editor. - if ( typeof data == 'string' && data ) - alert( data ); - - if ( fileUrl ) - updateTargetElement( fileUrl, this._.filebrowserSe ); - } - - CKEDITOR.plugins.add( 'filebrowser', - { - init : function( editor, pluginPath ) - { - editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor ); - editor.on( 'destroy', function () { CKEDITOR.tools.removeFunction( this._.filebrowserFn ); } ); - } - } ); - - CKEDITOR.on( 'dialogDefinition', function( evt ) - { - var definition = evt.data.definition, - element; - // Associate filebrowser to elements with 'filebrowser' attribute. - for ( var i in definition.contents ) - { - if ( ( element = definition.contents[ i ] ) ) - { - attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); - if ( element.hidden && element.filebrowser ) - { - element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); - } - } - } - } ); - -} )(); - -/** - * The location of an external file browser that should be launched when the Browse Server - * button is pressed. If configured, the Browse Server button will appear in the - * Link, Image, and Flash dialog windows. - * @see The File Browser/Uploader documentation. - * @name CKEDITOR.config.filebrowserBrowseUrl - * @since 3.0 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserBrowseUrl = '/browser/browse.php'; - */ - -/** - * The location of the script that handles file uploads. - * If set, the Upload tab will appear in the Link, Image, - * and Flash dialog windows. - * @name CKEDITOR.config.filebrowserUploadUrl - * @see The File Browser/Uploader documentation. - * @since 3.0 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserUploadUrl = '/uploader/upload.php'; - */ - -/** - * The location of an external file browser that should be launched when the Browse Server - * button is pressed in the Image dialog window. - * If not set, CKEditor will use {@link CKEDITOR.config.filebrowserBrowseUrl}. - * @name CKEDITOR.config.filebrowserImageBrowseUrl - * @since 3.0 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserImageBrowseUrl = '/browser/browse.php?type=Images'; - */ - -/** - * The location of an external file browser that should be launched when the Browse Server - * button is pressed in the Flash dialog window. - * If not set, CKEditor will use {@link CKEDITOR.config.filebrowserBrowseUrl}. - * @name CKEDITOR.config.filebrowserFlashBrowseUrl - * @since 3.0 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserFlashBrowseUrl = '/browser/browse.php?type=Flash'; - */ - -/** - * The location of the script that handles file uploads in the Image dialog window. - * If not set, CKEditor will use {@link CKEDITOR.config.filebrowserUploadUrl}. - * @name CKEDITOR.config.filebrowserImageUploadUrl - * @since 3.0 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserImageUploadUrl = '/uploader/upload.php?type=Images'; - */ - -/** - * The location of the script that handles file uploads in the Flash dialog window. - * If not set, CKEditor will use {@link CKEDITOR.config.filebrowserUploadUrl}. - * @name CKEDITOR.config.filebrowserFlashUploadUrl - * @since 3.0 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserFlashUploadUrl = '/uploader/upload.php?type=Flash'; - */ - -/** - * The location of an external file browser that should be launched when the Browse Server - * button is pressed in the Link tab of the Image dialog window. - * If not set, CKEditor will use {@link CKEDITOR.config.filebrowserBrowseUrl}. - * @name CKEDITOR.config.filebrowserImageBrowseLinkUrl - * @since 3.2 - * @type String - * @default '' (empty string = disabled) - * @example - * config.filebrowserImageBrowseLinkUrl = '/browser/browse.php'; - */ - -/** - * The features to use in the file browser popup window. - * @name CKEDITOR.config.filebrowserWindowFeatures - * @since 3.4.1 - * @type String - * @default 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes' - * @example - * config.filebrowserWindowFeatures = 'resizable=yes,scrollbars=no'; - */ - -/** - * The width of the file browser popup window. It can be a number denoting a value in - * pixels or a percent string. - * @name CKEDITOR.config.filebrowserWindowWidth - * @type Number|String - * @default '80%' - * @example - * config.filebrowserWindowWidth = 750; - * @example - * config.filebrowserWindowWidth = '50%'; - */ - -/** - * The height of the file browser popup window. It can be a number denoting a value in - * pixels or a percent string. - * @name CKEDITOR.config.filebrowserWindowHeight - * @type Number|String - * @default '70%' - * @example - * config.filebrowserWindowHeight = 580; - * @example - * config.filebrowserWindowHeight = '50%'; - */ diff --git a/_source/plugins/find/dialogs/find.js b/_source/plugins/find/dialogs/find.js deleted file mode 100644 index b6b2d45..0000000 --- a/_source/plugins/find/dialogs/find.js +++ /dev/null @@ -1,922 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - var isReplace; - - function findEvaluator( node ) - { - return node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 && ( !isReplace || !node.isReadOnly() ); - } - - /** - * Elements which break characters been considered as sequence. - */ - function nonCharactersBoundary( node ) - { - return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( - CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable ) ) ); - } - - /** - * Get the cursor object which represent both current character and it's dom - * position thing. - */ - var cursorStep = function() - { - return { - textNode : this.textNode, - offset : this.offset, - character : this.textNode ? - this.textNode.getText().charAt( this.offset ) : null, - hitMatchBoundary : this._.matchBoundary - }; - }; - - var pages = [ 'find', 'replace' ], - fieldsMapping = [ - [ 'txtFindFind', 'txtFindReplace' ], - [ 'txtFindCaseChk', 'txtReplaceCaseChk' ], - [ 'txtFindWordChk', 'txtReplaceWordChk' ], - [ 'txtFindCyclic', 'txtReplaceCyclic' ] ]; - - /** - * Synchronize corresponding filed values between 'replace' and 'find' pages. - * @param {String} currentPageId The page id which receive values. - */ - function syncFieldsBetweenTabs( currentPageId ) - { - var sourceIndex, targetIndex, - sourceField, targetField; - - sourceIndex = currentPageId === 'find' ? 1 : 0; - targetIndex = 1 - sourceIndex; - var i, l = fieldsMapping.length; - for ( i = 0 ; i < l ; i++ ) - { - sourceField = this.getContentElement( pages[ sourceIndex ], - fieldsMapping[ i ][ sourceIndex ] ); - targetField = this.getContentElement( pages[ targetIndex ], - fieldsMapping[ i ][ targetIndex ] ); - - targetField.setValue( sourceField.getValue() ); - } - } - - var findDialog = function( editor, startupPage ) - { - // Style object for highlights: (#5018) - // 1. Defined as full match style to avoid compromising ordinary text color styles. - // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually. - var highlightStyle = new CKEDITOR.style( - CKEDITOR.tools.extend( { attributes : { 'data-cke-highlight': 1 }, fullMatch : 1, ignoreReadonly : 1, childRule : function(){ return 0; } }, - editor.config.find_highlight, true ) ); - - /** - * Iterator which walk through the specified range char by char. By - * default the walking will not stop at the character boundaries, until - * the end of the range is encountered. - * @param { CKEDITOR.dom.range } range - * @param {Boolean} matchWord Whether the walking will stop at character boundary. - */ - var characterWalker = function( range , matchWord ) - { - var self = this; - var walker = - new CKEDITOR.dom.walker( range ); - walker.guard = matchWord ? nonCharactersBoundary : function( node ) - { - !nonCharactersBoundary( node ) && ( self._.matchBoundary = true ); - }; - walker[ 'evaluator' ] = findEvaluator; - walker.breakOnFalse = 1; - - if ( range.startContainer.type == CKEDITOR.NODE_TEXT ) - { - this.textNode = range.startContainer; - this.offset = range.startOffset - 1; - } - - this._ = { - matchWord : matchWord, - walker : walker, - matchBoundary : false - }; - }; - - characterWalker.prototype = { - next : function() - { - return this.move(); - }, - - back : function() - { - return this.move( true ); - }, - - move : function( rtl ) - { - var currentTextNode = this.textNode; - // Already at the end of document, no more character available. - if ( currentTextNode === null ) - return cursorStep.call( this ); - - this._.matchBoundary = false; - - // There are more characters in the text node, step forward. - if ( currentTextNode - && rtl - && this.offset > 0 ) - { - this.offset--; - return cursorStep.call( this ); - } - else if ( currentTextNode - && this.offset < currentTextNode.getLength() - 1 ) - { - this.offset++; - return cursorStep.call( this ); - } - else - { - currentTextNode = null; - // At the end of the text node, walking foward for the next. - while ( !currentTextNode ) - { - currentTextNode = - this._.walker[ rtl ? 'previous' : 'next' ].call( this._.walker ); - - // Stop searching if we're need full word match OR - // already reach document end. - if ( this._.matchWord && !currentTextNode - || this._.walker._.end ) - break; - } - // Found a fresh text node. - this.textNode = currentTextNode; - if ( currentTextNode ) - this.offset = rtl ? currentTextNode.getLength() - 1 : 0; - else - this.offset = 0; - } - - return cursorStep.call( this ); - } - - }; - - /** - * A range of cursors which represent a trunk of characters which try to - * match, it has the same length as the pattern string. - */ - var characterRange = function( characterWalker, rangeLength ) - { - this._ = { - walker : characterWalker, - cursors : [], - rangeLength : rangeLength, - highlightRange : null, - isMatched : 0 - }; - }; - - characterRange.prototype = { - /** - * Translate this range to {@link CKEDITOR.dom.range} - */ - toDomRange : function() - { - var range = new CKEDITOR.dom.range( editor.document ); - var cursors = this._.cursors; - if ( cursors.length < 1 ) - { - var textNode = this._.walker.textNode; - if ( textNode ) - range.setStartAfter( textNode ); - else - return null; - } - else - { - var first = cursors[0], - last = cursors[ cursors.length - 1 ]; - - range.setStart( first.textNode, first.offset ); - range.setEnd( last.textNode, last.offset + 1 ); - } - - return range; - }, - /** - * Reflect the latest changes from dom range. - */ - updateFromDomRange : function( domRange ) - { - var cursor, - walker = new characterWalker( domRange ); - this._.cursors = []; - do - { - cursor = walker.next(); - if ( cursor.character ) - this._.cursors.push( cursor ); - } - while ( cursor.character ); - this._.rangeLength = this._.cursors.length; - }, - - setMatched : function() - { - this._.isMatched = true; - }, - - clearMatched : function() - { - this._.isMatched = false; - }, - - isMatched : function() - { - return this._.isMatched; - }, - - /** - * Hightlight the current matched chunk of text. - */ - highlight : function() - { - // Do not apply if nothing is found. - if ( this._.cursors.length < 1 ) - return; - - // Remove the previous highlight if there's one. - if ( this._.highlightRange ) - this.removeHighlight(); - - // Apply the highlight. - var range = this.toDomRange(), - bookmark = range.createBookmark(); - highlightStyle.applyToRange( range ); - range.moveToBookmark( bookmark ); - this._.highlightRange = range; - - // Scroll the editor to the highlighted area. - var element = range.startContainer; - if ( element.type != CKEDITOR.NODE_ELEMENT ) - element = element.getParent(); - element.scrollIntoView(); - - // Update the character cursors. - this.updateFromDomRange( range ); - }, - - /** - * Remove highlighted find result. - */ - removeHighlight : function() - { - if ( !this._.highlightRange ) - return; - - var bookmark = this._.highlightRange.createBookmark(); - highlightStyle.removeFromRange( this._.highlightRange ); - this._.highlightRange.moveToBookmark( bookmark ); - this.updateFromDomRange( this._.highlightRange ); - this._.highlightRange = null; - }, - - isReadOnly : function() - { - if ( !this._.highlightRange ) - return 0; - - return this._.highlightRange.startContainer.isReadOnly(); - }, - - moveBack : function() - { - var retval = this._.walker.back(), - cursors = this._.cursors; - - if ( retval.hitMatchBoundary ) - this._.cursors = cursors = []; - - cursors.unshift( retval ); - if ( cursors.length > this._.rangeLength ) - cursors.pop(); - - return retval; - }, - - moveNext : function() - { - var retval = this._.walker.next(), - cursors = this._.cursors; - - // Clear the cursors queue if we've crossed a match boundary. - if ( retval.hitMatchBoundary ) - this._.cursors = cursors = []; - - cursors.push( retval ); - if ( cursors.length > this._.rangeLength ) - cursors.shift(); - - return retval; - }, - - getEndCharacter : function() - { - var cursors = this._.cursors; - if ( cursors.length < 1 ) - return null; - - return cursors[ cursors.length - 1 ].character; - }, - - getNextCharacterRange : function( maxLength ) - { - var lastCursor, - nextRangeWalker, - cursors = this._.cursors; - - if ( ( lastCursor = cursors[ cursors.length - 1 ] ) && lastCursor.textNode ) - nextRangeWalker = new characterWalker( getRangeAfterCursor( lastCursor ) ); - // In case it's an empty range (no cursors), figure out next range from walker (#4951). - else - nextRangeWalker = this._.walker; - - return new characterRange( nextRangeWalker, maxLength ); - }, - - getCursors : function() - { - return this._.cursors; - } - }; - - - // The remaining document range after the character cursor. - function getRangeAfterCursor( cursor , inclusive ) - { - var range = new CKEDITOR.dom.range(); - range.setStart( cursor.textNode, - ( inclusive ? cursor.offset : cursor.offset + 1 ) ); - range.setEndAt( editor.document.getBody(), - CKEDITOR.POSITION_BEFORE_END ); - return range; - } - - // The document range before the character cursor. - function getRangeBeforeCursor( cursor ) - { - var range = new CKEDITOR.dom.range(); - range.setStartAt( editor.document.getBody(), - CKEDITOR.POSITION_AFTER_START ); - range.setEnd( cursor.textNode, cursor.offset ); - return range; - } - - var KMP_NOMATCH = 0, - KMP_ADVANCED = 1, - KMP_MATCHED = 2; - /** - * Examination the occurrence of a word which implement KMP algorithm. - */ - var kmpMatcher = function( pattern, ignoreCase ) - { - var overlap = [ -1 ]; - if ( ignoreCase ) - pattern = pattern.toLowerCase(); - for ( var i = 0 ; i < pattern.length ; i++ ) - { - overlap.push( overlap[i] + 1 ); - while ( overlap[ i + 1 ] > 0 - && pattern.charAt( i ) != pattern - .charAt( overlap[ i + 1 ] - 1 ) ) - overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1; - } - - this._ = { - overlap : overlap, - state : 0, - ignoreCase : !!ignoreCase, - pattern : pattern - }; - }; - - kmpMatcher.prototype = - { - feedCharacter : function( c ) - { - if ( this._.ignoreCase ) - c = c.toLowerCase(); - - while ( true ) - { - if ( c == this._.pattern.charAt( this._.state ) ) - { - this._.state++; - if ( this._.state == this._.pattern.length ) - { - this._.state = 0; - return KMP_MATCHED; - } - return KMP_ADVANCED; - } - else if ( !this._.state ) - return KMP_NOMATCH; - else - this._.state = this._.overlap[ this._.state ]; - } - - return null; - }, - - reset : function() - { - this._.state = 0; - } - }; - - var wordSeparatorRegex = - /[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/; - - var isWordSeparator = function( c ) - { - if ( !c ) - return true; - var code = c.charCodeAt( 0 ); - return ( code >= 9 && code <= 0xd ) - || ( code >= 0x2000 && code <= 0x200a ) - || wordSeparatorRegex.test( c ); - }; - - var finder = { - searchRange : null, - matchRange : null, - find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun ) - { - if ( !this.matchRange ) - this.matchRange = - new characterRange( - new characterWalker( this.searchRange ), - pattern.length ); - else - { - this.matchRange.removeHighlight(); - this.matchRange = this.matchRange.getNextCharacterRange( pattern.length ); - } - - var matcher = new kmpMatcher( pattern, !matchCase ), - matchState = KMP_NOMATCH, - character = '%'; - - while ( character !== null ) - { - this.matchRange.moveNext(); - while ( ( character = this.matchRange.getEndCharacter() ) ) - { - matchState = matcher.feedCharacter( character ); - if ( matchState == KMP_MATCHED ) - break; - if ( this.matchRange.moveNext().hitMatchBoundary ) - matcher.reset(); - } - - if ( matchState == KMP_MATCHED ) - { - if ( matchWord ) - { - var cursors = this.matchRange.getCursors(), - tail = cursors[ cursors.length - 1 ], - head = cursors[ 0 ]; - - var rangeBefore = getRangeBeforeCursor( head ), - rangeAfter = getRangeAfterCursor( tail ); - - // The word boundary checks requires to trim the text nodes. (#9036) - rangeBefore.trim(); - rangeAfter.trim(); - - var headWalker = new characterWalker( rangeBefore, true ), - tailWalker = new characterWalker( rangeAfter, true ); - - if ( ! ( isWordSeparator( headWalker.back().character ) - && isWordSeparator( tailWalker.next().character ) ) ) - continue; - } - this.matchRange.setMatched(); - if ( highlightMatched !== false ) - this.matchRange.highlight(); - return true; - } - } - - this.matchRange.clearMatched(); - this.matchRange.removeHighlight(); - // Clear current session and restart with the default search - // range. - // Re-run the finding once for cyclic.(#3517) - if ( matchCyclic && !cyclicRerun ) - { - this.searchRange = getSearchRange( 1 ); - this.matchRange = null; - return arguments.callee.apply( this, - Array.prototype.slice.call( arguments ).concat( [ true ] ) ); - } - - return false; - }, - - /** - * Record how much replacement occurred toward one replacing. - */ - replaceCounter : 0, - - replace : function( dialog, pattern, newString, matchCase, matchWord, - matchCyclic , isReplaceAll ) - { - isReplace = 1; - - // Successiveness of current replace/find. - var result = 0; - - // 1. Perform the replace when there's already a match here. - // 2. Otherwise perform the find but don't replace it immediately. - if ( this.matchRange && this.matchRange.isMatched() - && !this.matchRange._.isReplaced && !this.matchRange.isReadOnly() ) - { - // Turn off highlight for a while when saving snapshots. - this.matchRange.removeHighlight(); - var domRange = this.matchRange.toDomRange(); - var text = editor.document.createText( newString ); - if ( !isReplaceAll ) - { - // Save undo snaps before and after the replacement. - var selection = editor.getSelection(); - selection.selectRanges( [ domRange ] ); - editor.fire( 'saveSnapshot' ); - } - domRange.deleteContents(); - domRange.insertNode( text ); - if ( !isReplaceAll ) - { - selection.selectRanges( [ domRange ] ); - editor.fire( 'saveSnapshot' ); - } - this.matchRange.updateFromDomRange( domRange ); - if ( !isReplaceAll ) - this.matchRange.highlight(); - this.matchRange._.isReplaced = true; - this.replaceCounter++; - result = 1; - } - else - result = this.find( pattern, matchCase, matchWord, matchCyclic, !isReplaceAll ); - - isReplace = 0; - - return result; - } - }; - - /** - * The range in which find/replace happened, receive from user - * selection prior. - */ - function getSearchRange( isDefault ) - { - var searchRange, - sel = editor.getSelection(), - body = editor.document.getBody(); - if ( sel && !isDefault ) - { - searchRange = sel.getRanges()[ 0 ].clone(); - searchRange.collapse( true ); - } - else - { - searchRange = new CKEDITOR.dom.range(); - searchRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); - } - searchRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); - return searchRange; - } - - var lang = editor.lang.findAndReplace; - return { - title : lang.title, - resizable : CKEDITOR.DIALOG_RESIZE_NONE, - minWidth : 350, - minHeight : 170, - buttons : [ CKEDITOR.dialog.cancelButton ], // Cancel button only. - contents : [ - { - id : 'find', - label : lang.find, - title : lang.find, - accessKey : '', - elements : [ - { - type : 'hbox', - widths : [ '230px', '90px' ], - children : - [ - { - type : 'text', - id : 'txtFindFind', - label : lang.findWhat, - isChanged : false, - labelLayout : 'horizontal', - accessKey : 'F' - }, - { - type : 'button', - id : 'btnFind', - align : 'left', - style : 'width:100%', - label : lang.find, - onClick : function() - { - var dialog = this.getDialog(); - if ( !finder.find( dialog.getValueOf( 'find', 'txtFindFind' ), - dialog.getValueOf( 'find', 'txtFindCaseChk' ), - dialog.getValueOf( 'find', 'txtFindWordChk' ), - dialog.getValueOf( 'find', 'txtFindCyclic' ) ) ) - alert( lang - .notFoundMsg ); - } - } - ] - }, - { - type : 'fieldset', - label : CKEDITOR.tools.htmlEncode( lang.findOptions ), - style : 'margin-top:29px', - children : - [ - { - type : 'vbox', - padding : 0, - children : - [ - { - type : 'checkbox', - id : 'txtFindCaseChk', - isChanged : false, - label : lang.matchCase - }, - { - type : 'checkbox', - id : 'txtFindWordChk', - isChanged : false, - label : lang.matchWord - }, - { - type : 'checkbox', - id : 'txtFindCyclic', - isChanged : false, - 'default' : true, - label : lang.matchCyclic - } - ] - } - ] - } - ] - }, - { - id : 'replace', - label : lang.replace, - accessKey : 'M', - elements : [ - { - type : 'hbox', - widths : [ '230px', '90px' ], - children : - [ - { - type : 'text', - id : 'txtFindReplace', - label : lang.findWhat, - isChanged : false, - labelLayout : 'horizontal', - accessKey : 'F' - }, - { - type : 'button', - id : 'btnFindReplace', - align : 'left', - style : 'width:100%', - label : lang.replace, - onClick : function() - { - var dialog = this.getDialog(); - if ( !finder.replace( dialog, - dialog.getValueOf( 'replace', 'txtFindReplace' ), - dialog.getValueOf( 'replace', 'txtReplace' ), - dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), - dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), - dialog.getValueOf( 'replace', 'txtReplaceCyclic' ) ) ) - alert( lang - .notFoundMsg ); - } - } - ] - }, - { - type : 'hbox', - widths : [ '230px', '90px' ], - children : - [ - { - type : 'text', - id : 'txtReplace', - label : lang.replaceWith, - isChanged : false, - labelLayout : 'horizontal', - accessKey : 'R' - }, - { - type : 'button', - id : 'btnReplaceAll', - align : 'left', - style : 'width:100%', - label : lang.replaceAll, - isChanged : false, - onClick : function() - { - var dialog = this.getDialog(); - var replaceNums; - - finder.replaceCounter = 0; - - // Scope to full document. - finder.searchRange = getSearchRange( 1 ); - if ( finder.matchRange ) - { - finder.matchRange.removeHighlight(); - finder.matchRange = null; - } - editor.fire( 'saveSnapshot' ); - while ( finder.replace( dialog, - dialog.getValueOf( 'replace', 'txtFindReplace' ), - dialog.getValueOf( 'replace', 'txtReplace' ), - dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), - dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), - false, true ) ) - { /*jsl:pass*/ } - - if ( finder.replaceCounter ) - { - alert( lang.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) ); - editor.fire( 'saveSnapshot' ); - } - else - alert( lang.notFoundMsg ); - } - } - ] - }, - { - type : 'fieldset', - label : CKEDITOR.tools.htmlEncode( lang.findOptions ), - children : - [ - { - type : 'vbox', - padding : 0, - children : - [ - { - type : 'checkbox', - id : 'txtReplaceCaseChk', - isChanged : false, - label : lang.matchCase - }, - { - type : 'checkbox', - id : 'txtReplaceWordChk', - isChanged : false, - label : lang.matchWord - }, - { - type : 'checkbox', - id : 'txtReplaceCyclic', - isChanged : false, - 'default' : true, - label : lang.matchCyclic - } - ] - } - ] - } - ] - } - ], - onLoad : function() - { - var dialog = this; - - // Keep track of the current pattern field in use. - var patternField, wholeWordChkField; - - // Ignore initial page select on dialog show - var isUserSelect = 0; - this.on( 'hide', function() - { - isUserSelect = 0; - }); - this.on( 'show', function() - { - isUserSelect = 1; - }); - - this.selectPage = CKEDITOR.tools.override( this.selectPage, function( originalFunc ) - { - return function( pageId ) - { - originalFunc.call( dialog, pageId ); - - var currPage = dialog._.tabs[ pageId ]; - var patternFieldInput, patternFieldId, wholeWordChkFieldId; - patternFieldId = pageId === 'find' ? 'txtFindFind' : 'txtFindReplace'; - wholeWordChkFieldId = pageId === 'find' ? 'txtFindWordChk' : 'txtReplaceWordChk'; - - patternField = dialog.getContentElement( pageId, - patternFieldId ); - wholeWordChkField = dialog.getContentElement( pageId, - wholeWordChkFieldId ); - - // Prepare for check pattern text filed 'keyup' event - if ( !currPage.initialized ) - { - patternFieldInput = CKEDITOR.document - .getById( patternField._.inputId ); - currPage.initialized = true; - } - - // Synchronize fields on tab switch. - if ( isUserSelect ) - syncFieldsBetweenTabs.call( this, pageId ); - }; - } ); - - }, - onShow : function() - { - // Establish initial searching start position. - finder.searchRange = getSearchRange(); - - // Fill in the find field with selected text. - var selectedText = this.getParentEditor().getSelection().getSelectedText(), - patternFieldId = ( startupPage == 'find' ? 'txtFindFind' : 'txtFindReplace' ); - - var field = this.getContentElement( startupPage, patternFieldId ); - field.setValue( selectedText ); - field.select(); - - this.selectPage( startupPage ); - - this[ ( startupPage == 'find' && this._.editor.readOnly? 'hide' : 'show' ) + 'Page' ]( 'replace'); - }, - onHide : function() - { - var range; - if ( finder.matchRange && finder.matchRange.isMatched() ) - { - finder.matchRange.removeHighlight(); - editor.focus(); - - range = finder.matchRange.toDomRange(); - if ( range ) - editor.getSelection().selectRanges( [ range ] ); - } - - // Clear current session before dialog close - delete finder.matchRange; - }, - onFocus : function() - { - if ( startupPage == 'replace' ) - return this.getContentElement( 'replace', 'txtFindReplace' ); - else - return this.getContentElement( 'find', 'txtFindFind' ); - } - }; - }; - - CKEDITOR.dialog.add( 'find', function( editor ) - { - return findDialog( editor, 'find' ); - }); - - CKEDITOR.dialog.add( 'replace', function( editor ) - { - return findDialog( editor, 'replace' ); - }); -})(); diff --git a/_source/plugins/find/plugin.js b/_source/plugins/find/plugin.js deleted file mode 100644 index e1a1aaa..0000000 --- a/_source/plugins/find/plugin.js +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -CKEDITOR.plugins.add( 'find', -{ - requires : [ 'dialog' ], - init : function( editor ) - { - var forms = CKEDITOR.plugins.find; - editor.ui.addButton( 'Find', - { - label : editor.lang.findAndReplace.find, - command : 'find' - }); - var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) ); - findCommand.canUndo = false; - findCommand.readOnly = 1; - - editor.ui.addButton( 'Replace', - { - label : editor.lang.findAndReplace.replace, - command : 'replace' - }); - var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) ); - replaceCommand.canUndo = false; - - CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' ); - CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' ); - }, - - requires : [ 'styles' ] -} ); - -/** - * Defines the style to be used to highlight results with the find dialog. - * @type Object - * @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } } - * @example - * // Highlight search results with blue on yellow. - * config.find_highlight = - * { - * element : 'span', - * styles : { 'background-color' : '#ff0', 'color' : '#00f' } - * }; - */ -CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } }; diff --git a/_source/plugins/flash/dialogs/flash.js b/_source/plugins/flash/dialogs/flash.js deleted file mode 100644 index 20bec0d..0000000 --- a/_source/plugins/flash/dialogs/flash.js +++ /dev/null @@ -1,665 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - /* - * It is possible to set things in three different places. - * 1. As attributes in the object tag. - * 2. As param tags under the object tag. - * 3. As attributes in the embed tag. - * It is possible for a single attribute to be present in more than one place. - * So let's define a mapping between a sementic attribute and its syntactic - * equivalents. - * Then we'll set and retrieve attribute values according to the mapping, - * instead of having to check and set each syntactic attribute every time. - * - * Reference: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701 - */ - var ATTRTYPE_OBJECT = 1, - ATTRTYPE_PARAM = 2, - ATTRTYPE_EMBED = 4; - - var attributesMap = - { - id : [ { type : ATTRTYPE_OBJECT, name : 'id' } ], - classid : [ { type : ATTRTYPE_OBJECT, name : 'classid' } ], - codebase : [ { type : ATTRTYPE_OBJECT, name : 'codebase'} ], - pluginspage : [ { type : ATTRTYPE_EMBED, name : 'pluginspage' } ], - src : [ { type : ATTRTYPE_PARAM, name : 'movie' }, { type : ATTRTYPE_EMBED, name : 'src' }, { type : ATTRTYPE_OBJECT, name : 'data' } ], - name : [ { type : ATTRTYPE_EMBED, name : 'name' } ], - align : [ { type : ATTRTYPE_OBJECT, name : 'align' } ], - 'class' : [ { type : ATTRTYPE_OBJECT, name : 'class' }, { type : ATTRTYPE_EMBED, name : 'class'} ], - width : [ { type : ATTRTYPE_OBJECT, name : 'width' }, { type : ATTRTYPE_EMBED, name : 'width' } ], - height : [ { type : ATTRTYPE_OBJECT, name : 'height' }, { type : ATTRTYPE_EMBED, name : 'height' } ], - hSpace : [ { type : ATTRTYPE_OBJECT, name : 'hSpace' }, { type : ATTRTYPE_EMBED, name : 'hSpace' } ], - vSpace : [ { type : ATTRTYPE_OBJECT, name : 'vSpace' }, { type : ATTRTYPE_EMBED, name : 'vSpace' } ], - style : [ { type : ATTRTYPE_OBJECT, name : 'style' }, { type : ATTRTYPE_EMBED, name : 'style' } ], - type : [ { type : ATTRTYPE_EMBED, name : 'type' } ] - }; - - var names = [ 'play', 'loop', 'menu', 'quality', 'scale', 'salign', 'wmode', 'bgcolor', 'base', 'flashvars', 'allowScriptAccess', - 'allowFullScreen' ]; - for ( var i = 0 ; i < names.length ; i++ ) - attributesMap[ names[i] ] = [ { type : ATTRTYPE_EMBED, name : names[i] }, { type : ATTRTYPE_PARAM, name : names[i] } ]; - names = [ 'allowFullScreen', 'play', 'loop', 'menu' ]; - for ( i = 0 ; i < names.length ; i++ ) - attributesMap[ names[i] ][0]['default'] = attributesMap[ names[i] ][1]['default'] = true; - - var defaultToPixel = CKEDITOR.tools.cssLength; - - function loadValue( objectNode, embedNode, paramMap ) - { - var attributes = attributesMap[ this.id ]; - if ( !attributes ) - return; - - var isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox ); - for ( var i = 0 ; i < attributes.length ; i++ ) - { - var attrDef = attributes[ i ]; - switch ( attrDef.type ) - { - case ATTRTYPE_OBJECT: - if ( !objectNode ) - continue; - if ( objectNode.getAttribute( attrDef.name ) !== null ) - { - var value = objectNode.getAttribute( attrDef.name ); - if ( isCheckbox ) - this.setValue( value.toLowerCase() == 'true' ); - else - this.setValue( value ); - return; - } - else if ( isCheckbox ) - this.setValue( !!attrDef[ 'default' ] ); - break; - case ATTRTYPE_PARAM: - if ( !objectNode ) - continue; - if ( attrDef.name in paramMap ) - { - value = paramMap[ attrDef.name ]; - if ( isCheckbox ) - this.setValue( value.toLowerCase() == 'true' ); - else - this.setValue( value ); - return; - } - else if ( isCheckbox ) - this.setValue( !!attrDef[ 'default' ] ); - break; - case ATTRTYPE_EMBED: - if ( !embedNode ) - continue; - if ( embedNode.getAttribute( attrDef.name ) ) - { - value = embedNode.getAttribute( attrDef.name ); - if ( isCheckbox ) - this.setValue( value.toLowerCase() == 'true' ); - else - this.setValue( value ); - return; - } - else if ( isCheckbox ) - this.setValue( !!attrDef[ 'default' ] ); - } - } - } - - function commitValue( objectNode, embedNode, paramMap ) - { - var attributes = attributesMap[ this.id ]; - if ( !attributes ) - return; - - var isRemove = ( this.getValue() === '' ), - isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox ); - - for ( var i = 0 ; i < attributes.length ; i++ ) - { - var attrDef = attributes[i]; - switch ( attrDef.type ) - { - case ATTRTYPE_OBJECT: - // Avoid applying the data attribute when not needed (#7733) - if ( !objectNode || ( attrDef.name == 'data' && embedNode && !objectNode.hasAttribute( 'data' ) ) ) - continue; - var value = this.getValue(); - if ( isRemove || isCheckbox && value === attrDef[ 'default' ] ) - objectNode.removeAttribute( attrDef.name ); - else - objectNode.setAttribute( attrDef.name, value ); - break; - case ATTRTYPE_PARAM: - if ( !objectNode ) - continue; - value = this.getValue(); - if ( isRemove || isCheckbox && value === attrDef[ 'default' ] ) - { - if ( attrDef.name in paramMap ) - paramMap[ attrDef.name ].remove(); - } - else - { - if ( attrDef.name in paramMap ) - paramMap[ attrDef.name ].setAttribute( 'value', value ); - else - { - var param = CKEDITOR.dom.element.createFromHtml( '', objectNode.getDocument() ); - param.setAttributes( { name : attrDef.name, value : value } ); - if ( objectNode.getChildCount() < 1 ) - param.appendTo( objectNode ); - else - param.insertBefore( objectNode.getFirst() ); - } - } - break; - case ATTRTYPE_EMBED: - if ( !embedNode ) - continue; - value = this.getValue(); - if ( isRemove || isCheckbox && value === attrDef[ 'default' ]) - embedNode.removeAttribute( attrDef.name ); - else - embedNode.setAttribute( attrDef.name, value ); - } - } - } - - CKEDITOR.dialog.add( 'flash', function( editor ) - { - var makeObjectTag = !editor.config.flashEmbedTagOnly, - makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly; - - var previewPreloader, - previewAreaHtml = '
      ' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
      ' + - '' + - '
      '; - - return { - title : editor.lang.flash.title, - minWidth : 420, - minHeight : 310, - onShow : function() - { - // Clear previously saved elements. - this.fakeImage = this.objectNode = this.embedNode = null; - previewPreloader = new CKEDITOR.dom.element( 'embed', editor.document ); - - // Try to detect any embed or object tag that has Flash parameters. - var fakeImage = this.getSelectedElement(); - if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'flash' ) - { - this.fakeImage = fakeImage; - - var realElement = editor.restoreRealElement( fakeImage ), - objectNode = null, embedNode = null, paramMap = {}; - if ( realElement.getName() == 'cke:object' ) - { - objectNode = realElement; - var embedList = objectNode.getElementsByTag( 'embed', 'cke' ); - if ( embedList.count() > 0 ) - embedNode = embedList.getItem( 0 ); - var paramList = objectNode.getElementsByTag( 'param', 'cke' ); - for ( var i = 0, length = paramList.count() ; i < length ; i++ ) - { - var item = paramList.getItem( i ), - name = item.getAttribute( 'name' ), - value = item.getAttribute( 'value' ); - paramMap[ name ] = value; - } - } - else if ( realElement.getName() == 'cke:embed' ) - embedNode = realElement; - - this.objectNode = objectNode; - this.embedNode = embedNode; - - this.setupContent( objectNode, embedNode, paramMap, fakeImage ); - } - }, - onOk : function() - { - // If there's no selected object or embed, create one. Otherwise, reuse the - // selected object and embed nodes. - var objectNode = null, - embedNode = null, - paramMap = null; - if ( !this.fakeImage ) - { - if ( makeObjectTag ) - { - objectNode = CKEDITOR.dom.element.createFromHtml( '', editor.document ); - var attributes = { - classid : 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000', - codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' - }; - objectNode.setAttributes( attributes ); - } - if ( makeEmbedTag ) - { - embedNode = CKEDITOR.dom.element.createFromHtml( '', editor.document ); - embedNode.setAttributes( - { - type : 'application/x-shockwave-flash', - pluginspage : 'http://www.macromedia.com/go/getflashplayer' - } ); - if ( objectNode ) - embedNode.appendTo( objectNode ); - } - } - else - { - objectNode = this.objectNode; - embedNode = this.embedNode; - } - - // Produce the paramMap if there's an object tag. - if ( objectNode ) - { - paramMap = {}; - var paramList = objectNode.getElementsByTag( 'param', 'cke' ); - for ( var i = 0, length = paramList.count() ; i < length ; i++ ) - paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i ); - } - - // A subset of the specified attributes/styles - // should also be applied on the fake element to - // have better visual effect. (#5240) - var extraStyles = {}, extraAttributes = {}; - this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes ); - - // Refresh the fake image. - var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true ); - newFakeImage.setAttributes( extraAttributes ); - newFakeImage.setStyles( extraStyles ); - if ( this.fakeImage ) - { - newFakeImage.replace( this.fakeImage ); - editor.getSelection().selectElement( newFakeImage ); - } - else - editor.insertElement( newFakeImage ); - }, - - onHide : function() - { - if ( this.preview ) - this.preview.setHtml(''); - }, - - contents : [ - { - id : 'info', - label : editor.lang.common.generalTab, - accessKey : 'I', - elements : - [ - { - type : 'vbox', - padding : 0, - children : - [ - { - type : 'hbox', - widths : [ '280px', '110px' ], - align : 'right', - children : - [ - { - id : 'src', - type : 'text', - label : editor.lang.common.url, - required : true, - validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.flash.validateSrc ), - setup : loadValue, - commit : commitValue, - onLoad : function() - { - var dialog = this.getDialog(), - updatePreview = function( src ){ - // Query the preloader to figure out the url impacted by based href. - previewPreloader.setAttribute( 'src', src ); - dialog.preview.setHtml( '' ); - }; - // Preview element - dialog.preview = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 ); - - // Sync on inital value loaded. - this.on( 'change', function( evt ){ - - if ( evt.data && evt.data.value ) - updatePreview( evt.data.value ); - } ); - // Sync when input value changed. - this.getInputElement().on( 'change', function( evt ){ - - updatePreview( this.getValue() ); - }, this ); - } - }, - { - type : 'button', - id : 'browse', - filebrowser : 'info:src', - hidden : true, - // v-align with the 'src' field. - // TODO: We need something better than a fixed size here. - style : 'display:inline-block;margin-top:10px;', - label : editor.lang.common.browseServer - } - ] - } - ] - }, - { - type : 'hbox', - widths : [ '25%', '25%', '25%', '25%', '25%' ], - children : - [ - { - type : 'text', - id : 'width', - style : 'width:95px', - label : editor.lang.common.width, - validate : CKEDITOR.dialog.validate.htmlLength( editor.lang.common.invalidHtmlLength.replace( '%1', editor.lang.common.width ) ), - setup : loadValue, - commit : commitValue - }, - { - type : 'text', - id : 'height', - style : 'width:95px', - label : editor.lang.common.height, - validate : CKEDITOR.dialog.validate.htmlLength( editor.lang.common.invalidHtmlLength.replace( '%1', editor.lang.common.height ) ), - setup : loadValue, - commit : commitValue - }, - { - type : 'text', - id : 'hSpace', - style : 'width:95px', - label : editor.lang.flash.hSpace, - validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHSpace ), - setup : loadValue, - commit : commitValue - }, - { - type : 'text', - id : 'vSpace', - style : 'width:95px', - label : editor.lang.flash.vSpace, - validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateVSpace ), - setup : loadValue, - commit : commitValue - } - ] - }, - - { - type : 'vbox', - children : - [ - { - type : 'html', - id : 'preview', - style : 'width:95%;', - html : previewAreaHtml - } - ] - } - ] - }, - { - id : 'Upload', - hidden : true, - filebrowser : 'uploadButton', - label : editor.lang.common.upload, - elements : - [ - { - type : 'file', - id : 'upload', - label : editor.lang.common.upload, - size : 38 - }, - { - type : 'fileButton', - id : 'uploadButton', - label : editor.lang.common.uploadSubmit, - filebrowser : 'info:src', - 'for' : [ 'Upload', 'upload' ] - } - ] - }, - { - id : 'properties', - label : editor.lang.flash.propertiesTab, - elements : - [ - { - type : 'hbox', - widths : [ '50%', '50%' ], - children : - [ - { - id : 'scale', - type : 'select', - label : editor.lang.flash.scale, - 'default' : '', - style : 'width : 100%;', - items : - [ - [ editor.lang.common.notSet , ''], - [ editor.lang.flash.scaleAll, 'showall' ], - [ editor.lang.flash.scaleNoBorder, 'noborder' ], - [ editor.lang.flash.scaleFit, 'exactfit' ] - ], - setup : loadValue, - commit : commitValue - }, - { - id : 'allowScriptAccess', - type : 'select', - label : editor.lang.flash.access, - 'default' : '', - style : 'width : 100%;', - items : - [ - [ editor.lang.common.notSet , ''], - [ editor.lang.flash.accessAlways, 'always' ], - [ editor.lang.flash.accessSameDomain, 'samedomain' ], - [ editor.lang.flash.accessNever, 'never' ] - ], - setup : loadValue, - commit : commitValue - } - ] - }, - { - type : 'hbox', - widths : [ '50%', '50%' ], - children : - [ - { - id : 'wmode', - type : 'select', - label : editor.lang.flash.windowMode, - 'default' : '', - style : 'width : 100%;', - items : - [ - [ editor.lang.common.notSet , '' ], - [ editor.lang.flash.windowModeWindow, 'window' ], - [ editor.lang.flash.windowModeOpaque, 'opaque' ], - [ editor.lang.flash.windowModeTransparent, 'transparent' ] - ], - setup : loadValue, - commit : commitValue - }, - { - id : 'quality', - type : 'select', - label : editor.lang.flash.quality, - 'default' : 'high', - style : 'width : 100%;', - items : - [ - [ editor.lang.common.notSet , '' ], - [ editor.lang.flash.qualityBest, 'best' ], - [ editor.lang.flash.qualityHigh, 'high' ], - [ editor.lang.flash.qualityAutoHigh, 'autohigh' ], - [ editor.lang.flash.qualityMedium, 'medium' ], - [ editor.lang.flash.qualityAutoLow, 'autolow' ], - [ editor.lang.flash.qualityLow, 'low' ] - ], - setup : loadValue, - commit : commitValue - } - ] - }, - { - type : 'hbox', - widths : [ '50%', '50%' ], - children : - [ - { - id : 'align', - type : 'select', - label : editor.lang.common.align, - 'default' : '', - style : 'width : 100%;', - items : - [ - [ editor.lang.common.notSet , ''], - [ editor.lang.common.alignLeft , 'left'], - [ editor.lang.flash.alignAbsBottom , 'absBottom'], - [ editor.lang.flash.alignAbsMiddle , 'absMiddle'], - [ editor.lang.flash.alignBaseline , 'baseline'], - [ editor.lang.common.alignBottom , 'bottom'], - [ editor.lang.common.alignMiddle , 'middle'], - [ editor.lang.common.alignRight , 'right'], - [ editor.lang.flash.alignTextTop , 'textTop'], - [ editor.lang.common.alignTop , 'top'] - ], - setup : loadValue, - commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes ) - { - var value = this.getValue(); - commitValue.apply( this, arguments ); - value && ( extraAttributes.align = value ); - } - }, - { - type : 'html', - html : '
      ' - } - ] - }, - { - type : 'fieldset', - label : CKEDITOR.tools.htmlEncode( editor.lang.flash.flashvars ), - children : - [ - { - type : 'vbox', - padding : 0, - children : - [ - { - type : 'checkbox', - id : 'menu', - label : editor.lang.flash.chkMenu, - 'default' : true, - setup : loadValue, - commit : commitValue - }, - { - type : 'checkbox', - id : 'play', - label : editor.lang.flash.chkPlay, - 'default' : true, - setup : loadValue, - commit : commitValue - }, - { - type : 'checkbox', - id : 'loop', - label : editor.lang.flash.chkLoop, - 'default' : true, - setup : loadValue, - commit : commitValue - }, - { - type : 'checkbox', - id : 'allowFullScreen', - label : editor.lang.flash.chkFull, - 'default' : true, - setup : loadValue, - commit : commitValue - } - ] - } - ] - } - ] - }, - { - id : 'advanced', - label : editor.lang.common.advancedTab, - elements : - [ - { - type : 'hbox', - children : - [ - { - type : 'text', - id : 'id', - label : editor.lang.common.id, - setup : loadValue, - commit : commitValue - } - ] - }, - { - type : 'hbox', - widths : [ '45%', '55%' ], - children : - [ - { - type : 'text', - id : 'bgcolor', - label : editor.lang.flash.bgcolor, - setup : loadValue, - commit : commitValue - }, - { - type : 'text', - id : 'class', - label : editor.lang.common.cssClass, - setup : loadValue, - commit : commitValue - } - ] - }, - { - type : 'text', - id : 'style', - validate : CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ), - label : editor.lang.common.cssStyle, - setup : loadValue, - commit : commitValue - } - ] - } - ] - }; - } ); -})(); diff --git a/_source/plugins/flash/images/placeholder.png b/_source/plugins/flash/images/placeholder.png deleted file mode 100644 index 0bc6caa7a6abca57d3f1e1376fbd5067d5cd66d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmV+b0ssDqP)4p_Nnh8Sn%0^H2yKmXs_)2F ztJy_}S7x3Wy+9bua($h3aU$x8vL^9#zi)q&hjjO!f8h;)*e}{WeFK#M0000 - for ( var i = 0 ; i < element.children.length ; i++ ) - { - if ( element.children[ i ].name == 'cke:embed' ) - { - if ( !isFlashEmbed( element.children[ i ] ) ) - return null; - - return createFakeElement( editor, element ); - } - } - return null; - } - - return createFakeElement( editor, element ); - }, - - 'cke:embed' : function( element ) - { - if ( !isFlashEmbed( element ) ) - return null; - - return createFakeElement( editor, element ); - } - } - }, - 5); - } - }, - - requires : [ 'fakeobjects' ] - }); -})(); - -CKEDITOR.tools.extend( CKEDITOR.config, -{ - /** - * Save as EMBED tag only. This tag is unrecommended. - * @type Boolean - * @default false - */ - flashEmbedTagOnly : false, - - /** - * Add EMBED tag as alternative: <object><embed></embed></object> - * @type Boolean - * @default false - */ - flashAddEmbedTag : true, - - /** - * Use embedTagOnly and addEmbedTag values on edit. - * @type Boolean - * @default false - */ - flashConvertOnEdit : false -} ); diff --git a/_source/plugins/floatpanel/plugin.js b/_source/plugins/floatpanel/plugin.js deleted file mode 100644 index 4a24dfa..0000000 --- a/_source/plugins/floatpanel/plugin.js +++ /dev/null @@ -1,469 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -CKEDITOR.plugins.add( 'floatpanel', -{ - requires : [ 'panel' ] -}); - -(function() -{ - var panels = {}; - var isShowing = false; - - function getPanel( editor, doc, parentElement, definition, level ) - { - // Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level] - var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir, - editor.uiColor || '', definition.css || '', level || '' ); - - var panel = panels[ key ]; - - if ( !panel ) - { - panel = panels[ key ] = new CKEDITOR.ui.panel( doc, definition ); - panel.element = parentElement.append( CKEDITOR.dom.element.createFromHtml( panel.renderHtml( editor ), doc ) ); - - panel.element.setStyles( - { - display : 'none', - position : 'absolute' - }); - } - - return panel; - } - - CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass( - { - $ : function( editor, parentElement, definition, level ) - { - definition.forceIFrame = 1; - - var doc = parentElement.getDocument(), - panel = getPanel( editor, doc, parentElement, definition, level || 0 ), - element = panel.element, - iframe = element.getFirst().getFirst(); - - // Disable native browser menu. (#4825) - element.disableContextMenu(); - - this.element = element; - - this._ = - { - editor : editor, - // The panel that will be floating. - panel : panel, - parentElement : parentElement, - definition : definition, - document : doc, - iframe : iframe, - children : [], - dir : editor.lang.dir - }; - - editor.on( 'mode', function(){ this.hide(); }, this ); - }, - - proto : - { - addBlock : function( name, block ) - { - return this._.panel.addBlock( name, block ); - }, - - addListBlock : function( name, multiSelect ) - { - return this._.panel.addListBlock( name, multiSelect ); - }, - - getBlock : function( name ) - { - return this._.panel.getBlock( name ); - }, - - /* - corner (LTR): - 1 = top-left - 2 = top-right - 3 = bottom-right - 4 = bottom-left - - corner (RTL): - 1 = top-right - 2 = top-left - 3 = bottom-left - 4 = bottom-right - */ - showBlock : function( name, offsetParent, corner, offsetX, offsetY ) - { - var panel = this._.panel, - block = panel.showBlock( name ); - - this.allowBlur( false ); - isShowing = 1; - - // Record from where the focus is when open panel. - this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement ); - - - var element = this.element, - iframe = this._.iframe, - definition = this._.definition, - position = offsetParent.getDocumentPosition( element.getDocument() ), - rtl = this._.dir == 'rtl'; - - var left = position.x + ( offsetX || 0 ), - top = position.y + ( offsetY || 0 ); - - // Floating panels are off by (-1px, 0px) in RTL mode. (#3438) - if ( rtl && ( corner == 1 || corner == 4 ) ) - left += offsetParent.$.offsetWidth; - else if ( !rtl && ( corner == 2 || corner == 3 ) ) - left += offsetParent.$.offsetWidth - 1; - - if ( corner == 3 || corner == 4 ) - top += offsetParent.$.offsetHeight - 1; - - // Memorize offsetParent by it's ID. - this._.panel._.offsetParentId = offsetParent.getId(); - - element.setStyles( - { - top : top + 'px', - left: 0, - display : '' - }); - - // Don't use display or visibility style because we need to - // calculate the rendering layout later and focus the element. - element.setOpacity( 0 ); - - // To allow the context menu to decrease back their width - element.getFirst().removeStyle( 'width' ); - - // Configure the IFrame blur event. Do that only once. - if ( !this._.blurSet ) - { - // Non IE prefer the event into a window object. - var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); - - // With addEventListener compatible browsers, we must - // useCapture when registering the focus/blur events to - // guarantee they will be firing in all situations. (#3068, #3222 ) - CKEDITOR.event.useCapture = true; - - focused.on( 'blur', function( ev ) - { - if ( !this.allowBlur() ) - return; - - // As we are using capture to register the listener, - // the blur event may get fired even when focusing - // inside the window itself, so we must ensure the - // target is out of it. - var target = ev.data.getTarget() ; - if ( target.getName && target.getName() != 'iframe' ) - return; - - if ( this.visible && !this._.activeChild && !isShowing ) - { - // Panel close is caused by user's navigating away the focus, e.g. click outside the panel. - // DO NOT restore focus in this case. - delete this._.returnFocus; - this.hide(); - } - }, - this ); - - focused.on( 'focus', function() - { - this._.focused = true; - this.hideChild(); - this.allowBlur( true ); - }, - this ); - - CKEDITOR.event.useCapture = false; - - this._.blurSet = 1; - } - - panel.onEscape = CKEDITOR.tools.bind( function( keystroke ) - { - if ( this.onEscape && this.onEscape( keystroke ) === false ) - return false; - }, - this ); - - CKEDITOR.tools.setTimeout( function() - { - var panelLoad = CKEDITOR.tools.bind( function () - { - var target = element.getFirst(); - - if ( block.autoSize ) - { - var panelDoc = block.element.getDocument(); - var width = ( CKEDITOR.env.webkit? block.element : panelDoc.getBody() )[ '$' ].scrollWidth; - - // Account for extra height needed due to IE quirks box model bug: - // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug - // (#3426) - if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && width > 0 ) - width += ( target.$.offsetWidth || 0 ) - ( target.$.clientWidth || 0 ) + 3; - // A little extra at the end. - // If not present, IE6 might break into the next line, but also it looks better this way - width += 4 ; - - target.setStyle( 'width', width + 'px' ); - - // IE doesn't compute the scrollWidth if a filter is applied previously - block.element.addClass( 'cke_frameLoaded' ); - - var height = block.element.$.scrollHeight; - - // Account for extra height needed due to IE quirks box model bug: - // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug - // (#3426) - if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 ) - height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 ) + 3; - - target.setStyle( 'height', height + 'px' ); - - // Fix IE < 8 visibility. - panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); - } - else - target.removeStyle( 'height' ); - - // Flip panel layout horizontally in RTL with known width. - if ( rtl ) - left -= element.$.offsetWidth; - - // Pop the style now for measurement. - element.setStyle( 'left', left + 'px' ); - - /* panel layout smartly fit the viewport size. */ - var panelElement = panel.element, - panelWindow = panelElement.getWindow(), - rect = element.$.getBoundingClientRect(), - viewportSize = panelWindow.getViewPaneSize(); - - // Compensation for browsers that dont support "width" and "height". - var rectWidth = rect.width || rect.right - rect.left, - rectHeight = rect.height || rect.bottom - rect.top; - - // Check if default horizontal layout is impossible. - var spaceAfter = rtl ? rect.right : viewportSize.width - rect.left, - spaceBefore = rtl ? viewportSize.width - rect.right : rect.left; - - if ( rtl ) - { - if ( spaceAfter < rectWidth ) - { - // Flip to show on right. - if ( spaceBefore > rectWidth ) - left += rectWidth; - // Align to window left. - else if ( viewportSize.width > rectWidth ) - left = left - rect.left; - // Align to window right, never cutting the panel at right. - else - left = left - rect.right + viewportSize.width; - } - } - else if ( spaceAfter < rectWidth ) - { - // Flip to show on left. - if ( spaceBefore > rectWidth ) - left -= rectWidth; - // Align to window right. - else if ( viewportSize.width > rectWidth ) - left = left - rect.right + viewportSize.width; - // Align to window left, never cutting the panel at left. - else - left = left - rect.left; - } - - - // Check if the default vertical layout is possible. - var spaceBelow = viewportSize.height - rect.top, - spaceAbove = rect.top; - - if ( spaceBelow < rectHeight ) - { - // Flip to show above. - if ( spaceAbove > rectHeight ) - top -= rectHeight; - // Align to window bottom. - else if ( viewportSize.height > rectHeight ) - top = top - rect.bottom + viewportSize.height; - // Align to top, never cutting the panel at top. - else - top = top - rect.top; - } - - // If IE is in RTL, we have troubles with absolute - // position and horizontal scrolls. Here we have a - // series of hacks to workaround it. (#6146) - if ( CKEDITOR.env.ie ) - { - var offsetParent = new CKEDITOR.dom.element( element.$.offsetParent ), - scrollParent = offsetParent; - - // Quirks returns , but standards returns . - if ( scrollParent.getName() == 'html' ) - scrollParent = scrollParent.getDocument().getBody(); - - if ( scrollParent.getComputedStyle( 'direction' ) == 'rtl' ) - { - // For IE8, there is not much logic on this, but it works. - if ( CKEDITOR.env.ie8Compat ) - left -= element.getDocument().getDocumentElement().$.scrollLeft * 2; - else - left -= ( offsetParent.$.scrollWidth - offsetParent.$.clientWidth ); - } - } - - // Trigger the onHide event of the previously active panel to prevent - // incorrect styles from being applied (#6170) - var innerElement = element.getFirst(), - activePanel; - if ( ( activePanel = innerElement.getCustomData( 'activePanel' ) ) ) - activePanel.onHide && activePanel.onHide.call( this, 1 ); - innerElement.setCustomData( 'activePanel', this ); - - element.setStyles( - { - top : top + 'px', - left : left + 'px' - } ); - element.setOpacity( 1 ); - } , this ); - - panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad; - - // Set the panel frame focus, so the blur event gets fired. - CKEDITOR.tools.setTimeout( function() - { - iframe.$.contentWindow.focus(); - // We need this get fired manually because of unfired focus() function. - this.allowBlur( true ); - }, 0, this); - }, CKEDITOR.env.air ? 200 : 0, this); - this.visible = 1; - - if ( this.onShow ) - this.onShow.call( this ); - - isShowing = 0; - }, - - hide : function( returnFocus ) - { - if ( this.visible && ( !this.onHide || this.onHide.call( this ) !== true ) ) - { - this.hideChild(); - // Blur previously focused element. (#6671) - CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur(); - this.element.setStyle( 'display', 'none' ); - this.visible = 0; - this.element.getFirst().removeCustomData( 'activePanel' ); - - // Return focus properly. (#6247) - var focusReturn = returnFocus !== false && this._.returnFocus; - if ( focusReturn ) - { - // Webkit requires focus moved out panel iframe first. - if ( CKEDITOR.env.webkit && focusReturn.type ) - focusReturn.getWindow().$.focus(); - - focusReturn.focus(); - } - } - }, - - allowBlur : function( allow ) // Prevent editor from hiding the panel. #3222. - { - var panel = this._.panel; - if ( allow != undefined ) - panel.allowBlur = allow; - - return panel.allowBlur; - }, - - showAsChild : function( panel, blockName, offsetParent, corner, offsetX, offsetY ) - { - // Skip reshowing of child which is already visible. - if ( this._.activeChild == panel && panel._.panel._.offsetParentId == offsetParent.getId() ) - return; - - this.hideChild(); - - panel.onHide = CKEDITOR.tools.bind( function() - { - // Use a timeout, so we give time for this menu to get - // potentially focused. - CKEDITOR.tools.setTimeout( function() - { - if ( !this._.focused ) - this.hide(); - }, - 0, this ); - }, - this ); - - this._.activeChild = panel; - this._.focused = false; - - panel.showBlock( blockName, offsetParent, corner, offsetX, offsetY ); - - /* #3767 IE: Second level menu may not have borders */ - if ( CKEDITOR.env.ie7Compat || ( CKEDITOR.env.ie8 && CKEDITOR.env.ie6Compat ) ) - { - setTimeout(function() - { - panel.element.getChild( 0 ).$.style.cssText += ''; - }, 100); - } - }, - - hideChild : function() - { - var activeChild = this._.activeChild; - - if ( activeChild ) - { - delete activeChild.onHide; - // Sub panels don't manage focus. (#7881) - delete activeChild._.returnFocus; - delete this._.activeChild; - activeChild.hide(); - } - } - } - }); - - CKEDITOR.on( 'instanceDestroyed', function() - { - var isLastInstance = CKEDITOR.tools.isEmpty( CKEDITOR.instances ); - - for ( var i in panels ) - { - var panel = panels[ i ]; - // Safe to destroy it since there're no more instances.(#4241) - if ( isLastInstance ) - panel.destroy(); - // Panel might be used by other instances, just hide them.(#4552) - else - panel.element.hide(); - } - // Remove the registration. - isLastInstance && ( panels = {} ); - - } ); -})(); diff --git a/_source/plugins/font/plugin.js b/_source/plugins/font/plugin.js deleted file mode 100644 index 6248e68..0000000 --- a/_source/plugins/font/plugin.js +++ /dev/null @@ -1,234 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - function addCombo( editor, comboName, styleType, lang, entries, defaultLabel, styleDefinition ) - { - var config = editor.config; - - // Gets the list of fonts from the settings. - var names = entries.split( ';' ), - values = []; - - // Create style objects for all fonts. - var styles = {}; - for ( var i = 0 ; i < names.length ; i++ ) - { - var parts = names[ i ]; - - if ( parts ) - { - parts = parts.split( '/' ); - - var vars = {}, - name = names[ i ] = parts[ 0 ]; - - vars[ styleType ] = values[ i ] = parts[ 1 ] || name; - - styles[ name ] = new CKEDITOR.style( styleDefinition, vars ); - styles[ name ]._.definition.name = name; - } - else - names.splice( i--, 1 ); - } - - editor.ui.addRichCombo( comboName, - { - label : lang.label, - title : lang.panelTitle, - className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ), - panel : - { - css : editor.skin.editor.css.concat( config.contentsCss ), - multiSelect : false, - attributes : { 'aria-label' : lang.panelTitle } - }, - - init : function() - { - this.startGroup( lang.panelTitle ); - - for ( var i = 0 ; i < names.length ; i++ ) - { - var name = names[ i ]; - - // Add the tag entry to the panel list. - this.add( name, styles[ name ].buildPreview(), name ); - } - }, - - onClick : function( value ) - { - editor.focus(); - editor.fire( 'saveSnapshot' ); - - var style = styles[ value ]; - - if ( this.getValue() == value ) - style.remove( editor.document ); - else - style.apply( editor.document ); - - editor.fire( 'saveSnapshot' ); - }, - - onRender : function() - { - editor.on( 'selectionChange', function( ev ) - { - var currentValue = this.getValue(); - - var elementPath = ev.data.path, - elements = elementPath.elements; - - // For each element into the elements path. - for ( var i = 0, element ; i < elements.length ; i++ ) - { - element = elements[i]; - - // Check if the element is removable by any of - // the styles. - for ( var value in styles ) - { - if ( styles[ value ].checkElementMatch( element, true ) ) - { - if ( value != currentValue ) - this.setValue( value ); - return; - } - } - } - - // If no styles match, just empty it. - this.setValue( '', defaultLabel ); - }, - this); - } - }); - } - - CKEDITOR.plugins.add( 'font', - { - requires : [ 'richcombo', 'styles' ], - - init : function( editor ) - { - var config = editor.config; - - addCombo( editor, 'Font', 'family', editor.lang.font, config.font_names, config.font_defaultLabel, config.font_style ); - addCombo( editor, 'FontSize', 'size', editor.lang.fontSize, config.fontSize_sizes, config.fontSize_defaultLabel, config.fontSize_style ); - } - }); -})(); - -/** - * The list of fonts names to be displayed in the Font combo in the toolbar. - * Entries are separated by semi-colons (;), while it's possible to have more - * than one font for each entry, in the HTML way (separated by comma). - * - * A display name may be optionally defined by prefixing the entries with the - * name and the slash character. For example, "Arial/Arial, Helvetica, sans-serif" - * will be displayed as "Arial" in the list, but will be outputted as - * "Arial, Helvetica, sans-serif". - * @type String - * @example - * config.font_names = - * 'Arial/Arial, Helvetica, sans-serif;' + - * 'Times New Roman/Times New Roman, Times, serif;' + - * 'Verdana'; - * @example - * config.font_names = 'Arial;Times New Roman;Verdana'; - */ -CKEDITOR.config.font_names = - 'Arial/Arial, Helvetica, sans-serif;' + - 'Comic Sans MS/Comic Sans MS, cursive;' + - 'Courier New/Courier New, Courier, monospace;' + - 'Georgia/Georgia, serif;' + - 'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' + - 'Tahoma/Tahoma, Geneva, sans-serif;' + - 'Times New Roman/Times New Roman, Times, serif;' + - 'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' + - 'Verdana/Verdana, Geneva, sans-serif'; - -/** - * The text to be displayed in the Font combo is none of the available values - * matches the current cursor position or text selection. - * @type String - * @example - * // If the default site font is Arial, we may making it more explicit to the end user. - * config.font_defaultLabel = 'Arial'; - */ -CKEDITOR.config.font_defaultLabel = ''; - -/** - * The style definition to be used to apply the font in the text. - * @type Object - * @example - * // This is actually the default value for it. - * config.font_style = - * { - * element : 'span', - * styles : { 'font-family' : '#(family)' }, - * overrides : [ { element : 'font', attributes : { 'face' : null } } ] - * }; - */ -CKEDITOR.config.font_style = - { - element : 'span', - styles : { 'font-family' : '#(family)' }, - overrides : [ { element : 'font', attributes : { 'face' : null } } ] - }; - -/** - * The list of fonts size to be displayed in the Font Size combo in the - * toolbar. Entries are separated by semi-colons (;). - * - * Any kind of "CSS like" size can be used, like "12px", "2.3em", "130%", - * "larger" or "x-small". - * - * A display name may be optionally defined by prefixing the entries with the - * name and the slash character. For example, "Bigger Font/14px" will be - * displayed as "Bigger Font" in the list, but will be outputted as "14px". - * @type String - * @default '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px' - * @example - * config.fontSize_sizes = '16/16px;24/24px;48/48px;'; - * @example - * config.fontSize_sizes = '12px;2.3em;130%;larger;x-small'; - * @example - * config.fontSize_sizes = '12 Pixels/12px;Big/2.3em;30 Percent More/130%;Bigger/larger;Very Small/x-small'; - */ -CKEDITOR.config.fontSize_sizes = - '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'; - -/** - * The text to be displayed in the Font Size combo is none of the available - * values matches the current cursor position or text selection. - * @type String - * @example - * // If the default site font size is 12px, we may making it more explicit to the end user. - * config.fontSize_defaultLabel = '12px'; - */ -CKEDITOR.config.fontSize_defaultLabel = ''; - -/** - * The style definition to be used to apply the font size in the text. - * @type Object - * @example - * // This is actually the default value for it. - * config.fontSize_style = - * { - * element : 'span', - * styles : { 'font-size' : '#(size)' }, - * overrides : [ { element : 'font', attributes : { 'size' : null } } ] - * }; - */ -CKEDITOR.config.fontSize_style = - { - element : 'span', - styles : { 'font-size' : '#(size)' }, - overrides : [ { element : 'font', attributes : { 'size' : null } } ] - }; diff --git a/_source/plugins/format/plugin.js b/_source/plugins/format/plugin.js deleted file mode 100644 index 6df5edf..0000000 --- a/_source/plugins/format/plugin.js +++ /dev/null @@ -1,197 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -CKEDITOR.plugins.add( 'format', -{ - requires : [ 'richcombo', 'styles' ], - - init : function( editor ) - { - var config = editor.config, - lang = editor.lang.format; - - // Gets the list of tags from the settings. - var tags = config.format_tags.split( ';' ); - - // Create style objects for all defined styles. - var styles = {}; - for ( var i = 0 ; i < tags.length ; i++ ) - { - var tag = tags[ i ]; - styles[ tag ] = new CKEDITOR.style( config[ 'format_' + tag ] ); - styles[ tag ]._.enterMode = editor.config.enterMode; - } - - editor.ui.addRichCombo( 'Format', - { - label : lang.label, - title : lang.panelTitle, - className : 'cke_format', - panel : - { - css : editor.skin.editor.css.concat( config.contentsCss ), - multiSelect : false, - attributes : { 'aria-label' : lang.panelTitle } - }, - - init : function() - { - this.startGroup( lang.panelTitle ); - - for ( var tag in styles ) - { - var label = lang[ 'tag_' + tag ]; - - // Add the tag entry to the panel list. - this.add( tag, styles[tag].buildPreview( label ), label ); - } - }, - - onClick : function( value ) - { - editor.focus(); - editor.fire( 'saveSnapshot' ); - - var style = styles[ value ], - elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() ); - - style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document ); - - // Save the undo snapshot after all changes are affected. (#4899) - setTimeout( function() - { - editor.fire( 'saveSnapshot' ); - }, 0 ); - }, - - onRender : function() - { - editor.on( 'selectionChange', function( ev ) - { - var currentTag = this.getValue(); - - var elementPath = ev.data.path; - - for ( var tag in styles ) - { - if ( styles[ tag ].checkActive( elementPath ) ) - { - if ( tag != currentTag ) - this.setValue( tag, editor.lang.format[ 'tag_' + tag ] ); - return; - } - } - - // If no styles match, just empty it. - this.setValue( '' ); - }, - this); - } - }); - } -}); - -/** - * A list of semi colon separated style names (by default tags) representing - * the style definition for each entry to be displayed in the Format combo in - * the toolbar. Each entry must have its relative definition configuration in a - * setting named "format_(tagName)". For example, the "p" entry has its - * definition taken from config.format_p. - * @type String - * @default 'p;h1;h2;h3;h4;h5;h6;pre;address;div' - * @example - * config.format_tags = 'p;h2;h3;pre' - */ -CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div'; - -/** - * The style definition to be used to apply the "Normal" format. - * @type Object - * @default { element : 'p' } - * @example - * config.format_p = { element : 'p', attributes : { 'class' : 'normalPara' } }; - */ -CKEDITOR.config.format_p = { element : 'p' }; - -/** - * The style definition to be used to apply the "Normal (DIV)" format. - * @type Object - * @default { element : 'div' } - * @example - * config.format_div = { element : 'div', attributes : { 'class' : 'normalDiv' } }; - */ -CKEDITOR.config.format_div = { element : 'div' }; - -/** - * The style definition to be used to apply the "Formatted" format. - * @type Object - * @default { element : 'pre' } - * @example - * config.format_pre = { element : 'pre', attributes : { 'class' : 'code' } }; - */ -CKEDITOR.config.format_pre = { element : 'pre' }; - -/** - * The style definition to be used to apply the "Address" format. - * @type Object - * @default { element : 'address' } - * @example - * config.format_address = { element : 'address', attributes : { 'class' : 'styledAddress' } }; - */ -CKEDITOR.config.format_address = { element : 'address' }; - -/** - * The style definition to be used to apply the "Heading 1" format. - * @type Object - * @default { element : 'h1' } - * @example - * config.format_h1 = { element : 'h1', attributes : { 'class' : 'contentTitle1' } }; - */ -CKEDITOR.config.format_h1 = { element : 'h1' }; - -/** - * The style definition to be used to apply the "Heading 1" format. - * @type Object - * @default { element : 'h2' } - * @example - * config.format_h2 = { element : 'h2', attributes : { 'class' : 'contentTitle2' } }; - */ -CKEDITOR.config.format_h2 = { element : 'h2' }; - -/** - * The style definition to be used to apply the "Heading 1" format. - * @type Object - * @default { element : 'h3' } - * @example - * config.format_h3 = { element : 'h3', attributes : { 'class' : 'contentTitle3' } }; - */ -CKEDITOR.config.format_h3 = { element : 'h3' }; - -/** - * The style definition to be used to apply the "Heading 1" format. - * @type Object - * @default { element : 'h4' } - * @example - * config.format_h4 = { element : 'h4', attributes : { 'class' : 'contentTitle4' } }; - */ -CKEDITOR.config.format_h4 = { element : 'h4' }; - -/** - * The style definition to be used to apply the "Heading 1" format. - * @type Object - * @default { element : 'h5' } - * @example - * config.format_h5 = { element : 'h5', attributes : { 'class' : 'contentTitle5' } }; - */ -CKEDITOR.config.format_h5 = { element : 'h5' }; - -/** - * The style definition to be used to apply the "Heading 1" format. - * @type Object - * @default { element : 'h6' } - * @example - * config.format_h6 = { element : 'h6', attributes : { 'class' : 'contentTitle6' } }; - */ -CKEDITOR.config.format_h6 = { element : 'h6' }; diff --git a/_source/plugins/forms/dialogs/button.js b/_source/plugins/forms/dialogs/button.js deleted file mode 100644 index b7ae7f7..0000000 --- a/_source/plugins/forms/dialogs/button.js +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'button', function( editor ) -{ - function commitAttributes( element ) - { - var val = this.getValue(); - if ( val ) - { - element.attributes[ this.id ] = val; - if ( this.id == 'name' ) - element.attributes[ 'data-cke-saved-name' ] = val; - } - else - { - delete element.attributes[ this.id ]; - if ( this.id == 'name' ) - delete element.attributes[ 'data-cke-saved-name' ]; - } - } - - return { - title : editor.lang.button.title, - minWidth : 350, - minHeight : 150, - onShow : function() - { - delete this.button; - var element = this.getParentEditor().getSelection().getSelectedElement(); - if ( element && element.is( 'input' ) ) - { - var type = element.getAttribute( 'type' ); - if ( type in { button:1, reset:1, submit:1 } ) - { - this.button = element; - this.setupContent( element ); - } - } - }, - onOk : function() - { - var editor = this.getParentEditor(), - element = this.button, - isInsertMode = !element; - - var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ] - : new CKEDITOR.htmlParser.element( 'input' ); - this.commitContent( fake ); - - var writer = new CKEDITOR.htmlParser.basicWriter(); - fake.writeHtml( writer ); - var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document ); - - if ( isInsertMode ) - editor.insertElement( newElement ); - else - { - newElement.replace( element ); - editor.getSelection().selectElement( newElement ); - } - }, - contents : [ - { - id : 'info', - label : editor.lang.button.title, - title : editor.lang.button.title, - elements : [ - { - id : 'name', - type : 'text', - label : editor.lang.common.name, - 'default' : '', - setup : function( element ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : commitAttributes - }, - { - id : 'value', - type : 'text', - label : editor.lang.button.text, - accessKey : 'V', - 'default' : '', - setup : function( element ) - { - this.setValue( element.getAttribute( 'value' ) || '' ); - }, - commit : commitAttributes - }, - { - id : 'type', - type : 'select', - label : editor.lang.button.type, - 'default' : 'button', - accessKey : 'T', - items : - [ - [ editor.lang.button.typeBtn, 'button' ], - [ editor.lang.button.typeSbm, 'submit' ], - [ editor.lang.button.typeRst, 'reset' ] - ], - setup : function( element ) - { - this.setValue( element.getAttribute( 'type' ) || '' ); - }, - commit : commitAttributes - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/checkbox.js b/_source/plugins/forms/dialogs/checkbox.js deleted file mode 100644 index 56a9c35..0000000 --- a/_source/plugins/forms/dialogs/checkbox.js +++ /dev/null @@ -1,153 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'checkbox', function( editor ) -{ - return { - title : editor.lang.checkboxAndRadio.checkboxTitle, - minWidth : 350, - minHeight : 140, - onShow : function() - { - delete this.checkbox; - - var element = this.getParentEditor().getSelection().getSelectedElement(); - - if ( element && element.getAttribute( 'type' ) == 'checkbox' ) - { - this.checkbox = element; - this.setupContent( element ); - } - }, - onOk : function() - { - var editor, - element = this.checkbox, - isInsertMode = !element; - - if ( isInsertMode ) - { - editor = this.getParentEditor(); - element = editor.document.createElement( 'input' ); - element.setAttribute( 'type', 'checkbox' ); - editor.insertElement( element ); - } - this.commitContent( { element : element } ); - }, - contents : [ - { - id : 'info', - label : editor.lang.checkboxAndRadio.checkboxTitle, - title : editor.lang.checkboxAndRadio.checkboxTitle, - startupFocus : 'txtName', - elements : [ - { - id : 'txtName', - type : 'text', - label : editor.lang.common.name, - 'default' : '', - accessKey : 'N', - setup : function( element ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : function( data ) - { - var element = data.element; - - // IE failed to update 'name' property on input elements, protect it now. - if ( this.getValue() ) - element.data( 'cke-saved-name', this.getValue() ); - else - { - element.data( 'cke-saved-name', false ); - element.removeAttribute( 'name' ); - } - } - }, - { - id : 'txtValue', - type : 'text', - label : editor.lang.checkboxAndRadio.value, - 'default' : '', - accessKey : 'V', - setup : function( element ) - { - var value = element.getAttribute( 'value' ); - // IE Return 'on' as default attr value. - this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value ); - }, - commit : function( data ) - { - var element = data.element, - value = this.getValue(); - - if ( value && !( CKEDITOR.env.ie && value == 'on' ) ) - element.setAttribute( 'value', value ); - else - { - if ( CKEDITOR.env.ie ) - { - // Remove attribute 'value' of checkbox (#4721). - var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() ); - element.copyAttributes( checkbox, { value: 1 } ); - checkbox.replace( element ); - editor.getSelection().selectElement( checkbox ); - data.element = checkbox; - } - else - element.removeAttribute( 'value' ); - } - } - }, - { - id : 'cmbSelected', - type : 'checkbox', - label : editor.lang.checkboxAndRadio.selected, - 'default' : '', - accessKey : 'S', - value : "checked", - setup : function( element ) - { - this.setValue( element.getAttribute( 'checked' ) ); - }, - commit : function( data ) - { - var element = data.element; - - if ( CKEDITOR.env.ie ) - { - var isElementChecked = !!element.getAttribute( 'checked' ), - isChecked = !!this.getValue(); - - if ( isElementChecked != isChecked ) - { - var replace = CKEDITOR.dom.element.createFromHtml( '', editor.document ); - - element.copyAttributes( replace, { type : 1, checked : 1 } ); - replace.replace( element ); - editor.getSelection().selectElement( replace ); - data.element = replace; - } - } - else - { - var value = this.getValue(); - if ( value ) - element.setAttribute( 'checked', 'checked' ); - else - element.removeAttribute( 'checked' ); - } - } - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/form.js b/_source/plugins/forms/dialogs/form.js deleted file mode 100644 index 1778724..0000000 --- a/_source/plugins/forms/dialogs/form.js +++ /dev/null @@ -1,177 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'form', function( editor ) -{ - var autoAttributes = - { - action : 1, - id : 1, - method : 1, - enctype : 1, - target : 1 - }; - - return { - title : editor.lang.form.title, - minWidth : 350, - minHeight : 200, - onShow : function() - { - delete this.form; - - var element = this.getParentEditor().getSelection().getStartElement(); - var form = element && element.getAscendant( 'form', true ); - if ( form ) - { - this.form = form; - this.setupContent( form ); - } - }, - onOk : function() - { - var editor, - element = this.form, - isInsertMode = !element; - - if ( isInsertMode ) - { - editor = this.getParentEditor(); - element = editor.document.createElement( 'form' ); - !CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) ); - } - - if ( isInsertMode ) - editor.insertElement( element ); - this.commitContent( element ); - }, - onLoad : function() - { - function autoSetup( element ) - { - this.setValue( element.getAttribute( this.id ) || '' ); - } - - function autoCommit( element ) - { - if ( this.getValue() ) - element.setAttribute( this.id, this.getValue() ); - else - element.removeAttribute( this.id ); - } - - this.foreach( function( contentObj ) - { - if ( autoAttributes[ contentObj.id ] ) - { - contentObj.setup = autoSetup; - contentObj.commit = autoCommit; - } - } ); - }, - contents : [ - { - id : 'info', - label : editor.lang.form.title, - title : editor.lang.form.title, - elements : [ - { - id : 'txtName', - type : 'text', - label : editor.lang.common.name, - 'default' : '', - accessKey : 'N', - setup : function( element ) - { - this.setValue( element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.data( 'cke-saved-name', this.getValue() ); - else - { - element.data( 'cke-saved-name', false ); - element.removeAttribute( 'name' ); - } - } - }, - { - id : 'action', - type : 'text', - label : editor.lang.form.action, - 'default' : '', - accessKey : 'T' - }, - { - type : 'hbox', - widths : [ '45%', '55%' ], - children : - [ - { - id : 'id', - type : 'text', - label : editor.lang.common.id, - 'default' : '', - accessKey : 'I' - }, - { - id : 'enctype', - type : 'select', - label : editor.lang.form.encoding, - style : 'width:100%', - accessKey : 'E', - 'default' : '', - items : - [ - [ '' ], - [ 'text/plain' ], - [ 'multipart/form-data' ], - [ 'application/x-www-form-urlencoded' ] - ] - } - ] - }, - { - type : 'hbox', - widths : [ '45%', '55%' ], - children : - [ - { - id : 'target', - type : 'select', - label : editor.lang.common.target, - style : 'width:100%', - accessKey : 'M', - 'default' : '', - items : - [ - [ editor.lang.common.notSet, '' ], - [ editor.lang.common.targetNew, '_blank' ], - [ editor.lang.common.targetTop, '_top' ], - [ editor.lang.common.targetSelf, '_self' ], - [ editor.lang.common.targetParent, '_parent' ] - ] - }, - { - id : 'method', - type : 'select', - label : editor.lang.form.method, - accessKey : 'M', - 'default' : 'GET', - items : - [ - [ 'GET', 'get' ], - [ 'POST', 'post' ] - ] - } - ] - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/hiddenfield.js b/_source/plugins/forms/dialogs/hiddenfield.js deleted file mode 100644 index 3ef9f84..0000000 --- a/_source/plugins/forms/dialogs/hiddenfield.js +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'hiddenfield', function( editor ) -{ - return { - title : editor.lang.hidden.title, - hiddenField : null, - minWidth : 350, - minHeight : 110, - onShow : function() - { - delete this.hiddenField; - - var editor = this.getParentEditor(), - selection = editor.getSelection(), - element = selection.getSelectedElement(); - - if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) - { - this.hiddenField = element; - element = editor.restoreRealElement( this.hiddenField ); - this.setupContent( element ); - selection.selectElement( this.hiddenField ); - } - }, - onOk : function() - { - var name = this.getValueOf( 'info', '_cke_saved_name' ), - value = this.getValueOf( 'info', 'value' ), - editor = this.getParentEditor(), - element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ? - editor.document.createElement( '' ) - : editor.document.createElement( 'input' ); - - element.setAttribute( 'type', 'hidden' ); - this.commitContent( element ); - var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' ); - if ( !this.hiddenField ) - editor.insertElement( fakeElement ); - else - { - fakeElement.replace( this.hiddenField ); - editor.getSelection().selectElement( fakeElement ); - } - return true; - }, - contents : [ - { - id : 'info', - label : editor.lang.hidden.title, - title : editor.lang.hidden.title, - elements : [ - { - id : '_cke_saved_name', - type : 'text', - label : editor.lang.hidden.name, - 'default' : '', - accessKey : 'N', - setup : function( element ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'name', this.getValue() ); - else - { - element.removeAttribute( 'name' ); - } - } - }, - { - id : 'value', - type : 'text', - label : editor.lang.hidden.value, - 'default' : '', - accessKey : 'V', - setup : function( element ) - { - this.setValue( element.getAttribute( 'value' ) || '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'value', this.getValue() ); - else - element.removeAttribute( 'value' ); - } - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/radio.js b/_source/plugins/forms/dialogs/radio.js deleted file mode 100644 index 0381fab..0000000 --- a/_source/plugins/forms/dialogs/radio.js +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'radio', function( editor ) -{ - return { - title : editor.lang.checkboxAndRadio.radioTitle, - minWidth : 350, - minHeight : 140, - onShow : function() - { - delete this.radioButton; - - var element = this.getParentEditor().getSelection().getSelectedElement(); - if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' ) - { - this.radioButton = element; - this.setupContent( element ); - } - }, - onOk : function() - { - var editor, - element = this.radioButton, - isInsertMode = !element; - - if ( isInsertMode ) - { - editor = this.getParentEditor(); - element = editor.document.createElement( 'input' ); - element.setAttribute( 'type', 'radio' ); - } - - if ( isInsertMode ) - editor.insertElement( element ); - this.commitContent( { element : element } ); - }, - contents : [ - { - id : 'info', - label : editor.lang.checkboxAndRadio.radioTitle, - title : editor.lang.checkboxAndRadio.radioTitle, - elements : [ - { - id : 'name', - type : 'text', - label : editor.lang.common.name, - 'default' : '', - accessKey : 'N', - setup : function( element ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : function( data ) - { - var element = data.element; - - if ( this.getValue() ) - element.data( 'cke-saved-name', this.getValue() ); - else - { - element.data( 'cke-saved-name', false ); - element.removeAttribute( 'name' ); - } - } - }, - { - id : 'value', - type : 'text', - label : editor.lang.checkboxAndRadio.value, - 'default' : '', - accessKey : 'V', - setup : function( element ) - { - this.setValue( element.getAttribute( 'value' ) || '' ); - }, - commit : function( data ) - { - var element = data.element; - - if ( this.getValue() ) - element.setAttribute( 'value', this.getValue() ); - else - element.removeAttribute( 'value' ); - } - }, - { - id : 'checked', - type : 'checkbox', - label : editor.lang.checkboxAndRadio.selected, - 'default' : '', - accessKey : 'S', - value : "checked", - setup : function( element ) - { - this.setValue( element.getAttribute( 'checked' ) ); - }, - commit : function( data ) - { - var element = data.element; - - if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) ) - { - if ( this.getValue() ) - element.setAttribute( 'checked', 'checked' ); - else - element.removeAttribute( 'checked' ); - } - else - { - var isElementChecked = element.getAttribute( 'checked' ); - var isChecked = !!this.getValue(); - - if ( isElementChecked != isChecked ) - { - var replace = CKEDITOR.dom.element.createFromHtml( '', editor.document ); - element.copyAttributes( replace, { type : 1, checked : 1 } ); - replace.replace( element ); - editor.getSelection().selectElement( replace ); - data.element = replace; - } - } - } - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/select.js b/_source/plugins/forms/dialogs/select.js deleted file mode 100644 index 04f5065..0000000 --- a/_source/plugins/forms/dialogs/select.js +++ /dev/null @@ -1,558 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'select', function( editor ) -{ - // Add a new option to a SELECT object (combo or list). - function addOption( combo, optionText, optionValue, documentObject, index ) - { - combo = getSelect( combo ); - var oOption; - if ( documentObject ) - oOption = documentObject.createElement( "OPTION" ); - else - oOption = document.createElement( "OPTION" ); - - if ( combo && oOption && oOption.getName() == 'option' ) - { - if ( CKEDITOR.env.ie ) { - if ( !isNaN( parseInt( index, 10) ) ) - combo.$.options.add( oOption.$, index ); - else - combo.$.options.add( oOption.$ ); - - oOption.$.innerHTML = optionText.length > 0 ? optionText : ''; - oOption.$.value = optionValue; - } - else - { - if ( index !== null && index < combo.getChildCount() ) - combo.getChild( index < 0 ? 0 : index ).insertBeforeMe( oOption ); - else - combo.append( oOption ); - - oOption.setText( optionText.length > 0 ? optionText : '' ); - oOption.setValue( optionValue ); - } - } - else - return false; - - return oOption; - } - // Remove all selected options from a SELECT object. - function removeSelectedOptions( combo ) - { - combo = getSelect( combo ); - - // Save the selected index - var iSelectedIndex = getSelectedIndex( combo ); - - // Remove all selected options. - for ( var i = combo.getChildren().count() - 1 ; i >= 0 ; i-- ) - { - if ( combo.getChild( i ).$.selected ) - combo.getChild( i ).remove(); - } - - // Reset the selection based on the original selected index. - setSelectedIndex( combo, iSelectedIndex ); - } - //Modify option from a SELECT object. - function modifyOption( combo, index, title, value ) - { - combo = getSelect( combo ); - if ( index < 0 ) - return false; - var child = combo.getChild( index ); - child.setText( title ); - child.setValue( value ); - return child; - } - function removeAllOptions( combo ) - { - combo = getSelect( combo ); - while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() ) - { /*jsl:pass*/ } - } - // Moves the selected option by a number of steps (also negative). - function changeOptionPosition( combo, steps, documentObject ) - { - combo = getSelect( combo ); - var iActualIndex = getSelectedIndex( combo ); - if ( iActualIndex < 0 ) - return false; - - var iFinalIndex = iActualIndex + steps; - iFinalIndex = ( iFinalIndex < 0 ) ? 0 : iFinalIndex; - iFinalIndex = ( iFinalIndex >= combo.getChildCount() ) ? combo.getChildCount() - 1 : iFinalIndex; - - if ( iActualIndex == iFinalIndex ) - return false; - - var oOption = combo.getChild( iActualIndex ), - sText = oOption.getText(), - sValue = oOption.getValue(); - - oOption.remove(); - - oOption = addOption( combo, sText, sValue, ( !documentObject ) ? null : documentObject, iFinalIndex ); - setSelectedIndex( combo, iFinalIndex ); - return oOption; - } - function getSelectedIndex( combo ) - { - combo = getSelect( combo ); - return combo ? combo.$.selectedIndex : -1; - } - function setSelectedIndex( combo, index ) - { - combo = getSelect( combo ); - if ( index < 0 ) - return null; - var count = combo.getChildren().count(); - combo.$.selectedIndex = ( index >= count ) ? ( count - 1 ) : index; - return combo; - } - function getOptions( combo ) - { - combo = getSelect( combo ); - return combo ? combo.getChildren() : false; - } - function getSelect( obj ) - { - if ( obj && obj.domId && obj.getInputElement().$ ) // Dialog element. - return obj.getInputElement(); - else if ( obj && obj.$ ) - return obj; - return false; - } - - return { - title : editor.lang.select.title, - minWidth : CKEDITOR.env.ie ? 460 : 395, - minHeight : CKEDITOR.env.ie ? 320 : 300, - onShow : function() - { - delete this.selectBox; - this.setupContent( 'clear' ); - var element = this.getParentEditor().getSelection().getSelectedElement(); - if ( element && element.getName() == "select" ) - { - this.selectBox = element; - this.setupContent( element.getName(), element ); - - // Load Options into dialog. - var objOptions = getOptions( element ); - for ( var i = 0 ; i < objOptions.count() ; i++ ) - this.setupContent( 'option', objOptions.getItem( i ) ); - } - }, - onOk : function() - { - var editor = this.getParentEditor(), - element = this.selectBox, - isInsertMode = !element; - - if ( isInsertMode ) - element = editor.document.createElement( 'select' ); - this.commitContent( element ); - - if ( isInsertMode ) - { - editor.insertElement( element ); - if ( CKEDITOR.env.ie ) - { - var sel = editor.getSelection(), - bms = sel.createBookmarks(); - setTimeout(function() - { - sel.selectBookmarks( bms ); - }, 0 ); - } - } - }, - contents : [ - { - id : 'info', - label : editor.lang.select.selectInfo, - title : editor.lang.select.selectInfo, - accessKey : '', - elements : [ - { - id : 'txtName', - type : 'text', - widths : [ '25%','75%' ], - labelLayout : 'horizontal', - label : editor.lang.common.name, - 'default' : '', - accessKey : 'N', - style : 'width:350px', - setup : function( name, element ) - { - if ( name == 'clear' ) - this.setValue( this[ 'default' ] || '' ); - else if ( name == 'select' ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - } - }, - commit : function( element ) - { - if ( this.getValue() ) - element.data( 'cke-saved-name', this.getValue() ); - else - { - element.data( 'cke-saved-name', false ); - element.removeAttribute( 'name' ); - } - } - }, - { - id : 'txtValue', - type : 'text', - widths : [ '25%','75%' ], - labelLayout : 'horizontal', - label : editor.lang.select.value, - style : 'width:350px', - 'default' : '', - className : 'cke_disabled', - onLoad : function() - { - this.getInputElement().setAttribute( 'readOnly', true ); - }, - setup : function( name, element ) - { - if ( name == 'clear' ) - this.setValue( '' ); - else if ( name == 'option' && element.getAttribute( 'selected' ) ) - this.setValue( element.$.value ); - } - }, - { - type : 'hbox', - widths : [ '175px', '170px' ], - children : - [ - { - id : 'txtSize', - type : 'text', - labelLayout : 'horizontal', - label : editor.lang.select.size, - 'default' : '', - accessKey : 'S', - style : 'width:175px', - validate: function() - { - var func = CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ); - return ( ( this.getValue() === '' ) || func.apply( this ) ); - }, - setup : function( name, element ) - { - if ( name == 'select' ) - this.setValue( element.getAttribute( 'size' ) || '' ); - if ( CKEDITOR.env.webkit ) - this.getInputElement().setStyle( 'width', '86px' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'size', this.getValue() ); - else - element.removeAttribute( 'size' ); - } - }, - { - type : 'html', - html : '' + CKEDITOR.tools.htmlEncode( editor.lang.select.lines ) + '' - } - ] - }, - { - type : 'html', - html : '' + CKEDITOR.tools.htmlEncode( editor.lang.select.opAvail ) + '' - }, - { - type : 'hbox', - widths : [ '115px', '115px' ,'100px' ], - children : - [ - { - type : 'vbox', - children : - [ - { - id : 'txtOptName', - type : 'text', - label : editor.lang.select.opText, - style : 'width:115px', - setup : function( name, element ) - { - if ( name == 'clear' ) - this.setValue( "" ); - } - }, - { - type : 'select', - id : 'cmbName', - label : '', - title : '', - size : 5, - style : 'width:115px;height:75px', - items : [], - onChange : function() - { - var dialog = this.getDialog(), - values = dialog.getContentElement( 'info', 'cmbValue' ), - optName = dialog.getContentElement( 'info', 'txtOptName' ), - optValue = dialog.getContentElement( 'info', 'txtOptValue' ), - iIndex = getSelectedIndex( this ); - - setSelectedIndex( values, iIndex ); - optName.setValue( this.getValue() ); - optValue.setValue( values.getValue() ); - }, - setup : function( name, element ) - { - if ( name == 'clear' ) - removeAllOptions( this ); - else if ( name == 'option' ) - addOption( this, element.getText(), element.getText(), - this.getDialog().getParentEditor().document ); - }, - commit : function( element ) - { - var dialog = this.getDialog(), - optionsNames = getOptions( this ), - optionsValues = getOptions( dialog.getContentElement( 'info', 'cmbValue' ) ), - selectValue = dialog.getContentElement( 'info', 'txtValue' ).getValue(); - - removeAllOptions( element ); - - for ( var i = 0 ; i < optionsNames.count() ; i++ ) - { - var oOption = addOption( element, optionsNames.getItem( i ).getValue(), - optionsValues.getItem( i ).getValue(), dialog.getParentEditor().document ); - if ( optionsValues.getItem( i ).getValue() == selectValue ) - { - oOption.setAttribute( 'selected', 'selected' ); - oOption.selected = true; - } - } - } - } - ] - }, - { - type : 'vbox', - children : - [ - { - id : 'txtOptValue', - type : 'text', - label : editor.lang.select.opValue, - style : 'width:115px', - setup : function( name, element ) - { - if ( name == 'clear' ) - this.setValue( "" ); - } - }, - { - type : 'select', - id : 'cmbValue', - label : '', - size : 5, - style : 'width:115px;height:75px', - items : [], - onChange : function() - { - var dialog = this.getDialog(), - names = dialog.getContentElement( 'info', 'cmbName' ), - optName = dialog.getContentElement( 'info', 'txtOptName' ), - optValue = dialog.getContentElement( 'info', 'txtOptValue' ), - iIndex = getSelectedIndex( this ); - - setSelectedIndex( names, iIndex ); - optName.setValue( names.getValue() ); - optValue.setValue( this.getValue() ); - }, - setup : function( name, element ) - { - if ( name == 'clear' ) - removeAllOptions( this ); - else if ( name == 'option' ) - { - var oValue = element.getValue(); - addOption( this, oValue, oValue, - this.getDialog().getParentEditor().document ); - if ( element.getAttribute( 'selected' ) == 'selected' ) - this.getDialog().getContentElement( 'info', 'txtValue' ).setValue( oValue ); - } - } - } - ] - }, - { - type : 'vbox', - padding : 5, - children : - [ - { - type : 'button', - id : 'btnAdd', - style : '', - label : editor.lang.select.btnAdd, - title : editor.lang.select.btnAdd, - style : 'width:100%;', - onClick : function() - { - //Add new option. - var dialog = this.getDialog(), - parentEditor = dialog.getParentEditor(), - optName = dialog.getContentElement( 'info', 'txtOptName' ), - optValue = dialog.getContentElement( 'info', 'txtOptValue' ), - names = dialog.getContentElement( 'info', 'cmbName' ), - values = dialog.getContentElement( 'info', 'cmbValue' ); - - addOption(names, optName.getValue(), optName.getValue(), dialog.getParentEditor().document ); - addOption(values, optValue.getValue(), optValue.getValue(), dialog.getParentEditor().document ); - - optName.setValue( "" ); - optValue.setValue( "" ); - } - }, - { - type : 'button', - id : 'btnModify', - label : editor.lang.select.btnModify, - title : editor.lang.select.btnModify, - style : 'width:100%;', - onClick : function() - { - //Modify selected option. - var dialog = this.getDialog(), - optName = dialog.getContentElement( 'info', 'txtOptName' ), - optValue = dialog.getContentElement( 'info', 'txtOptValue' ), - names = dialog.getContentElement( 'info', 'cmbName' ), - values = dialog.getContentElement( 'info', 'cmbValue' ), - iIndex = getSelectedIndex( names ); - - if ( iIndex >= 0 ) - { - modifyOption( names, iIndex, optName.getValue(), optName.getValue() ); - modifyOption( values, iIndex, optValue.getValue(), optValue.getValue() ); - } - } - }, - { - type : 'button', - id : 'btnUp', - style : 'width:100%;', - label : editor.lang.select.btnUp, - title : editor.lang.select.btnUp, - onClick : function() - { - //Move up. - var dialog = this.getDialog(), - names = dialog.getContentElement( 'info', 'cmbName' ), - values = dialog.getContentElement( 'info', 'cmbValue' ); - - changeOptionPosition( names, -1, dialog.getParentEditor().document ); - changeOptionPosition( values, -1, dialog.getParentEditor().document ); - } - }, - { - type : 'button', - id : 'btnDown', - style : 'width:100%;', - label : editor.lang.select.btnDown, - title : editor.lang.select.btnDown, - onClick : function() - { - //Move down. - var dialog = this.getDialog(), - names = dialog.getContentElement( 'info', 'cmbName' ), - values = dialog.getContentElement( 'info', 'cmbValue' ); - - changeOptionPosition( names, 1, dialog.getParentEditor().document ); - changeOptionPosition( values, 1, dialog.getParentEditor().document ); - } - } - ] - } - ] - }, - { - type : 'hbox', - widths : [ '40%', '20%', '40%' ], - children : - [ - { - type : 'button', - id : 'btnSetValue', - label : editor.lang.select.btnSetValue, - title : editor.lang.select.btnSetValue, - onClick : function() - { - //Set as default value. - var dialog = this.getDialog(), - values = dialog.getContentElement( 'info', 'cmbValue' ), - txtValue = dialog.getContentElement( 'info', 'txtValue' ); - txtValue.setValue( values.getValue() ); - } - }, - { - type : 'button', - id : 'btnDelete', - label : editor.lang.select.btnDelete, - title : editor.lang.select.btnDelete, - onClick : function() - { - // Delete option. - var dialog = this.getDialog(), - names = dialog.getContentElement( 'info', 'cmbName' ), - values = dialog.getContentElement( 'info', 'cmbValue' ), - optName = dialog.getContentElement( 'info', 'txtOptName' ), - optValue = dialog.getContentElement( 'info', 'txtOptValue' ); - - removeSelectedOptions( names ); - removeSelectedOptions( values ); - - optName.setValue( "" ); - optValue.setValue( "" ); - } - }, - { - id : 'chkMulti', - type : 'checkbox', - label : editor.lang.select.chkMulti, - 'default' : '', - accessKey : 'M', - value : "checked", - setup : function( name, element ) - { - if ( name == 'select' ) - this.setValue( element.getAttribute( 'multiple' ) ); - if ( CKEDITOR.env.webkit ) - this.getElement().getParent().setStyle( 'vertical-align', 'middle' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'multiple', this.getValue() ); - else - element.removeAttribute( 'multiple' ); - } - } - ] - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/textarea.js b/_source/plugins/forms/dialogs/textarea.js deleted file mode 100644 index dffab65..0000000 --- a/_source/plugins/forms/dialogs/textarea.js +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'textarea', function( editor ) -{ - return { - title : editor.lang.textarea.title, - minWidth : 350, - minHeight : 220, - onShow : function() - { - delete this.textarea; - - var element = this.getParentEditor().getSelection().getSelectedElement(); - if ( element && element.getName() == "textarea" ) - { - this.textarea = element; - this.setupContent( element ); - } - }, - onOk : function() - { - var editor, - element = this.textarea, - isInsertMode = !element; - - if ( isInsertMode ) - { - editor = this.getParentEditor(); - element = editor.document.createElement( 'textarea' ); - } - this.commitContent( element ); - - if ( isInsertMode ) - editor.insertElement( element ); - }, - contents : [ - { - id : 'info', - label : editor.lang.textarea.title, - title : editor.lang.textarea.title, - elements : [ - { - id : '_cke_saved_name', - type : 'text', - label : editor.lang.common.name, - 'default' : '', - accessKey : 'N', - setup : function( element ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.data( 'cke-saved-name', this.getValue() ); - else - { - element.data( 'cke-saved-name', false ); - element.removeAttribute( 'name' ); - } - } - }, - { - type : 'hbox', - widths:['50%','50%'], - children:[ - { - id : 'cols', - type : 'text', - label : editor.lang.textarea.cols, - 'default' : '', - accessKey : 'C', - style : 'width:50px', - validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), - setup : function( element ) - { - var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' ); - this.setValue( value || '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'cols', this.getValue() ); - else - element.removeAttribute( 'cols' ); - } - }, - { - id : 'rows', - type : 'text', - label : editor.lang.textarea.rows, - 'default' : '', - accessKey : 'R', - style : 'width:50px', - validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), - setup : function( element ) - { - var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' ); - this.setValue( value || '' ); - }, - commit : function( element ) - { - if ( this.getValue() ) - element.setAttribute( 'rows', this.getValue() ); - else - element.removeAttribute( 'rows' ); - } - } - ] - }, - { - id : 'value', - type : 'textarea', - label : editor.lang.textfield.value, - 'default' : '', - setup : function( element ) - { - this.setValue( element.$.defaultValue ); - }, - commit : function( element ) - { - element.$.value = element.$.defaultValue = this.getValue() ; - } - } - - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/dialogs/textfield.js b/_source/plugins/forms/dialogs/textfield.js deleted file mode 100644 index 35025c1..0000000 --- a/_source/plugins/forms/dialogs/textfield.js +++ /dev/null @@ -1,199 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ -CKEDITOR.dialog.add( 'textfield', function( editor ) -{ - var autoAttributes = - { - value : 1, - size : 1, - maxLength : 1 - }; - - var acceptedTypes = - { - text : 1, - password : 1 - }; - - return { - title : editor.lang.textfield.title, - minWidth : 350, - minHeight : 150, - onShow : function() - { - delete this.textField; - - var element = this.getParentEditor().getSelection().getSelectedElement(); - if ( element && element.getName() == "input" && - ( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) ) - { - this.textField = element; - this.setupContent( element ); - } - }, - onOk : function() - { - var editor, - element = this.textField, - isInsertMode = !element; - - if ( isInsertMode ) - { - editor = this.getParentEditor(); - element = editor.document.createElement( 'input' ); - element.setAttribute( 'type', 'text' ); - } - - if ( isInsertMode ) - editor.insertElement( element ); - this.commitContent( { element : element } ); - }, - onLoad : function() - { - var autoSetup = function( element ) - { - var value = element.hasAttribute( this.id ) && element.getAttribute( this.id ); - this.setValue( value || '' ); - }; - - var autoCommit = function( data ) - { - var element = data.element; - var value = this.getValue(); - - if ( value ) - element.setAttribute( this.id, value ); - else - element.removeAttribute( this.id ); - }; - - this.foreach( function( contentObj ) - { - if ( autoAttributes[ contentObj.id ] ) - { - contentObj.setup = autoSetup; - contentObj.commit = autoCommit; - } - } ); - }, - contents : [ - { - id : 'info', - label : editor.lang.textfield.title, - title : editor.lang.textfield.title, - elements : [ - { - type : 'hbox', - widths : [ '50%', '50%' ], - children : - [ - { - id : '_cke_saved_name', - type : 'text', - label : editor.lang.textfield.name, - 'default' : '', - accessKey : 'N', - setup : function( element ) - { - this.setValue( - element.data( 'cke-saved-name' ) || - element.getAttribute( 'name' ) || - '' ); - }, - commit : function( data ) - { - var element = data.element; - - if ( this.getValue() ) - element.data( 'cke-saved-name', this.getValue() ); - else - { - element.data( 'cke-saved-name', false ); - element.removeAttribute( 'name' ); - } - } - }, - { - id : 'value', - type : 'text', - label : editor.lang.textfield.value, - 'default' : '', - accessKey : 'V' - } - ] - }, - { - type : 'hbox', - widths : [ '50%', '50%' ], - children : - [ - { - id : 'size', - type : 'text', - label : editor.lang.textfield.charWidth, - 'default' : '', - accessKey : 'C', - style : 'width:50px', - validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ) - }, - { - id : 'maxLength', - type : 'text', - label : editor.lang.textfield.maxChars, - 'default' : '', - accessKey : 'M', - style : 'width:50px', - validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ) - } - ], - onLoad : function() - { - // Repaint the style for IE7 (#6068) - if ( CKEDITOR.env.ie7Compat ) - this.getElement().setStyle( 'zoom', '100%' ); - } - }, - { - id : 'type', - type : 'select', - label : editor.lang.textfield.type, - 'default' : 'text', - accessKey : 'M', - items : - [ - [ editor.lang.textfield.typeText, 'text' ], - [ editor.lang.textfield.typePass, 'password' ] - ], - setup : function( element ) - { - this.setValue( element.getAttribute( 'type' ) ); - }, - commit : function( data ) - { - var element = data.element; - - if ( CKEDITOR.env.ie ) - { - var elementType = element.getAttribute( 'type' ); - var myType = this.getValue(); - - if ( elementType != myType ) - { - var replace = CKEDITOR.dom.element.createFromHtml( '', editor.document ); - element.copyAttributes( replace, { type : 1 } ); - replace.replace( element ); - editor.getSelection().selectElement( replace ); - data.element = replace; - } - } - else - element.setAttribute( 'type', this.getValue() ); - } - } - ] - } - ] - }; -}); diff --git a/_source/plugins/forms/images/hiddenfield.gif b/_source/plugins/forms/images/hiddenfield.gif deleted file mode 100644 index 953f643b60032c36ac92590950577c336f133512..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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 diff --git a/_source/plugins/forms/plugin.js b/_source/plugins/forms/plugin.js deleted file mode 100644 index cd3831c..0000000 --- a/_source/plugins/forms/plugin.js +++ /dev/null @@ -1,289 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @file Forms Plugin - */ - -CKEDITOR.plugins.add( 'forms', -{ - requires : [ 'dialog' ], - init : function( editor ) - { - var lang = editor.lang; - - editor.addCss( - 'form' + - '{' + - '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 !important;' + - 'height: 16px !important;' + - '}' ); - - // All buttons use the same code to register. So, to avoid - // duplications, let's use this tool function. - var addButtonCommand = function( buttonName, commandName, dialogFile ) - { - editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); - - editor.ui.addButton( buttonName, - { - label : lang.common[ buttonName.charAt(0).toLowerCase() + buttonName.slice(1) ], - command : commandName - }); - CKEDITOR.dialog.add( commandName, dialogFile ); - }; - - var dialogPath = this.path + 'dialogs/'; - addButtonCommand( 'Form', 'form', dialogPath + 'form.js' ); - addButtonCommand( 'Checkbox', 'checkbox', dialogPath + 'checkbox.js' ); - addButtonCommand( 'Radio', 'radio', dialogPath + 'radio.js' ); - addButtonCommand( 'TextField', 'textfield', dialogPath + 'textfield.js' ); - addButtonCommand( 'Textarea', 'textarea', dialogPath + 'textarea.js' ); - addButtonCommand( 'Select', 'select', dialogPath + 'select.js' ); - addButtonCommand( 'Button', 'button', dialogPath + 'button.js' ); - addButtonCommand( 'ImageButton', 'imagebutton', CKEDITOR.plugins.getPath('image') + 'dialogs/image.js' ); - addButtonCommand( 'HiddenField', 'hiddenfield', dialogPath + 'hiddenfield.js' ); - - // If the "menu" plugin is loaded, register the menu items. - if ( editor.addMenuItems ) - { - editor.addMenuItems( - { - form : - { - label : lang.form.menu, - command : 'form', - group : 'form' - }, - - checkbox : - { - label : lang.checkboxAndRadio.checkboxTitle, - command : 'checkbox', - group : 'checkbox' - }, - - radio : - { - label : lang.checkboxAndRadio.radioTitle, - command : 'radio', - group : 'radio' - }, - - textfield : - { - label : lang.textfield.title, - command : 'textfield', - group : 'textfield' - }, - - hiddenfield : - { - label : lang.hidden.title, - command : 'hiddenfield', - group : 'hiddenfield' - }, - - imagebutton : - { - label : lang.image.titleButton, - command : 'imagebutton', - group : 'imagebutton' - }, - - button : - { - label : lang.button.title, - command : 'button', - group : 'button' - }, - - select : - { - label : lang.select.title, - command : 'select', - group : 'select' - }, - - textarea : - { - label : lang.textarea.title, - command : 'textarea', - group : 'textarea' - } - }); - } - - // If the "contextmenu" plugin is loaded, register the listeners. - if ( editor.contextMenu ) - { - editor.contextMenu.addListener( function( element ) - { - if ( element && element.hasAscendant( 'form', true ) && !element.isReadOnly() ) - return { form : CKEDITOR.TRISTATE_OFF }; - }); - - editor.contextMenu.addListener( function( element ) - { - if ( element && !element.isReadOnly() ) - { - var name = element.getName(); - - if ( name == 'select' ) - return { select : CKEDITOR.TRISTATE_OFF }; - - if ( name == 'textarea' ) - return { textarea : CKEDITOR.TRISTATE_OFF }; - - if ( name == 'input' ) - { - switch( element.getAttribute( 'type' ) ) - { - case 'button' : - case 'submit' : - case 'reset' : - return { button : CKEDITOR.TRISTATE_OFF }; - - case 'checkbox' : - return { checkbox : CKEDITOR.TRISTATE_OFF }; - - case 'radio' : - return { radio : CKEDITOR.TRISTATE_OFF }; - - case 'image' : - return { imagebutton : CKEDITOR.TRISTATE_OFF }; - - default : - return { textfield : CKEDITOR.TRISTATE_OFF }; - } - } - - if ( name == 'img' && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) - return { hiddenfield : CKEDITOR.TRISTATE_OFF }; - } - }); - } - - 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.data( 'cke-real-element-type' ) == 'hiddenfield' ) - evt.data.dialog = 'hiddenfield'; - else if ( element.is( 'input' ) ) - { - switch ( element.getAttribute( 'type' ) ) - { - 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; - default : - evt.data.dialog = 'textfield'; - 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 ) - { - htmlFilter && htmlFilter.addRules( - { - elements : - { - input : function( input ) - { - var attrs = input.attributes, - type = attrs.type; - // Old IEs don't provide type for Text inputs #5522 - if ( !type ) - attrs.type = 'text'; - if ( type == 'checkbox' || type == 'radio' ) - attrs.value == 'on' && delete attrs.value; - } - } - } ); - } - - if ( dataFilter ) - { - dataFilter.addRules( - { - elements : - { - input : function( element ) - { - if ( element.attributes.type == 'hidden' ) - return editor.createFakeParserElement( element, 'cke_hidden', 'hiddenfield' ); - } - } - } ); - } - }, - requires : [ 'image', 'fakeobjects' ] -} ); - -if ( CKEDITOR.env.ie ) -{ - CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute, - function( original ) - { - return function( name ) - { - var $attr = this.$.attributes.getNamedItem( name ); - - if ( this.getName() == 'input' ) - { - switch ( name ) - { - case 'class' : - return this.$.className.length > 0; - case 'checked' : - return !!this.$.checked; - case 'value' : - var type = this.getAttribute( 'type' ); - return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; - } - } - - return original.apply( this, arguments ); - }; - }); -} diff --git a/_source/plugins/horizontalrule/plugin.js b/_source/plugins/horizontalrule/plugin.js deleted file mode 100644 index 618ebaa..0000000 --- a/_source/plugins/horizontalrule/plugin.js +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -/** - * @file Horizontal Rule plugin. - */ - -(function() -{ - var horizontalruleCmd = - { - canUndo : false, // The undo snapshot will be handled by 'insertElement'. - exec : function( editor ) - { - var hr = editor.document.createElement( 'hr' ); - editor.insertElement( hr ); - } - }; - - var pluginName = 'horizontalrule'; - - // Register a plugin named "horizontalrule". - CKEDITOR.plugins.add( pluginName, - { - init : function( editor ) - { - editor.addCommand( pluginName, horizontalruleCmd ); - editor.ui.addButton( 'HorizontalRule', - { - label : editor.lang.horizontalrule, - command : pluginName - }); - } - }); -})(); diff --git a/_source/plugins/htmldataprocessor/plugin.js b/_source/plugins/htmldataprocessor/plugin.js deleted file mode 100644 index 2bf39af..0000000 --- a/_source/plugins/htmldataprocessor/plugin.js +++ /dev/null @@ -1,622 +0,0 @@ -/* -Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.html or http://ckeditor.com/license -*/ - -(function() -{ - // Regex to scan for   at the end of blocks, which are actually placeholders. - // Safari transforms the   to \xa0. (#4172) - var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/; - - var protectedSourceMarker = '{cke_protected}'; - - // Return the last non-space child node of the block (#4344). - function lastNoneSpaceChild( block ) - { - var lastIndex = block.children.length, - last = block.children[ lastIndex - 1 ]; - while ( last && last.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( last.value ) ) - last = block.children[ --lastIndex ]; - return last; - } - - function getNodeIndex( node ) { - var parent = node.parent; - return parent ? CKEDITOR.tools.indexOf( parent.children, node ) : -1; - } - - function trimFillers( block, fromSource ) - { - // If the current node is a block, and if we're converting from source or - // we're not in IE then search for and remove any tailing BR node. - // - // Also, any   at the end of blocks are fillers, remove them as well. - // (#2886) - var children = block.children, lastChild = lastNoneSpaceChild( block ); - if ( lastChild ) - { - if ( ( fromSource || !CKEDITOR.env.ie ) && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' ) - children.pop(); - if ( lastChild.type == CKEDITOR.NODE_TEXT && tailNbspRegex.test( lastChild.value ) ) - children.pop(); - } - } - - function blockNeedsExtension( block, fromSource, extendEmptyBlock ) - { - if( !fromSource && ( !extendEmptyBlock || - typeof extendEmptyBlock == 'function' && ( extendEmptyBlock( block ) === false ) ) ) - return false; - - // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg; - // 2. For the rest, at least table cell and list item need no filler space. - // (#6248) - if ( fromSource && CKEDITOR.env.ie && - ( document.documentMode > 7 - || block.name in CKEDITOR.dtd.tr - || block.name in CKEDITOR.dtd.$listItem ) ) - return false; - - var lastChild = lastNoneSpaceChild( block ); - - return !lastChild || lastChild && - ( lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' - // Some of the controls in form needs extension too, - // to move cursor at the end of the form. (#4791) - || block.name == 'form' && lastChild.name == 'input' ); - } - - function getBlockExtension( isOutput, emptyBlockFiller ) - { - return function( node ) - { - trimFillers( node, !isOutput ); - - if ( blockNeedsExtension( node, !isOutput, emptyBlockFiller ) ) - { - if ( isOutput || CKEDITOR.env.ie ) - node.add( new CKEDITOR.htmlParser.text( '\xa0' ) ); - else - node.add( new CKEDITOR.htmlParser.element( 'br', {} ) ); - } - }; - } - - var dtd = CKEDITOR.dtd; - - // Define orders of table elements. - var tableOrder = [ 'caption', 'colgroup', 'col', 'thead', 'tfoot', 'tbody' ]; - - // Find out the list of block-like tags that can contain
      . - var blockLikeTags = CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent ); - for ( var i in blockLikeTags ) - { - if ( ! ( 'br' in dtd[i] ) ) - delete blockLikeTags[i]; - } - // We just avoid filler in
       right now.
      -	// TODO: Support filler for 
      , line break is also occupy line height.
      -	delete blockLikeTags.pre;
      -	var defaultDataFilterRules =
      -	{
      -		elements : {},
      -		attributeNames :
      -		[
      -			// Event attributes (onXYZ) must not be directly set. They can become
      -			// active in the editing area (IE|WebKit).
      -			[ ( /^on/ ), 'data-cke-pa-on' ]
      -		]
      -	};
      -
      -	var defaultDataBlockFilterRules = { elements : {} };
      -
      -	for ( i in blockLikeTags )
      -		defaultDataBlockFilterRules.elements[ i ] = getBlockExtension();
      -
      -	var defaultHtmlFilterRules =
      -		{
      -			elementNames :
      -			[
      -				// Remove the "cke:" namespace prefix.
      -				[ ( /^cke:/ ), '' ],
      -
      -				// Ignore  tags.
      -				[ ( /^\?xml:namespace$/ ), '' ]
      -			],
      -
      -			attributeNames :
      -			[
      -				// Attributes saved for changes and protected attributes.
      -				[ ( /^data-cke-(saved|pa)-/ ), '' ],
      -
      -				// All "data-cke-" attributes are to be ignored.
      -				[ ( /^data-cke-.*/ ), '' ],
      -
      -				[ 'hidefocus', '' ]
      -			],
      -
      -			elements :
      -			{
      -				$ : function( element )
      -				{
      -					var attribs = element.attributes;
      -
      -					if ( attribs )
      -					{
      -						// Elements marked as temporary are to be ignored.
      -						if ( attribs[ 'data-cke-temp' ] )
      -							return false;
      -
      -						// Remove duplicated attributes - #3789.
      -						var attributeNames = [ 'name', 'href', 'src' ],
      -							savedAttributeName;
      -						for ( var i = 0 ; i < attributeNames.length ; i++ )
      -						{
      -							savedAttributeName = 'data-cke-saved-' + attributeNames[ i ];
      -							savedAttributeName in attribs && ( delete attribs[ attributeNames[ i ] ] );
      -						}
      -					}
      -
      -					return element;
      -				},
      -
      -				// The contents of table should be in correct order (#4809).
      -				table : function( element )
      -				{
      -					// Clone the array as it would become empty during the sort call.
      -					var children = element.children.slice( 0 );
      -					children.sort( function ( node1, node2 )
      -								   {
      -										 var index1, index2;
      -
      -										 // Compare in the predefined order.
      -										 if ( node1.type == CKEDITOR.NODE_ELEMENT &&
      -													node2.type == node1.type )
      -										 {
      -											 index1 = CKEDITOR.tools.indexOf( tableOrder, node1.name );
      -											 index2 = CKEDITOR.tools.indexOf( tableOrder, node2.name );
      -										 }
      -
      -										 // Make sure the sort is stable, if no order can be established above.
      -										 if ( !( index1 > -1 && index2 > -1 && index1 != index2 ) )
      -										 {
      -											 index1 = getNodeIndex( node1 );
      -											 index2 = getNodeIndex( node2 );
      -										 }
      -
      -										 return index1 > index2 ? 1 : -1;
      -									 } );
      -				},
      -
      -				embed : function( element )
      -				{
      -					var parent = element.parent;
      -
      -					// If the  is child of a , copy the width
      -					// and height attributes from it.
      -					if ( parent && parent.name == 'object' )
      -					{
      -						var parentWidth = parent.attributes.width,
      -							parentHeight = parent.attributes.height;
      -						parentWidth && ( element.attributes.width = parentWidth );
      -						parentHeight && ( element.attributes.height = parentHeight );
      -					}
      -				},
      -				// Restore param elements into self-closing.
      -				param : function( param )
      -				{
      -					param.children = [];
      -					param.isEmpty = true;
      -					return param;
      -				},
      -
      -				// Remove empty link but not empty anchor.(#3829)
      -				a : function( element )
      -				{
      -					if ( !( element.children.length ||
      -							element.attributes.name ||
      -							element.attributes[ 'data-cke-saved-name' ] ) )
      -					{
      -						return false;
      -					}
      -				},
      -
      -				// Remove dummy span in webkit.
      -				span: function( element )
      -				{
      -					if ( element.attributes[ 'class' ] == 'Apple-style-span' )
      -						delete element.name;
      -				},
      -
      -				// Empty 
       in IE is reported with filler node ( ).
      -				pre : function( element ) { CKEDITOR.env.ie && trimFillers( element ); },
      -
      -				html : function( element )
      -				{
      -					delete element.attributes.contenteditable;
      -					delete element.attributes[ 'class' ];
      -				},
      -
      -				body : function( element )
      -				{
      -					delete element.attributes.spellcheck;
      -					delete element.attributes.contenteditable;
      -				},
      -
      -				style : function( element )
      -				{
      -					var child = element.children[ 0 ];
      -					child && child.value && ( child.value = CKEDITOR.tools.trim( child.value ));
      -
      -					if ( !element.attributes.type )
      -						element.attributes.type = 'text/css';
      -				},
      -
      -				title : function( element )
      -				{
      -					var titleText = element.children[ 0 ];
      -					titleText && ( titleText.value = element.attributes[ 'data-cke-title' ] || '' );
      -				}
      -			},
      -
      -			attributes :
      -			{
      -				'class' : function( value, element )
      -				{
      -					// Remove all class names starting with "cke_".
      -					return CKEDITOR.tools.ltrim( value.replace( /(?:^|\s+)cke_[^\s]*/g, '' ) ) || false;
      -				}
      -			}
      -		};
      -
      -	if ( CKEDITOR.env.ie )
      -	{
      -		// IE outputs style attribute in capital letters. We should convert
      -		// them back to lower case, while not hurting the values (#5930)
      -		defaultHtmlFilterRules.attributes.style = function( value, element )
      -		{
      -			return value.replace( /(^|;)([^\:]+)/g, function( match )
      -				{
      -					return match.toLowerCase();
      -				});
      -		};
      -	}
      -
      -	function protectReadOnly( element )
      -	{
      -		var attrs = element.attributes;
      -
      -		// We should flag that the element was locked by our code so
      -		// it'll be editable by the editor functions (#6046).
      -		if ( attrs.contenteditable != "false" )
      -			attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1;
      -
      -		attrs.contenteditable = "false";
      -	}
      -	function unprotectReadyOnly( element )
      -	{
      -		var attrs = element.attributes;
      -		switch( attrs[ 'data-cke-editable' ] )
      -		{
      -			case 'true':	attrs.contenteditable = 'true';	break;
      -			case '1':		delete attrs.contenteditable;	break;
      -		}
      -	}
      -	// 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 protectElementRegex = /<(a|area|img|input|source)\b([^>]*)>/gi,
      -		protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;
      -
      -	var protectElementsRegex = /(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
      -		encodedElementsRegex = /([^<]*)<\/cke:encoded>/gi;
      -
      -	var protectElementNamesRegex = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,
      -		unprotectElementNamesRegex = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi;
      -
      -	var protectSelfClosingRegex = /]*?)\/?>(?!\s*<\/cke:\1)/gi;
      -
      -	function protectAttributes( html )
      -	{
      -		return html.replace( protectElementRegex, function( element, tag, attributes )
      -		{
      -			return '<' +  tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName )
      -			{
      -				// Avoid corrupting the inline event attributes (#7243).
      -				// We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218)
      -				if ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )
      -					return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr;
      -
      -				return fullAttr;
      -			}) + '>';
      -		});
      -	}
      -
      -	function protectElements( html )
      -	{
      -		return html.replace( protectElementsRegex, function( match )
      -			{
      -				return '' + encodeURIComponent( match ) + '';
      -			});
      -	}
      -
      -	function unprotectElements( html )
      -	{
      -		return html.replace( encodedElementsRegex, function( match, encoded )
      -			{
      -				return decodeURIComponent( encoded );
      -			});
      -	}
      -
      -	function protectElementsNames( html )
      -	{
      -		return html.replace( protectElementNamesRegex, '$1cke:$2');
      -	}
      -
      -	function unprotectElementNames( html )
      -	{
      -		return html.replace( unprotectElementNamesRegex, '$1$2' );
      -	}
      -
      -	function protectSelfClosingElements( html )
      -	{
      -		return html.replace( protectSelfClosingRegex, '' );
      -	}
      -
      -	function protectPreFormatted( html )
      -	{
      -		return html.replace( /(]*>)(\r\n|\n)/g, '$1$2$2' );
      -	}
      -
      -	function protectRealComments( html )
      -	{
      -		return html.replace( //g, function( match )
      -			{
      -				return '';
      -			});
      -	}
      -
      -	function unprotectRealComments( html )
      -	{
      -		return html.replace( //g, function( match, data )
      -			{
      -				return decodeURIComponent( data );
      -			});
      -	}
      -
      -	function unprotectSource( html, editor )
      -	{
      -		var store = editor._.dataStore;
      -
      -		return html.replace( //g, function( match, data )
      -			{
      -				return decodeURIComponent( data );
      -			}).replace( /\{cke_protected_(\d+)\}/g, function( match, id )
      -			{
      -				return store && store[ id ] || '';
      -			});
      -	}
      -
      -	function protectSource( data, editor )
      -	{
      -		var protectedHtml = [],
      -			protectRegexes = editor.config.protectedSource,
      -			store = editor._.dataStore || ( editor._.dataStore = { id : 1 } ),
      -			tempRegex = /<\!--\{cke_temp(comment)?\}(\d*?)-->/g;
      -
      -		var regexes =
      -			[
      -				// Script tags will also be forced to be protected, otherwise
      -				// IE will execute them.
      -				( //gi ),
      -
      -				// 
      '+aa+'
      ';}),X=[];W.replace(/([\s\S]*?)<\/pre>/gi,function(Y,Z){X.push(Z);});return X;};function C(T,U,V){var W='',X='';T=T.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(Y,Z,aa){Z&&(W=Z);aa&&(X=aa);return '';});return W+T.replace(U,V)+X;};function D(T,U){var V;if(T.length>1)V=new d.documentFragment(U.getDocument());for(var W=0;W');X=X.replace(/[ \t]{2,}/g,function(Z){return e.repeat(' ',Z.length-1)+' ';});if(V){var Y=U.clone();Y.setHtml(X);V.append(Y);}else U.setHtml(X);}return V||U;};function E(T,U){var V=T.getBogus();V&&V.remove();var W=T.getHtml();W=C(W,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');W=W.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');W=W.replace(/([ \t\n\r]+| )/g,' ');W=W.replace(/]*>/gi,'\n');if(c){var X=T.getDocument().createElement('div');X.append(U);U.$.outerHTML='
      '+W+'
      ';U.copyAttributes(X.getFirst());U=X.getFirst().remove();}else U.setHtml(W);return U;};function F(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T)[U.getName()],Z=e.isEmpty(W)&&e.isEmpty(X);for(var aa in W){if((aa=='class'||T._.definition.fullMatch)&&U.getAttribute(aa)!=O(aa,W[aa]))continue;Z=U.hasAttribute(aa);U.removeAttribute(aa);}for(var ab in X){if(T._.definition.fullMatch&&U.getStyle(ab)!=O(ab,X[ab],true))continue;Z=Z||!!U.getStyle(ab);U.removeStyle(ab);}H(U,Y,m[U.getName()]);if(Z)!f.$block[U.getName()]||T._.enterMode==2&&!U.hasAttributes()?I(U):U.renameNode(T._.enterMode==1?'p':'div');};function G(T,U){var V=T._.definition,W=V.attributes,X=V.styles,Y=N(T),Z=U.getElementsByTag(T.element);for(var aa=Z.count();--aa>=0;)F(T,Z.getItem(aa));for(var ab in Y){if(ab!=T.element){Z=U.getElementsByTag(ab);for(aa=Z.count()-1;aa>=0;aa--){var ac=Z.getItem(aa);H(ac,Y[ab]);}}}};function H(T,U,V){var W=U&&U.attributes;if(W)for(var X=0;X0)H+=(F.$.offsetWidth||0)-(F.$.clientWidth||0)+3;H+=4;F.setStyle('width',H+'px');v.element.addClass('cke_frameLoaded');var I=v.element.$.scrollHeight;if(c&&b.quirks&&I>0)I+=(F.$.offsetHeight||0)-(F.$.clientHeight||0)+3;F.setStyle('height',I+'px');u._.currentBlock.element.setStyle('display','none').removeStyle('display');}else F.removeStyle('height');if(A)B-=w.$.offsetWidth;w.setStyle('left',B+'px');var J=u.element,K=J.getWindow(),L=w.$.getBoundingClientRect(),M=K.getViewPaneSize(),N=L.width||L.right-L.left,O=L.height||L.bottom-L.top,P=A?L.right:M.width-L.left,Q=A?M.width-L.right:L.left;if(A){if(PN)B+=N;else if(M.width>N)B-=L.left;else B=B-L.right+M.width;}else if(PN)B-=N;else if(M.width>N)B=B-L.right+M.width;else B-=L.left;var R=M.height-L.top,S=L.top; -if(RO)C-=O;else if(M.height>O)C=C-L.bottom+M.height;else C-=L.top;if(c){var T=new h(w.$.offsetParent),U=T;if(U.getName()=='html')U=U.getDocument().getBody();if(U.getComputedStyle('direction')=='rtl')if(b.ie8Compat)B-=w.getDocument().getDocumentElement().$.scrollLeft*2;else B-=T.$.scrollWidth-T.$.clientWidth;}var V=w.getFirst(),W;if(W=V.getCustomData('activePanel'))W.onHide&&W.onHide.call(this,1);V.setCustomData('activePanel',this);w.setStyles({top:C+'px',left:B+'px'});w.setOpacity(1);},this);u.isLoaded?E():u.onLoad=E;e.setTimeout(function(){x.$.contentWindow.focus();this.allowBlur(true);},0,this);},b.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);n=0;},hide:function(p){var r=this;if(r.visible&&(!r.onHide||r.onHide.call(r)!==true)){r.hideChild();b.gecko&&r._.iframe.getFrameDocument().$.activeElement.blur();r.element.setStyle('display','none');r.visible=0;r.element.getFirst().removeCustomData('activePanel');var q=p!==false&&r._.returnFocus;if(q){if(b.webkit&&q.type)q.getWindow().$.focus();q.focus();}}},allowBlur:function(p){var q=this._.panel;if(p!=undefined)q.allowBlur=p;return q.allowBlur;},showAsChild:function(p,q,r,s,t,u){if(this._.activeChild==p&&p._.panel._.offsetParentId==r.getId())return;this.hideChild();p.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=p;this._.focused=false;p.showBlock(q,r,s,t,u);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){p.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var p=this._.activeChild;if(p){delete p.onHide;delete p._.returnFocus;delete this._.activeChild;p.hide();}}}});a.on('instanceDestroyed',function(){var p=e.isEmpty(a.instances);for(var q in m){var r=m[q];if(p)r.destroy();else r.element.hide();}p&&(m={});});})();j.add('menu',{beforeInit:function(m){var n=m.config.menu_groups.split(','),o=m._.menuGroups={},p=m._.menuItems={};for(var q=0;q'],B=r.length,C=B&&r[0].group;for(var D=0;D');C=E.group;}E.render(this,D,A);}A.push('');u.setHtml(A.join(''));k.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(t,this.id,n,o,p,q);else t.showBlock(this.id,n,o,p,q);s.fire('menuShow',[t]);},addListener:function(n){this._.listeners.push(n);},hide:function(n){var o=this;o._.onHide&&o._.onHide();o._.panel&&o._.panel.hide(n);}}});function m(n){n.sort(function(o,p){if(o.groupp.group)return 1;return o.orderp.order?1:0;});};a.menuItem=e.createClass({$:function(n,o,p){var q=this;e.extend(q,p,{order:0,className:'cke_button_'+o});q.group=n._.menuGroups[q.group];q.editor=n;q.name=o;},proto:{render:function(n,o,p){var w=this;var q=n.id+String(o),r=typeof w.state=='undefined'?2:w.state,s=' cke_'+(r==1?'on':r==0?'disabled':'off'),t=w.label;if(w.className)s+=' '+w.className;var u=w.getItems;p.push(''+''+'');if(u)p.push('','&#',w.editor.lang.dir=='rtl'?'9668':'9658',';',''); -p.push(t,'');}}});})();i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var m;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;n.getMode().loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){if(n.mode){o();n.removeListener('mode',arguments.callee);}});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(n.getMode().getData(),null,1);m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=n.getMode().getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)n.getMode().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);},0);});n.on('destroy',function(){var o=this;if(o.mode)o._.modes[o.mode].unload(o.getThemeSpace('contents'));});}});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){this.fire('beforeSetMode',{newMode:n});var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this._.previousMode=this.mode;this.fire('beforeModeUnload');var r=this.getMode();o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=this.getMode(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.getMode=function(n){return this._.modes&&this._.modes[n||this.mode];};a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var n=this.getMode();if(n)n.focus();};})();i.startupMode='wysiwyg';i.editingBlock=true;(function(){function m(){var G=this;try{var D=G.getSelection();if(!D||!D.document.getWindow().$)return;var E=D.getStartElement(),F=new d.elementPath(E);if(!F.compare(G._.selectionPreviousPath)){G._.selectionPreviousPath=F;G.fire('selectionChange',{selection:D,path:F,element:E}); -}}catch(H){}};var n,o;function p(){o=true;if(n)return;q.call(this);n=e.setTimeout(q,200,this);};function q(){n=null;if(o){e.setTimeout(m,0,this);o=false;}};function r(D){function E(I,J){if(!I||I.type==3)return false;var K=D.clone();return K['moveToElementEdit'+(J?'End':'Start')](I);};var F=D.startContainer,G=D.getPreviousNode(A,null,F),H=D.getNextNode(A,null,F);if(E(G)||E(H,1))return true;if(!(G||H)&&!(F.type==1&&F.isBlockBoundary()&&F.getBogus()))return true;return false;};var s={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(D){switch(D.mode){case 'wysiwyg':D.document.$.execCommand('SelectAll',false,null);D.forceNextSelectionCheck();D.selectionChange();break;case 'source':var E=D.textarea.$;if(c)E.createTextRange().execCommand('SelectAll');else{E.selectionStart=0;E.selectionEnd=E.value.length;}E.focus();}},canUndo:false};function t(D){w(D);var E=D.createText('​');D.setCustomData('cke-fillingChar',E);return E;};function u(D){return D&&D.getCustomData('cke-fillingChar');};function v(D){var E=D&&u(D);if(E)if(E.getCustomData('ready'))w(D);else E.setCustomData('ready',1);};function w(D){var E=D&&D.removeCustomData('cke-fillingChar');if(E){var F,G=D.getSelection().getNative(),H=G&&G.type!='None'&&G.getRangeAt(0);if(E.getLength()>1&&H&&H.intersectsNode(E.$)){F=[G.anchorOffset,G.focusOffset];var I=G.anchorNode==E.$&&G.anchorOffset>0,J=G.focusNode==E.$&&G.focusOffset>0;I&&F[0]--;J&&F[1]--;x(G)&&F.unshift(F.pop());}E.setText(E.getText().replace(/\u200B/g,''));if(F){var K=G.getRangeAt(0);K.setStart(K.startContainer,F[0]);K.setEnd(K.startContainer,F[1]);G.removeAllRanges();G.addRange(K);}}};function x(D){if(!D.isCollapsed){var E=D.getRangeAt(0);E.setStart(D.anchorNode,D.anchorOffset);E.setEnd(D.focusNode,D.focusOffset);return E.collapsed;}};j.add('selection',{init:function(D){if(b.webkit){D.on('selectionChange',function(){v(D.document);});D.on('beforeSetMode',function(){w(D.document);});var E,F;function G(){var I=D.document,J=u(I);if(J){var K=I.$.defaultView.getSelection();if(K.type=='Caret'&&K.anchorNode==J.$)F=1;E=J.getText();J.setText(E.replace(/\u200B/g,''));}};function H(){var I=D.document,J=u(I);if(J){J.setText(E);if(F){I.$.defaultView.getSelection().setPosition(J.$,J.getLength());F=0;}}};D.on('beforeUndoImage',G);D.on('afterUndoImage',H);D.on('beforeGetData',G,null,null,0);D.on('getData',H);}D.on('contentDom',function(){var I=D.document,J=a.document,K=I.getBody(),L=I.getDocumentElement();if(c){var M,N,O=1;K.on('focusin',function(V){if(V.data.$.srcElement.nodeName!='BODY')return; -var W=I.getCustomData('cke_locked_selection');if(W){W.unlock(1);W.lock();}else if(M&&O){try{M.select();}catch(X){}M=null;}});K.on('focus',function(){N=1;U();});K.on('beforedeactivate',function(V){if(V.data.$.toElement)return;N=0;O=1;});c&&D.on('blur',function(){try{I.$.selection.empty();}catch(V){}});L.on('mousedown',function(){O=0;});L.on('mouseup',function(){O=1;});var P;K.on('mousedown',function(V){if(V.data.$.button==2){var W=D.document.$.selection;if(W.type=='None')P=D.window.getScrollPosition();}T();});K.on('mouseup',function(V){if(V.data.$.button==2&&P){D.document.$.documentElement.scrollLeft=P.x;D.document.$.documentElement.scrollTop=P.y;}P=null;N=1;setTimeout(function(){U(true);},0);});K.on('keydown',T);K.on('keyup',function(){N=1;U();});if(I.$.compatMode!='BackCompat'){if(b.ie7Compat||b.ie6Compat){function Q(V,W,X){try{V.moveToPoint(W,X);}catch(Y){}};L.on('mousedown',function(V){function W(ab){ab=ab.data.$;if(Z){var ac=K.$.createTextRange();Q(ac,ab.x,ab.y);Z.setEndPoint(aa.compareEndPoints('StartToStart',ac)<0?'EndToEnd':'StartToStart',ac);Z.select();}};function X(){J.removeListener('mouseup',Y);L.removeListener('mouseup',Y);};function Y(){L.removeListener('mousemove',W);X();Z.select();};V=V.data;if(V.getTarget().is('html')&&V.$.x0)P=Q-1;else if(R<0)O=Q+1;else if(b.ie9Compat&&L.tagName=='BR'){var U=J.defaultView.getSelection();return{container:U[H?'anchorNode':'focusNode'],offset:U[H?'anchorOffset':'focusOffset']};}else return{container:I,offset:E(L)};}if(Q==-1||Q==K.length-1&&R<0){N.moveToElementText(I); -N.setEndPoint('StartToStart',G);S=N.text.replace(/(\r\n|\r)/g,'\n').length;K=I.childNodes;if(!S){L=K[K.length-1];if(L.nodeType!=3)return{container:I,offset:K.length};else return{container:L,offset:L.nodeValue.length};}var V=K.length;while(S>0&&V>0){M=K[--V];if(M.nodeType==3){T=M;S-=M.nodeValue.length;}}return{container:T,offset:-S};}else{N.collapse(R>0?true:false);N.setEndPoint(R>0?'StartToStart':'EndToStart',G);S=N.text.replace(/(\r\n|\r)/g,'\n').length;if(!S)return{container:I,offset:E(L)+(R>0?0:1)};while(S>0)try{M=L[R>0?'previousSibling':'nextSibling'];if(M.nodeType==3){S-=M.nodeValue.length;T=M;}L=M;}catch(W){return{container:I,offset:E(L)};}return{container:T,offset:R>0?-S:T.nodeValue.length+S};}};return function(){var Q=this;var G=Q.getNative(),H=G&&G.createRange(),I=Q.getType(),J;if(!G)return[];if(I==2){J=new d.range(Q.document);var K=F(H,true);J.setStart(new d.node(K.container),K.offset);K=F(H);J.setEnd(new d.node(K.container),K.offset);if(J.endContainer.getPosition(J.startContainer)&4&&J.endOffset<=J.startContainer.getIndex())J.collapse();return[J];}else if(I==3){var L=[];for(var M=0;M=L.getLength())P.setStartAfter(L);else P.setStartBefore(L);if(M&&M.type==3)if(!O)P.setEndBefore(M);else P.setEndAfter(M);var Q=new d.walker(P);Q.evaluator=function(R){if(R.type==1&&R.isReadOnly()){var S=I.clone();I.setEndBefore(R);if(I.collapsed)G.splice(H--,1); -if(!(R.getPosition(P.endContainer)&16)){S.setStartAfter(R);if(!S.collapsed)G.splice(H+1,0,S);}return true;}return false;};Q.next();}}return F.ranges;};})(),getStartElement:function(){var K=this;var D=K._.cache;if(D.startElement!==undefined)return D.startElement;var E,F=K.getNative();switch(K.getType()){case 3:return K.getSelectedElement();case 2:var G=K.getRanges()[0];if(G){if(!G.collapsed){G.optimize();while(1){var H=G.startContainer,I=G.startOffset;if(I==(H.getChildCount?H.getChildCount():H.getLength())&&!H.isBlockBoundary())G.setStartAfter(H);else break;}E=G.startContainer;if(E.type!=1)return E.getParent();E=E.getChild(G.startOffset);if(!E||E.type!=1)E=G.startContainer;else{var J=E.getFirst();while(J&&J.type==1){E=J;J=J.getFirst();}}}else{E=G.startContainer;if(E.type!=1)E=E.getParent();}E=E.$;}}return D.startElement=E?new h(E):null;},getSelectedElement:function(){var D=this._.cache;if(D.selectedElement!==undefined)return D.selectedElement;var E=this,F=e.tryThese(function(){return E.getNative().createRange().item(0);},function(){var G,H,I=E.getRanges()[0],J=I.getCommonAncestor(1,1),K={table:1,ul:1,ol:1,dl:1};for(var L in K){if(G=J.getAscendant(L,1))break;}if(G){var M=new d.range(this.document);M.setStartAt(G,1);M.setEnd(I.startContainer,I.startOffset);var N=e.extend(K,f.$listItem,f.$tableContent),O=new d.walker(M),P=function(Q,R){return function(S,T){if(S.type==3&&(!e.trim(S.getText())||S.getParent().data('cke-bookmark')))return true;var U;if(S.type==1){U=S.getName();if(U=='br'&&R&&S.equals(S.getParent().getBogus()))return true;if(T&&U in N||U in f.$removeEmpty)return true;}Q.halted=1;return false;};};O.guard=P(O);if(O.checkBackward()&&!O.halted){O=new d.walker(M);M.setStart(I.endContainer,I.endOffset);M.setEndAt(G,2);O.guard=P(O,1);if(O.checkForward()&&!O.halted)H=G.$;}}if(!H)throw 0;return H;},function(){var G=E.getRanges()[0],H,I;for(var J=2;J&&!((H=G.getEnclosedNode())&&H.type==1&&y[H.getName()]&&(I=H));J--)G.shrink(1);return I.$;});return D.selectedElement=F?new h(F):null;},getSelectedText:function(){var D=this._.cache;if(D.selectedText!==undefined)return D.selectedText;var E='',F=this.getNative();if(this.getType()==2)E=c?F.createRange().text:F.toString();return D.selectedText=E;},lock:function(){var D=this;D.getRanges();D.getStartElement();D.getSelectedElement();D.getSelectedText();D._.cache.nativeSel={};D.isLocked=1;D.document.setCustomData('cke_locked_selection',D);},unlock:function(D){var I=this;var E=I.document,F=E.getCustomData('cke_locked_selection'); -if(F){E.setCustomData('cke_locked_selection',null);if(D){var G=F.getSelectedElement(),H=!G&&F.getRanges();I.isLocked=0;I.reset();if(G)I.selectElement(G);else I.selectRanges(H);}}if(!F||!D){I.isLocked=0;I.reset();}},reset:function(){this._.cache={};},selectElement:function(D){var F=this;if(F.isLocked){var E=new d.range(F.document);E.setStartBefore(D);E.setEndAfter(D);F._.cache.selectedElement=D;F._.cache.startElement=D;F._.cache.ranges=new d.rangeList(E);F._.cache.type=3;return;}E=new d.range(D.getDocument());E.setStartBefore(D);E.setEndAfter(D);E.select();F.document.fire('selectionchange');F.reset();},selectRanges:function(D){var R=this;if(R.isLocked){R._.cache.selectedElement=null;R._.cache.startElement=D[0]&&D[0].getTouchedStartNode();R._.cache.ranges=new d.rangeList(D);R._.cache.type=2;return;}if(c){if(D.length>1){var E=D[D.length-1];D[0].setEnd(E.endContainer,E.endOffset);D.length=1;}if(D[0])D[0].select();R.reset();}else{var F=R.getNative();if(!F)return;if(D.length){F.removeAllRanges();b.webkit&&w(R.document);}for(var G=0;G=0){M.collapse(1);N.setEnd(M.endContainer.$,M.endOffset);}else throw S;}F.addRange(N);}R.document.fire('selectionchange');R.reset();}},createBookmarks:function(D){return this.getRanges().createBookmarks(D);},createBookmarks2:function(D){return this.getRanges().createBookmarks2(D);},selectBookmarks:function(D){var E=[];for(var F=0;F','','',this.label,'','=10900&&!o.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',p,'_label" aria-describedby="',p,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)n.push(' onkeypress="return false;"');if(b.gecko)n.push(' onblur="this.style.cssText = this.style.cssText;"');n.push(' onkeydown="CKEDITOR.tools.callFunction( ',t,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',u,', event);" '+(c?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',q,', this); return false;">'+this.label+''+''+''+(b.hc?'▼':b.air?' ':'')+''+''+''+'');if(this.onRender)this.onRender();return r;},createPanel:function(m){if(this._.panel)return;var n=this._.panelDefinition,o=this._.panelDefinition.block,p=n.parent||a.document.getBody(),q=new k.floatPanel(m,p,n),r=q.addListBlock(this.id,o),s=this;q.onShow=function(){if(s.className)this.element.getFirst().addClass(s.className+'_panel');s.setState(1);r.focus(!s.multiSelect&&s.getValue());s._.on=1;if(s.onOpen)s.onOpen();};q.onHide=function(t){if(s.className)this.element.getFirst().removeClass(s.className+'_panel');s.setState(s.modes&&s.modes[m.mode]?2:0);s._.on=0;if(!t&&s.onClose)s.onClose();};q.onEscape=function(){q.hide();};r.onClick=function(t,u){s.document.getWindow().focus();if(s.onClick)s.onClick.call(s,t,u);if(u)s.setValue(t,s._.items[t]);else s.setValue('');q.hide(false);};this._.panel=q;this._.list=r;q.getBlock(this.id).onHide=function(){s._.on=0;s.setState(2);};if(this.init)this.init();},setValue:function(m,n){var p=this;p._.value=m;var o=p.document.getById('cke_'+p.id+'_text');if(o){if(!(m||n)){n=p.label;o.addClass('cke_inline_label');}else o.removeClass('cke_inline_label');o.setHtml(typeof n!='undefined'?n:m);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(m){this._.list.mark(m);},hideItem:function(m){this._.list.hideItem(m);},hideGroup:function(m){this._.list.hideGroup(m);},showAll:function(){this._.list.showAll();},add:function(m,n,o){this._.items[m]=o||m;this._.list.add(m,n,o);},startGroup:function(m){this._.list.startGroup(m); -},commit:function(){var m=this;if(!m._.committed){m._.list.commit();m._.committed=1;k.fire('ready',m);}m._.committed=1;},setState:function(m){var n=this;if(n._.state==m)return;n.document.getById('cke_'+n.id).setState(m);n._.state=m;}}});k.prototype.addRichCombo=function(m,n){this.add(m,'richcombo',n);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var o=this;o.base();o.indentationChars='\t';o.selfClosingEnd=' />';o.lineBreakChars='\n';o.forceSimpleAmpersand=0;o.sortAttributes=1;o._.indent=0;o._.indentation='';o._.inPre=0;o._.rules={};var m=f;for(var n in e.extend({},m.$nonBodyContent,m.$block,m.$listItem,m.$tableContent))o.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!m[n]['#'],breakAfterClose:1});o.setRules('br',{breakAfterOpen:1});o.setRules('title',{indent:0,breakAfterOpen:0});o.setRules('style',{indent:0,breakBeforeClose:1});o.setRules('pre',{indent:0});},proto:{openTag:function(m,n){var p=this;var o=p._.rules[m];if(p._.indent)p.indentation();else if(o&&o.breakBeforeOpen){p.lineBreak();p.indentation();}p._.output.push('<',m);},openTagClose:function(m,n){var p=this;var o=p._.rules[m];if(n)p._.output.push(p.selfClosingEnd);else{p._.output.push('>');if(o&&o.indent)p._.indentation+=p.indentationChars;}if(o&&o.breakAfterOpen)p.lineBreak();m=='pre'&&(p._.inPre=1);},attribute:function(m,n){if(typeof n=='string'){this.forceSimpleAmpersand&&(n=n.replace(/&/g,'&'));n=e.htmlEncodeAttr(n);}this._.output.push(' ',m,'="',n,'"');},closeTag:function(m){var o=this;var n=o._.rules[m];if(n&&n.indent)o._.indentation=o._.indentation.substr(o.indentationChars.length);if(o._.indent)o.indentation();else if(n&&n.breakBeforeClose){o.lineBreak();o.indentation();}o._.output.push('');m=='pre'&&(o._.inPre=0);if(n&&n.breakAfterClose)o.lineBreak();},text:function(m){var n=this;if(n._.indent){n.indentation();!n._.inPre&&(m=e.ltrim(m));}n._.output.push(m);},comment:function(m){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var m=this;if(!m._.inPre&&m._.output.length>0)m._.output.push(m.lineBreakChars);m._.indent=1;},indentation:function(){var m=this;if(!m._.inPre)m._.output.push(m._.indentation);m._.indent=0;},setRules:function(m,n){var o=this._.rules[m];if(o)e.extend(o,n,true);else this._.rules[m]=n;}}});j.add('menubutton',{requires:['button','menu'],beforeInit:function(m){m.ui.addHandler('menubutton',k.menuButton.handler);}});a.UI_MENUBUTTON='menubutton'; -(function(){var m=function(n){var o=this._;if(o.state===0)return;o.previousState=o.state;var p=o.menu;if(!p){p=o.menu=new a.menu(n,{panel:{className:n.skinClass+' cke_contextmenu',attributes:{'aria-label':n.lang.common.options}}});p.onHide=e.bind(function(){this.setState(this.modes&&this.modes[n.mode]?o.previousState:0);},this);if(this.onMenu)p.addListener(this.onMenu);}if(o.on){p.hide();return;}this.setState(1);p.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(n){var o=n.panel;delete n.panel;this.base(n);this.hasArrow=true;this.click=m;},statics:{handler:{create:function(n){return new k.menuButton(n);}}}});})();j.add('dialogui');(function(){var m=function(u){var x=this;x._||(x._={});x._['default']=x._.initValue=u['default']||'';x._.required=u.required||false;var v=[x._];for(var w=1;w',v.label,'',''); -else{var D={type:'hbox',widths:v.widths,padding:0,children:[{type:'html',html:'