radiant-ck_editor_filter-extension 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +7 -1
- data/VERSION +1 -1
- data/ck_editor_filter_extension.rb +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.html +1130 -373
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.html +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/application.xml +32 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/run.bat +9 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/run.sh +8 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/sample.html +45 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ajax.html +23 -25
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api.html +64 -24
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog.html +36 -19
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog/my_dialog.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/advanced.asp +105 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/events.asp +136 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/index.html +103 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/replace.asp +72 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/replaceall.asp +77 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/sample_posteddata.asp +46 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/standalone.asp +72 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/_posteddata.php +59 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_for_flash.fla +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_for_flash.swf +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_xhtml.css +204 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/parsesample.css +70 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/swfobject.js +18 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/autogrow.html +103 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/bbcode.html +136 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/devtools.html +94 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/divreplace.html +27 -10
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/enterkey.html +39 -12
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/fullpage.html +33 -13
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/index.html +88 -25
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/jqueryadapter.html +34 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_for_flash.html +275 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_html.html +285 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_xhtml.html +181 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/advanced.php +56 -29
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/events.php +58 -35
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/index.html +47 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replace.php +48 -24
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replaceall.php +50 -30
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/standalone.php +52 -33
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/placeholder.html +81 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/readonly.html +91 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebyclass.html +22 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebycode.html +25 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.css +85 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample_posteddata.php +21 -59
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sharedspaces.html +32 -10
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/skins.html +38 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/stylesheetparser.html +93 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/tableresize.html +115 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_color.html +49 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_languages.html +53 -23
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/adapters/jquery.js +17 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/_bootstrap.js +21 -18
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor.js +42 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_base.js +66 -29
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_basic.js +12 -15
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/command.js +138 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/commanddefinition.js +59 -16
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/config.js +142 -18
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dataprocessor.js +6 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom.js +2 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/comment.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/document.js +29 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/documentfragment.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/domobject.js +59 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/element.js +249 -27
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js +18 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/event.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/node.js +84 -56
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/nodelist.js +4 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/range.js +345 -48
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/rangelist.js +213 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/text.js +6 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/walker.js +40 -29
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/window.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dtd.js +15 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor.js +336 -15
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor_basic.js +19 -12
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/env.js +80 -17
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/event.js +12 -6
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/eventInfo.js +5 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/focusmanager.js +27 -12
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser.js +17 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/basicwriter.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/cdata.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/comment.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/element.js +14 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/filter.js +34 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/fragment.js +105 -108
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/text.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/lang.js +12 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/loader.js +7 -9
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugindefinition.js +18 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugins.js +21 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/resourcemanager.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/scriptloader.js +7 -25
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/skins.js +5 -25
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/themes.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/tools.js +61 -12
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ui.js +13 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_languages.js +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_translationstatus.txt +58 -57
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/af.js +521 -410
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ar.js +160 -49
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bg.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bn.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bs.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ca.js +260 -149
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cs.js +233 -122
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cy.js +159 -48
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/da.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/de.js +217 -106
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/el.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-au.js +166 -55
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-ca.js +166 -55
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-gb.js +277 -166
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en.js +166 -55
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eo.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/es.js +182 -71
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/et.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eu.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fa.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fi.js +178 -67
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fo.js +339 -228
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr-ca.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr.js +261 -150
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gl.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gu.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/he.js +179 -68
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hi.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hr.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hu.js +341 -230
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/is.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/it.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ja.js +195 -84
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ka.js +810 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/km.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ko.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lt.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lv.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/mn.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ms.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nb.js +286 -175
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nl.js +178 -67
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/no.js +286 -175
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pl.js +279 -168
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt-br.js +318 -208
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ro.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ru.js +159 -48
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sk.js +192 -81
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sl.js +161 -50
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr-latn.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sv.js +357 -247
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/th.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/tr.js +345 -235
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/uk.js +387 -276
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/vi.js +336 -225
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh-cn.js +271 -160
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh.js +162 -51
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +16 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/en.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/plugin.js +4 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/about.js +4 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/plugin.js +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/adobeair/plugin.js +228 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/ajax/plugin.js +152 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/autogrow/plugin.js +88 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/basicstyles/plugin.js +27 -19
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/bbcode/plugin.js +924 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/bidi/plugin.js +331 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/blockquote/plugin.js +8 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/button/plugin.js +70 -55
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/dialogs/paste.js +115 -78
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/plugin.js +133 -69
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colorbutton/plugin.js +91 -23
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +192 -43
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/plugin.js +12 -10
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/contextmenu/plugin.js +124 -221
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/devtools/lang/en.js +16 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/devtools/plugin.js +173 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/dialogDefinition.js +840 -56
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/plugin.js +652 -301
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogadvtab/plugin.js +205 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogui/plugin.js +179 -50
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/dialogs/div.js +40 -40
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/plugin.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/docprops/dialogs/docprops.js +686 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/docprops/plugin.js +22 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/domiterator/plugin.js +59 -53
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/editingblock/plugin.js +62 -17
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/elementspath/plugin.js +137 -108
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/enterkey/plugin.js +117 -47
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/entities/plugin.js +95 -45
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/fakeobjects/plugin.js +22 -16
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/filebrowser/plugin.js +75 -30
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/dialogs/find.js +111 -69
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/plugin.js +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/dialogs/flash.js +28 -20
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/plugin.js +14 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/floatpanel/plugin.js +50 -21
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/font/plugin.js +3 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/format/plugin.js +17 -13
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/button.js +38 -55
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/checkbox.js +21 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/form.js +6 -6
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +26 -17
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/radio.js +6 -6
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/select.js +13 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textarea.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textfield.js +11 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/plugin.js +112 -41
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/horizontalrule/plugin.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmldataprocessor/plugin.js +200 -63
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmlwriter/plugin.js +26 -21
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/dialogs/iframe.js +257 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/images/placeholder.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/plugin.js +106 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframedialog/plugin.js +59 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/dialogs/image.js +243 -218
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/plugin.js +19 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/indent/plugin.js +335 -223
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/justify/plugin.js +115 -30
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/keystrokes/plugin.js +3 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/anchor.js +85 -40
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/link.js +163 -184
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/plugin.js +180 -32
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/list/plugin.js +165 -81
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/listblock/plugin.js +11 -6
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +204 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js +66 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/maximize/plugin.js +109 -40
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menu/plugin.js +166 -67
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menubutton/plugin.js +12 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/newpage/plugin.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/plugin.js +95 -29
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panel/plugin.js +43 -20
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panelbutton/plugin.js +10 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/filter/default.js +316 -119
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/plugin.js +32 -11
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +19 -29
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/plugin.js +15 -79
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/dialogs/placeholder.js +71 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/lang/en.js +16 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/lang/he.js +16 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/placeholder.gif +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/plugin.js +171 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/popup/plugin.js +9 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/preview/plugin.js +3 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/print/plugin.js +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/removeformat/plugin.js +89 -36
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/resize/plugin.js +71 -18
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/richcombo/plugin.js +40 -29
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/options.js +114 -110
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/plugin.js +531 -170
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/selection/plugin.js +791 -331
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/plugin.js +14 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showborders/plugin.js +63 -26
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/dialogs/smiley.js +31 -22
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/plugin.js +15 -6
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/sourcearea/plugin.js +18 -14
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +36 -59
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/lang/en.js +89 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/plugin.js +45 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/styles/plugin.js +632 -212
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/{stylescombo → styles}/styles/default.js +5 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/plugin.js +77 -140
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylesheetparser/plugin.js +143 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tab/plugin.js +109 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/dialogs/table.js +106 -23
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js +11 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tableresize/plugin.js +450 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +66 -64
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/plugin.js +348 -179
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/dialogs/templates.js +41 -36
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/plugin.js +3 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/default.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/toolbar/plugin.js +193 -122
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +6 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/en.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/he.js +15 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/plugin.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/undo/plugin.js +73 -12
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.css +1 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.js +20 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/plugin.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wysiwygarea/plugin.js +751 -251
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/xml/plugin.js +170 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/dialog.css +116 -18
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/editor.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/elementspath.css +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.css +42 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/mainui.css +25 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/menu.css +36 -15
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/panel.css +18 -17
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/presets.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/reset.css +7 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/richcombo.css +27 -10
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/skin.js +4 -36
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/templates.css +16 -12
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/toolbar.css +69 -83
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/dialog.css +111 -13
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/editor.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/elementspath.css +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.css +40 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/mainui.css +33 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/menu.css +37 -15
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/panel.css +23 -22
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/presets.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/reset.css +7 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/richcombo.css +40 -20
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/skin.js +10 -17
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/templates.css +16 -10
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/toolbar.css +79 -32
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/dialog.css +112 -13
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/editor.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/elementspath.css +2 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.css +40 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/mainui.css +25 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/menu.css +38 -16
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/panel.css +22 -21
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/presets.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/reset.css +7 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/richcombo.css +36 -23
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/skin.js +10 -17
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/templates.css +16 -10
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/toolbar.css +67 -27
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/themes/default/theme.js +106 -46
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.asp +955 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +141 -117
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.pack +13 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.php +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php4.php +27 -54
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php5.php +26 -53
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +4 -16
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +58 -57
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ka.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/adobeair/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/ajax/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/autogrow/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/bbcode/plugin.js +9 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/lang/en.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +3 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/dialogs/docprops.js +10 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +5 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +5 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/dialogs/iframe.js +7 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +9 -9
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +7 -7
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/liststyle/dialogs/liststyle.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +7 -6
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/dialogs/placeholder.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/en.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/he.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/placeholder.gif +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/radiantpreview/images/radiant-preview.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/lang/en.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/{stylescombo → styles}/styles/default.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylesheetparser/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +5 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tableresize/plugin.js +7 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/he.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/xml/plugin.js +6 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +5 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +9 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +3 -3
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +5 -5
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +10 -9
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons_rtl.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +5 -4
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +9 -8
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons_rtl.png +0 -0
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +2 -2
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +4 -4
- data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +21 -12
- metadata +94 -9
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ajax.js +0 -143
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/imagecacher.js +0 -58
- data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/xml.js +0 -165
data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
|
6
6
|
(function()
|
7
7
|
{
|
8
8
|
// Elements that may be considered the "Block boundary" in an element path.
|
9
|
-
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,
|
9
|
+
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 };
|
10
10
|
|
11
11
|
// Elements that may be considered the "Block limit" in an element path.
|
12
|
-
var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1 };
|
12
|
+
var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1,fieldset:1 };
|
13
13
|
|
14
14
|
// Check if an element contains any block element.
|
15
15
|
var checkHasBlock = function( element )
|
@@ -27,6 +27,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
27
27
|
return false;
|
28
28
|
};
|
29
29
|
|
30
|
+
/**
|
31
|
+
* @class
|
32
|
+
*/
|
30
33
|
CKEDITOR.dom.elementPath = function( lastNode )
|
31
34
|
{
|
32
35
|
var block = null;
|
@@ -100,5 +103,17 @@ CKEDITOR.dom.elementPath.prototype =
|
|
100
103
|
}
|
101
104
|
|
102
105
|
return true;
|
106
|
+
},
|
107
|
+
|
108
|
+
contains : function( tagNames )
|
109
|
+
{
|
110
|
+
var elements = this.elements;
|
111
|
+
for ( var i = 0 ; i < elements.length ; i++ )
|
112
|
+
{
|
113
|
+
if ( elements[ i ].getName() in tagNames )
|
114
|
+
return elements[ i ];
|
115
|
+
}
|
116
|
+
|
117
|
+
return null;
|
103
118
|
}
|
104
119
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
|
@@ -107,24 +107,25 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
|
|
107
107
|
{
|
108
108
|
var $clone = this.$.cloneNode( includeChildren );
|
109
109
|
|
110
|
-
|
110
|
+
var removeIds = function( node )
|
111
111
|
{
|
112
|
-
|
113
|
-
|
114
|
-
if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
|
115
|
-
return;
|
112
|
+
if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
|
113
|
+
return;
|
116
114
|
|
117
|
-
|
118
|
-
node.removeAttribute( '
|
115
|
+
if ( !cloneId )
|
116
|
+
node.removeAttribute( 'id', false );
|
117
|
+
node.removeAttribute( 'data-cke-expando', false );
|
119
118
|
|
119
|
+
if ( includeChildren )
|
120
|
+
{
|
120
121
|
var childs = node.childNodes;
|
121
|
-
for ( var i=0
|
122
|
+
for ( var i=0; i < childs.length; i++ )
|
122
123
|
removeIds( childs[ i ] );
|
123
|
-
}
|
124
|
+
}
|
125
|
+
};
|
124
126
|
|
125
|
-
|
126
|
-
|
127
|
-
}
|
127
|
+
// The "id" attribute should never be cloned to avoid duplication.
|
128
|
+
removeIds( $clone );
|
128
129
|
|
129
130
|
return new CKEDITOR.dom.node( $clone );
|
130
131
|
},
|
@@ -203,29 +204,12 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
|
|
203
204
|
while ( node && node != $documentElement )
|
204
205
|
{
|
205
206
|
var parentNode = node.parentNode;
|
206
|
-
var currentIndex = -1;
|
207
207
|
|
208
208
|
if ( parentNode )
|
209
209
|
{
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
if ( normalized &&
|
215
|
-
candidate.nodeType == 3 &&
|
216
|
-
candidate.previousSibling &&
|
217
|
-
candidate.previousSibling.nodeType == 3 )
|
218
|
-
{
|
219
|
-
continue;
|
220
|
-
}
|
221
|
-
|
222
|
-
currentIndex++;
|
223
|
-
|
224
|
-
if ( candidate == node )
|
225
|
-
break;
|
226
|
-
}
|
227
|
-
|
228
|
-
address.unshift( currentIndex );
|
210
|
+
// Get the node index. For performance, call getIndex
|
211
|
+
// directly, instead of creating a new node object.
|
212
|
+
address.unshift( this.getIndex.call( { $ : node }, normalized ) );
|
229
213
|
}
|
230
214
|
|
231
215
|
node = parentNode;
|
@@ -243,33 +227,31 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
|
|
243
227
|
*/
|
244
228
|
getDocument : function()
|
245
229
|
{
|
246
|
-
|
247
|
-
|
248
|
-
return (
|
249
|
-
this.getDocument = function()
|
250
|
-
{
|
251
|
-
return document;
|
252
|
-
})();
|
230
|
+
return new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument );
|
253
231
|
},
|
254
232
|
|
255
|
-
getIndex : function()
|
233
|
+
getIndex : function( normalized )
|
256
234
|
{
|
257
|
-
|
235
|
+
// Attention: getAddress depends on this.$
|
258
236
|
|
259
|
-
var
|
260
|
-
|
237
|
+
var current = this.$,
|
238
|
+
index = 0;
|
261
239
|
|
262
|
-
while (
|
240
|
+
while ( ( current = current.previousSibling ) )
|
263
241
|
{
|
264
|
-
|
265
|
-
|
266
|
-
if (
|
267
|
-
|
242
|
+
// When normalizing, do not count it if this is an
|
243
|
+
// empty text node or if it's a text node following another one.
|
244
|
+
if ( normalized && current.nodeType == 3 &&
|
245
|
+
( !current.nodeValue.length ||
|
246
|
+
( current.previousSibling && current.previousSibling.nodeType == 3 ) ) )
|
247
|
+
{
|
248
|
+
continue;
|
249
|
+
}
|
268
250
|
|
269
|
-
|
251
|
+
index++;
|
270
252
|
}
|
271
253
|
|
272
|
-
return
|
254
|
+
return index;
|
273
255
|
},
|
274
256
|
|
275
257
|
getNextSourceNode : function( startFromSibling, nodeType, guard )
|
@@ -505,11 +487,18 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
|
|
505
487
|
},
|
506
488
|
|
507
489
|
/**
|
508
|
-
* Gets the
|
509
|
-
* @param {String} name
|
510
|
-
* @param {Boolean} includeSelf
|
511
|
-
* node in the
|
512
|
-
* @returns {CKEDITOR.dom.node}
|
490
|
+
* Gets the closest ancestor node of this node, specified by its node name.
|
491
|
+
* @param {String} name The node name of the ancestor node to search.
|
492
|
+
* @param {Boolean} [includeSelf] Whether to include the current
|
493
|
+
* node in the search.
|
494
|
+
* @returns {CKEDITOR.dom.node} The located ancestor node or null if not found.
|
495
|
+
* @example
|
496
|
+
* // Suppose we have the following HTML:
|
497
|
+
* // <div id="outer"><div id="inner"><p><b>Some text</b></p></div></div>
|
498
|
+
* // If node == <b>
|
499
|
+
* ascendant = node.getAscendant( 'div' ); // ascendant == <div id="inner">
|
500
|
+
* ascendant = node.getAscendant( 'b' ); // ascendant == null
|
501
|
+
* ascendant = node.getAscendant( 'b', true ); // ascendant == <b>
|
513
502
|
*/
|
514
503
|
getAscendant : function( name, includeSelf )
|
515
504
|
{
|
@@ -657,6 +646,45 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
|
|
657
646
|
child.parentNode.removeChild( child ) ;
|
658
647
|
}
|
659
648
|
}
|
649
|
+
},
|
650
|
+
|
651
|
+
/**
|
652
|
+
* Checks is this node is read-only (should not be changed). It
|
653
|
+
* additionaly returns the element, if any, which defines the read-only
|
654
|
+
* state of this node. It may be the node itself or any of its parent
|
655
|
+
* nodes.
|
656
|
+
* @returns {CKEDITOR.dom.element|Boolean} An element containing
|
657
|
+
* read-only attributes or "false" if none is found.
|
658
|
+
* @since 3.5
|
659
|
+
* @example
|
660
|
+
* // For the following HTML:
|
661
|
+
* // <div contenteditable="false">Some <b>text</b></div>
|
662
|
+
*
|
663
|
+
* // If "ele" is the above <div>
|
664
|
+
* ele.isReadOnly(); // the <div> element
|
665
|
+
*
|
666
|
+
* // If "ele" is the above <b>
|
667
|
+
* ele.isReadOnly(); // the <div> element
|
668
|
+
*/
|
669
|
+
isReadOnly : function()
|
670
|
+
{
|
671
|
+
var current = this;
|
672
|
+
while( current )
|
673
|
+
{
|
674
|
+
if ( current.type == CKEDITOR.NODE_ELEMENT )
|
675
|
+
{
|
676
|
+
if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) )
|
677
|
+
break;
|
678
|
+
|
679
|
+
if ( current.getAttribute( 'contentEditable' ) == 'false' )
|
680
|
+
return current;
|
681
|
+
else if ( current.getAttribute( 'contentEditable' ) == 'true' )
|
682
|
+
break;
|
683
|
+
}
|
684
|
+
current = current.getParent();
|
685
|
+
}
|
686
|
+
|
687
|
+
return false;
|
660
688
|
}
|
661
689
|
}
|
662
690
|
);
|
@@ -1,8 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
|
6
|
+
/**
|
7
|
+
* @class
|
8
|
+
*/
|
6
9
|
CKEDITOR.dom.nodeList = function( nativeList )
|
7
10
|
{
|
8
11
|
this.$ = nativeList;
|
@@ -1,16 +1,90 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2003-
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
3
|
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
4
|
*/
|
5
5
|
|
6
|
+
/**
|
7
|
+
* Creates a CKEDITOR.dom.range instance that can be used inside a specific
|
8
|
+
* DOM Document.
|
9
|
+
* @class Represents a delimited piece of content in a DOM Document.
|
10
|
+
* It is contiguous in the sense that it can be characterized as selecting all
|
11
|
+
* of the content between a pair of boundary-points.<br>
|
12
|
+
* <br>
|
13
|
+
* This class shares much of the W3C
|
14
|
+
* <a href="http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html">Document Object Model Range</a>
|
15
|
+
* ideas and features, adding several range manipulation tools to it, but it's
|
16
|
+
* not intended to be compatible with it.
|
17
|
+
* @param {CKEDITOR.dom.document} document The document into which the range
|
18
|
+
* features will be available.
|
19
|
+
* @example
|
20
|
+
* // Create a range for the entire contents of the editor document body.
|
21
|
+
* var range = new CKEDITOR.dom.range( editor.document );
|
22
|
+
* range.selectNodeContents( editor.document.getBody() );
|
23
|
+
* // Delete the contents.
|
24
|
+
* range.deleteContents();
|
25
|
+
*/
|
6
26
|
CKEDITOR.dom.range = function( document )
|
7
27
|
{
|
28
|
+
/**
|
29
|
+
* Node within which the range begins.
|
30
|
+
* @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT}
|
31
|
+
* @example
|
32
|
+
* var range = new CKEDITOR.dom.range( editor.document );
|
33
|
+
* range.selectNodeContents( editor.document.getBody() );
|
34
|
+
* alert( range.startContainer.getName() ); // "body"
|
35
|
+
*/
|
8
36
|
this.startContainer = null;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Offset within the starting node of the range.
|
40
|
+
* @type {Number}
|
41
|
+
* @example
|
42
|
+
* var range = new CKEDITOR.dom.range( editor.document );
|
43
|
+
* range.selectNodeContents( editor.document.getBody() );
|
44
|
+
* alert( range.startOffset ); // "0"
|
45
|
+
*/
|
9
46
|
this.startOffset = null;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Node within which the range ends.
|
50
|
+
* @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT}
|
51
|
+
* @example
|
52
|
+
* var range = new CKEDITOR.dom.range( editor.document );
|
53
|
+
* range.selectNodeContents( editor.document.getBody() );
|
54
|
+
* alert( range.endContainer.getName() ); // "body"
|
55
|
+
*/
|
10
56
|
this.endContainer = null;
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Offset within the ending node of the range.
|
60
|
+
* @type {Number}
|
61
|
+
* @example
|
62
|
+
* var range = new CKEDITOR.dom.range( editor.document );
|
63
|
+
* range.selectNodeContents( editor.document.getBody() );
|
64
|
+
* alert( range.endOffset ); // == editor.document.getBody().getChildCount()
|
65
|
+
*/
|
11
66
|
this.endOffset = null;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Indicates that this is a collapsed range. A collapsed range has it's
|
70
|
+
* start and end boudaries at the very same point so nothing is contained
|
71
|
+
* in it.
|
72
|
+
* @example
|
73
|
+
* var range = new CKEDITOR.dom.range( editor.document );
|
74
|
+
* range.selectNodeContents( editor.document.getBody() );
|
75
|
+
* alert( range.collapsed ); // "false"
|
76
|
+
* range.collapse();
|
77
|
+
* alert( range.collapsed ); // "true"
|
78
|
+
*/
|
12
79
|
this.collapsed = true;
|
13
80
|
|
81
|
+
/**
|
82
|
+
* The document within which the range can be used.
|
83
|
+
* @type {CKEDITOR.dom.document}
|
84
|
+
* @example
|
85
|
+
* // Selects the body contents of the range document.
|
86
|
+
* range.selectNodeContents( range.document.getBody() );
|
87
|
+
*/
|
14
88
|
this.document = document;
|
15
89
|
};
|
16
90
|
|
@@ -29,7 +103,7 @@ CKEDITOR.dom.range = function( document )
|
|
29
103
|
// This is a shared function used to delete, extract and clone the range
|
30
104
|
// contents.
|
31
105
|
// V2
|
32
|
-
var execContentsAction = function( range, action, docFrag )
|
106
|
+
var execContentsAction = function( range, action, docFrag, mergeThen )
|
33
107
|
{
|
34
108
|
range.optimizeBookmark();
|
35
109
|
|
@@ -244,7 +318,17 @@ CKEDITOR.dom.range = function( document )
|
|
244
318
|
if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode )
|
245
319
|
endIndex--;
|
246
320
|
|
247
|
-
|
321
|
+
// Merge splitted parents.
|
322
|
+
if ( mergeThen && topStart.type == CKEDITOR.NODE_ELEMENT )
|
323
|
+
{
|
324
|
+
var span = CKEDITOR.dom.element.createFromHtml( '<span ' +
|
325
|
+
'data-cke-bookmark="1" style="display:none"> </span>', range.document );
|
326
|
+
span.insertAfter( topStart );
|
327
|
+
topStart.mergeSiblings( false );
|
328
|
+
range.moveToBookmark( { startNode : span } );
|
329
|
+
}
|
330
|
+
else
|
331
|
+
range.setStart( topEnd.getParent(), endIndex );
|
248
332
|
}
|
249
333
|
|
250
334
|
// Collapse it to the start.
|
@@ -275,9 +359,9 @@ CKEDITOR.dom.range = function( document )
|
|
275
359
|
if ( node.type == CKEDITOR.NODE_TEXT )
|
276
360
|
{
|
277
361
|
// If there's any visible text, then we're not at the start.
|
278
|
-
if ( CKEDITOR.tools.trim( node.getText() ).length )
|
362
|
+
if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length )
|
279
363
|
return false;
|
280
|
-
|
364
|
+
}
|
281
365
|
else if ( node.type == CKEDITOR.NODE_ELEMENT )
|
282
366
|
{
|
283
367
|
// If there are non-empty inline elements (e.g. <img />), then we're not
|
@@ -305,7 +389,7 @@ CKEDITOR.dom.range = function( document )
|
|
305
389
|
return node.type != CKEDITOR.NODE_TEXT
|
306
390
|
&& node.getName() in CKEDITOR.dtd.$removeEmpty
|
307
391
|
|| !CKEDITOR.tools.trim( node.getText() )
|
308
|
-
|| node.getParent().
|
392
|
+
|| !!node.getParent().data( 'cke-bookmark' );
|
309
393
|
}
|
310
394
|
|
311
395
|
var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(),
|
@@ -348,7 +432,10 @@ CKEDITOR.dom.range = function( document )
|
|
348
432
|
this.collapsed = true;
|
349
433
|
},
|
350
434
|
|
351
|
-
|
435
|
+
/**
|
436
|
+
* The content nodes of the range are cloned and added to a document fragment, which is returned.
|
437
|
+
* <strong> Note: </strong> Text selection may lost after invoking this method. (caused by text node splitting).
|
438
|
+
*/
|
352
439
|
cloneContents : function()
|
353
440
|
{
|
354
441
|
var docFrag = new CKEDITOR.dom.documentFragment( this.document );
|
@@ -359,20 +446,29 @@ CKEDITOR.dom.range = function( document )
|
|
359
446
|
return docFrag;
|
360
447
|
},
|
361
448
|
|
362
|
-
|
449
|
+
/**
|
450
|
+
* Deletes the content nodes of the range permanently from the DOM tree.
|
451
|
+
* @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection.
|
452
|
+
*/
|
453
|
+
deleteContents : function( mergeThen )
|
363
454
|
{
|
364
455
|
if ( this.collapsed )
|
365
456
|
return;
|
366
457
|
|
367
|
-
execContentsAction( this, 0 );
|
458
|
+
execContentsAction( this, 0, null, mergeThen );
|
368
459
|
},
|
369
460
|
|
370
|
-
|
461
|
+
/**
|
462
|
+
* The content nodes of the range are cloned and added to a document fragment,
|
463
|
+
* meanwhile they're removed permanently from the DOM tree.
|
464
|
+
* @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection.
|
465
|
+
*/
|
466
|
+
extractContents : function( mergeThen )
|
371
467
|
{
|
372
468
|
var docFrag = new CKEDITOR.dom.documentFragment( this.document );
|
373
469
|
|
374
470
|
if ( !this.collapsed )
|
375
|
-
execContentsAction( this, 1, docFrag );
|
471
|
+
execContentsAction( this, 1, docFrag, mergeThen );
|
376
472
|
|
377
473
|
return docFrag;
|
378
474
|
},
|
@@ -397,9 +493,10 @@ CKEDITOR.dom.range = function( document )
|
|
397
493
|
var startNode, endNode;
|
398
494
|
var baseId;
|
399
495
|
var clone;
|
496
|
+
var collapsed = this.collapsed;
|
400
497
|
|
401
498
|
startNode = this.document.createElement( 'span' );
|
402
|
-
startNode.
|
499
|
+
startNode.data( 'cke-bookmark', 1 );
|
403
500
|
startNode.setStyle( 'display', 'none' );
|
404
501
|
|
405
502
|
// For IE, it must have something inside, otherwise it may be
|
@@ -413,7 +510,7 @@ CKEDITOR.dom.range = function( document )
|
|
413
510
|
}
|
414
511
|
|
415
512
|
// If collapsed, the endNode will not be created.
|
416
|
-
if ( !
|
513
|
+
if ( !collapsed )
|
417
514
|
{
|
418
515
|
endNode = startNode.clone();
|
419
516
|
endNode.setHtml( ' ' );
|
@@ -442,7 +539,8 @@ CKEDITOR.dom.range = function( document )
|
|
442
539
|
return {
|
443
540
|
startNode : serializable ? baseId + 'S' : startNode,
|
444
541
|
endNode : serializable ? baseId + 'E' : endNode,
|
445
|
-
serializable : serializable
|
542
|
+
serializable : serializable,
|
543
|
+
collapsed : collapsed
|
446
544
|
};
|
447
545
|
},
|
448
546
|
|
@@ -465,6 +563,8 @@ CKEDITOR.dom.range = function( document )
|
|
465
563
|
var startOffset = this.startOffset,
|
466
564
|
endOffset = this.endOffset;
|
467
565
|
|
566
|
+
var collapsed = this.collapsed;
|
567
|
+
|
468
568
|
var child, previous;
|
469
569
|
|
470
570
|
// If there is no range then get out of here.
|
@@ -489,6 +589,10 @@ CKEDITOR.dom.range = function( document )
|
|
489
589
|
startContainer = child;
|
490
590
|
startOffset = 0;
|
491
591
|
}
|
592
|
+
|
593
|
+
// Get the normalized offset.
|
594
|
+
if ( child && child.type == CKEDITOR.NODE_ELEMENT )
|
595
|
+
startOffset = child.getIndex( 1 );
|
492
596
|
}
|
493
597
|
|
494
598
|
// Normalize the start.
|
@@ -501,7 +605,7 @@ CKEDITOR.dom.range = function( document )
|
|
501
605
|
}
|
502
606
|
|
503
607
|
// Process the end only if not normalized.
|
504
|
-
if ( !
|
608
|
+
if ( !collapsed )
|
505
609
|
{
|
506
610
|
// Find out if the start is pointing to a text node that
|
507
611
|
// will be normalized.
|
@@ -517,6 +621,10 @@ CKEDITOR.dom.range = function( document )
|
|
517
621
|
endContainer = child;
|
518
622
|
endOffset = 0;
|
519
623
|
}
|
624
|
+
|
625
|
+
// Get the normalized offset.
|
626
|
+
if ( child && child.type == CKEDITOR.NODE_ELEMENT )
|
627
|
+
endOffset = child.getIndex( 1 );
|
520
628
|
}
|
521
629
|
|
522
630
|
// Normalize the end.
|
@@ -532,10 +640,11 @@ CKEDITOR.dom.range = function( document )
|
|
532
640
|
|
533
641
|
return {
|
534
642
|
start : startContainer.getAddress( normalized ),
|
535
|
-
end :
|
643
|
+
end : collapsed ? null : endContainer.getAddress( normalized ),
|
536
644
|
startOffset : startOffset,
|
537
645
|
endOffset : endOffset,
|
538
646
|
normalized : normalized,
|
647
|
+
collapsed : collapsed,
|
539
648
|
is2 : true // It's a createBookmark2 bookmark.
|
540
649
|
};
|
541
650
|
},
|
@@ -697,7 +806,7 @@ CKEDITOR.dom.range = function( document )
|
|
697
806
|
},
|
698
807
|
|
699
808
|
/**
|
700
|
-
* Move the range out of bookmark nodes if they'
|
809
|
+
* Move the range out of bookmark nodes if they'd been the container.
|
701
810
|
*/
|
702
811
|
optimizeBookmark: function()
|
703
812
|
{
|
@@ -705,10 +814,10 @@ CKEDITOR.dom.range = function( document )
|
|
705
814
|
endNode = this.endContainer;
|
706
815
|
|
707
816
|
if ( startNode.is && startNode.is( 'span' )
|
708
|
-
&& startNode.
|
817
|
+
&& startNode.data( 'cke-bookmark' ) )
|
709
818
|
this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START );
|
710
819
|
if ( endNode && endNode.is && endNode.is( 'span' )
|
711
|
-
&& endNode.
|
820
|
+
&& endNode.data( 'cke-bookmark' ) )
|
712
821
|
this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END );
|
713
822
|
},
|
714
823
|
|
@@ -793,7 +902,12 @@ CKEDITOR.dom.range = function( document )
|
|
793
902
|
}
|
794
903
|
},
|
795
904
|
|
796
|
-
|
905
|
+
/**
|
906
|
+
* Expands the range so that partial units are completely contained.
|
907
|
+
* @param unit {Number} The unit type to expand with.
|
908
|
+
* @param {Boolean} [excludeBrs=false] Whether include line-breaks when expanding.
|
909
|
+
*/
|
910
|
+
enlarge : function( unit, excludeBrs )
|
797
911
|
{
|
798
912
|
switch ( unit )
|
799
913
|
{
|
@@ -914,7 +1028,8 @@ CKEDITOR.dom.range = function( document )
|
|
914
1028
|
// If this is a visible element.
|
915
1029
|
// We need to check for the bookmark attribute because IE insists on
|
916
1030
|
// rendering the display:none nodes we use for bookmarks. (#3363)
|
917
|
-
|
1031
|
+
// Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
|
1032
|
+
if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) )
|
918
1033
|
{
|
919
1034
|
// We'll accept it only if we need
|
920
1035
|
// whitespace, and this is an inline
|
@@ -925,7 +1040,7 @@ CKEDITOR.dom.range = function( document )
|
|
925
1040
|
|
926
1041
|
siblingText = sibling.getText();
|
927
1042
|
|
928
|
-
if (
|
1043
|
+
if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF)
|
929
1044
|
sibling = null;
|
930
1045
|
else
|
931
1046
|
{
|
@@ -1073,7 +1188,8 @@ CKEDITOR.dom.range = function( document )
|
|
1073
1188
|
// If this is a visible element.
|
1074
1189
|
// We need to check for the bookmark attribute because IE insists on
|
1075
1190
|
// rendering the display:none nodes we use for bookmarks. (#3363)
|
1076
|
-
|
1191
|
+
// Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
|
1192
|
+
if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) )
|
1077
1193
|
{
|
1078
1194
|
// We'll accept it only if we need
|
1079
1195
|
// whitespace, and this is an inline
|
@@ -1084,7 +1200,7 @@ CKEDITOR.dom.range = function( document )
|
|
1084
1200
|
|
1085
1201
|
siblingText = sibling.getText();
|
1086
1202
|
|
1087
|
-
if (
|
1203
|
+
if ( (/[^\s\ufeff]/).test( siblingText ) )
|
1088
1204
|
sibling = null;
|
1089
1205
|
else
|
1090
1206
|
{
|
@@ -1166,13 +1282,13 @@ CKEDITOR.dom.range = function( document )
|
|
1166
1282
|
|
1167
1283
|
var walker = new CKEDITOR.dom.walker( walkerRange ),
|
1168
1284
|
blockBoundary, // The node on which the enlarging should stop.
|
1169
|
-
tailBr, //
|
1170
|
-
|
1285
|
+
tailBr, // In case BR as block boundary.
|
1286
|
+
notBlockBoundary = CKEDITOR.dom.walker.blockBoundary(
|
1171
1287
|
( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ),
|
1172
1288
|
// Record the encountered 'blockBoundary' for later use.
|
1173
1289
|
boundaryGuard = function( node )
|
1174
1290
|
{
|
1175
|
-
var retval =
|
1291
|
+
var retval = notBlockBoundary( node );
|
1176
1292
|
if ( !retval )
|
1177
1293
|
blockBoundary = node;
|
1178
1294
|
return retval;
|
@@ -1193,8 +1309,9 @@ CKEDITOR.dom.range = function( document )
|
|
1193
1309
|
// It's the body which stop the enlarging if no block boundary found.
|
1194
1310
|
blockBoundary = blockBoundary || body;
|
1195
1311
|
|
1196
|
-
// Start the range
|
1197
|
-
// the
|
1312
|
+
// Start the range either after the end of found block (<p>...</p>[text)
|
1313
|
+
// or at the start of block (<p>[text...), by comparing the document position
|
1314
|
+
// with 'enlargeable' node.
|
1198
1315
|
this.setStartAt(
|
1199
1316
|
blockBoundary,
|
1200
1317
|
!blockBoundary.is( 'br' ) &&
|
@@ -1220,8 +1337,8 @@ CKEDITOR.dom.range = function( document )
|
|
1220
1337
|
// It's the body which stop the enlarging if no block boundary found.
|
1221
1338
|
blockBoundary = blockBoundary || body;
|
1222
1339
|
|
1223
|
-
//
|
1224
|
-
// the document position
|
1340
|
+
// Close the range either before the found block start (text]<p>...</p>) or at the block end (...text]</p>)
|
1341
|
+
// by comparing the document position with 'enlargeable' node.
|
1225
1342
|
this.setEndAt(
|
1226
1343
|
blockBoundary,
|
1227
1344
|
( !enlargeable && this.checkEndOfBlock()
|
@@ -1235,6 +1352,111 @@ CKEDITOR.dom.range = function( document )
|
|
1235
1352
|
}
|
1236
1353
|
},
|
1237
1354
|
|
1355
|
+
/**
|
1356
|
+
* Descrease the range to make sure that boundaries
|
1357
|
+
* always anchor beside text nodes or innermost element.
|
1358
|
+
* @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode.
|
1359
|
+
* <dl>
|
1360
|
+
* <dt>CKEDITOR.SHRINK_ELEMENT</dt>
|
1361
|
+
* <dd>Shrink the range boundaries to the edge of the innermost element.</dd>
|
1362
|
+
* <dt>CKEDITOR.SHRINK_TEXT</dt>
|
1363
|
+
* <dd>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.</dd>
|
1364
|
+
* </dl>
|
1365
|
+
* @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node.
|
1366
|
+
*/
|
1367
|
+
shrink : function( mode, selectContents )
|
1368
|
+
{
|
1369
|
+
// Unable to shrink a collapsed range.
|
1370
|
+
if ( !this.collapsed )
|
1371
|
+
{
|
1372
|
+
mode = mode || CKEDITOR.SHRINK_TEXT;
|
1373
|
+
|
1374
|
+
var walkerRange = this.clone();
|
1375
|
+
|
1376
|
+
var startContainer = this.startContainer,
|
1377
|
+
endContainer = this.endContainer,
|
1378
|
+
startOffset = this.startOffset,
|
1379
|
+
endOffset = this.endOffset,
|
1380
|
+
collapsed = this.collapsed;
|
1381
|
+
|
1382
|
+
// Whether the start/end boundary is moveable.
|
1383
|
+
var moveStart = 1,
|
1384
|
+
moveEnd = 1;
|
1385
|
+
|
1386
|
+
if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
|
1387
|
+
{
|
1388
|
+
if ( !startOffset )
|
1389
|
+
walkerRange.setStartBefore( startContainer );
|
1390
|
+
else if ( startOffset >= startContainer.getLength( ) )
|
1391
|
+
walkerRange.setStartAfter( startContainer );
|
1392
|
+
else
|
1393
|
+
{
|
1394
|
+
// Enlarge the range properly to avoid walker making
|
1395
|
+
// DOM changes caused by triming the text nodes later.
|
1396
|
+
walkerRange.setStartBefore( startContainer );
|
1397
|
+
moveStart = 0;
|
1398
|
+
}
|
1399
|
+
}
|
1400
|
+
|
1401
|
+
if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
|
1402
|
+
{
|
1403
|
+
if ( !endOffset )
|
1404
|
+
walkerRange.setEndBefore( endContainer );
|
1405
|
+
else if ( endOffset >= endContainer.getLength( ) )
|
1406
|
+
walkerRange.setEndAfter( endContainer );
|
1407
|
+
else
|
1408
|
+
{
|
1409
|
+
walkerRange.setEndAfter( endContainer );
|
1410
|
+
moveEnd = 0;
|
1411
|
+
}
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
var walker = new CKEDITOR.dom.walker( walkerRange ),
|
1415
|
+
isBookmark = CKEDITOR.dom.walker.bookmark();
|
1416
|
+
|
1417
|
+
walker.evaluator = function( node )
|
1418
|
+
{
|
1419
|
+
return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ?
|
1420
|
+
CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT );
|
1421
|
+
};
|
1422
|
+
|
1423
|
+
var currentElement;
|
1424
|
+
walker.guard = function( node, movingOut )
|
1425
|
+
{
|
1426
|
+
if ( isBookmark( node ) )
|
1427
|
+
return true;
|
1428
|
+
|
1429
|
+
// Stop when we're shrink in element mode while encountering a text node.
|
1430
|
+
if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT )
|
1431
|
+
return false;
|
1432
|
+
|
1433
|
+
// Stop when we've already walked "through" an element.
|
1434
|
+
if ( movingOut && node.equals( currentElement ) )
|
1435
|
+
return false;
|
1436
|
+
|
1437
|
+
if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT )
|
1438
|
+
currentElement = node;
|
1439
|
+
|
1440
|
+
return true;
|
1441
|
+
};
|
1442
|
+
|
1443
|
+
if ( moveStart )
|
1444
|
+
{
|
1445
|
+
var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next']();
|
1446
|
+
textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START );
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
if ( moveEnd )
|
1450
|
+
{
|
1451
|
+
walker.reset();
|
1452
|
+
var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous']();
|
1453
|
+
textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END );
|
1454
|
+
}
|
1455
|
+
|
1456
|
+
return !!( moveStart || moveEnd );
|
1457
|
+
}
|
1458
|
+
},
|
1459
|
+
|
1238
1460
|
/**
|
1239
1461
|
* Inserts a node at the start of the range. The range will be expanded
|
1240
1462
|
* the contain the node.
|
@@ -1288,6 +1510,11 @@ CKEDITOR.dom.range = function( document )
|
|
1288
1510
|
// we will not need this check for our use of this class so we can
|
1289
1511
|
// ignore it for now.
|
1290
1512
|
|
1513
|
+
// Fixing invalid range start inside dtd empty elements.
|
1514
|
+
if( startNode.type == CKEDITOR.NODE_ELEMENT
|
1515
|
+
&& CKEDITOR.dtd.$empty[ startNode.getName() ] )
|
1516
|
+
startOffset = startNode.getIndex(), startNode = startNode.getParent();
|
1517
|
+
|
1291
1518
|
this.startContainer = startNode;
|
1292
1519
|
this.startOffset = startOffset;
|
1293
1520
|
|
@@ -1314,6 +1541,11 @@ CKEDITOR.dom.range = function( document )
|
|
1314
1541
|
// will not need this check for our use of this class so we can ignore
|
1315
1542
|
// it for now.
|
1316
1543
|
|
1544
|
+
// Fixing invalid range end inside dtd empty elements.
|
1545
|
+
if( endNode.type == CKEDITOR.NODE_ELEMENT
|
1546
|
+
&& CKEDITOR.dtd.$empty[ endNode.getName() ] )
|
1547
|
+
endOffset = endNode.getIndex() + 1, endNode = endNode.getParent();
|
1548
|
+
|
1317
1549
|
this.endContainer = endNode;
|
1318
1550
|
this.endOffset = endOffset;
|
1319
1551
|
|
@@ -1520,26 +1752,36 @@ CKEDITOR.dom.range = function( document )
|
|
1520
1752
|
},
|
1521
1753
|
|
1522
1754
|
/**
|
1523
|
-
* Check whether
|
1524
|
-
*
|
1755
|
+
* Check whether a range boundary is at the inner boundary of a given
|
1756
|
+
* element.
|
1525
1757
|
* @param {CKEDITOR.dom.element} element The target element to check.
|
1758
|
+
* @param {Number} checkType The boundary to check for both the range
|
1759
|
+
* and the element. It can be CKEDITOR.START or CKEDITOR.END.
|
1760
|
+
* @returns {Boolean} "true" if the range boundary is at the inner
|
1761
|
+
* boundary of the element.
|
1526
1762
|
*/
|
1527
1763
|
checkBoundaryOfElement : function( element, checkType )
|
1528
1764
|
{
|
1765
|
+
var checkStart = ( checkType == CKEDITOR.START );
|
1766
|
+
|
1767
|
+
// Create a copy of this range, so we can manipulate it for our checks.
|
1529
1768
|
var walkerRange = this.clone();
|
1769
|
+
|
1770
|
+
// Collapse the range at the proper size.
|
1771
|
+
walkerRange.collapse( checkStart );
|
1772
|
+
|
1530
1773
|
// Expand the range to element boundary.
|
1531
|
-
walkerRange[
|
1532
|
-
|
1533
|
-
( element, checkType == CKEDITOR.START ?
|
1534
|
-
CKEDITOR.POSITION_AFTER_START
|
1535
|
-
: CKEDITOR.POSITION_BEFORE_END );
|
1774
|
+
walkerRange[ checkStart ? 'setStartAt' : 'setEndAt' ]
|
1775
|
+
( element, checkStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END );
|
1536
1776
|
|
1537
|
-
|
1538
|
-
|
1777
|
+
// Create the walker, which will check if we have anything useful
|
1778
|
+
// in the range.
|
1779
|
+
var walker = new CKEDITOR.dom.walker( walkerRange );
|
1539
1780
|
walker.evaluator = elementBoundaryEval;
|
1540
|
-
|
1541
|
-
|
1781
|
+
|
1782
|
+
return walker[ checkStart ? 'checkBackward' : 'checkForward' ]();
|
1542
1783
|
},
|
1784
|
+
|
1543
1785
|
// Calls to this function may produce changes to the DOM. The range may
|
1544
1786
|
// be updated to reflect such changes.
|
1545
1787
|
checkStartOfBlock : function()
|
@@ -1610,6 +1852,47 @@ CKEDITOR.dom.range = function( document )
|
|
1610
1852
|
return walker.checkForward();
|
1611
1853
|
},
|
1612
1854
|
|
1855
|
+
/**
|
1856
|
+
* Check if elements at which the range boundaries anchor are read-only,
|
1857
|
+
* with respect to "contenteditable" attribute.
|
1858
|
+
*/
|
1859
|
+
checkReadOnly : ( function()
|
1860
|
+
{
|
1861
|
+
function checkNodesEditable( node, anotherEnd )
|
1862
|
+
{
|
1863
|
+
while( node )
|
1864
|
+
{
|
1865
|
+
if ( node.type == CKEDITOR.NODE_ELEMENT )
|
1866
|
+
{
|
1867
|
+
if ( node.getAttribute( 'contentEditable' ) == 'false'
|
1868
|
+
&& !node.data( 'cke-editable' ) )
|
1869
|
+
{
|
1870
|
+
return 0;
|
1871
|
+
}
|
1872
|
+
// Range enclosed entirely in an editable element.
|
1873
|
+
else if ( node.is( 'html' )
|
1874
|
+
|| node.getAttribute( 'contentEditable' ) == 'true'
|
1875
|
+
&& ( node.contains( anotherEnd ) || node.equals( anotherEnd ) ) )
|
1876
|
+
{
|
1877
|
+
break;
|
1878
|
+
}
|
1879
|
+
}
|
1880
|
+
node = node.getParent();
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
return 1;
|
1884
|
+
}
|
1885
|
+
|
1886
|
+
return function()
|
1887
|
+
{
|
1888
|
+
var startNode = this.startContainer,
|
1889
|
+
endNode = this.endContainer;
|
1890
|
+
|
1891
|
+
// Check if elements path at both boundaries are editable.
|
1892
|
+
return !( checkNodesEditable( startNode, endNode ) && checkNodesEditable( endNode, startNode ) );
|
1893
|
+
};
|
1894
|
+
})(),
|
1895
|
+
|
1613
1896
|
/**
|
1614
1897
|
* Moves the range boundaries to the first/end editing point inside an
|
1615
1898
|
* element. For example, in an element tree like
|
@@ -1623,6 +1906,10 @@ CKEDITOR.dom.range = function( document )
|
|
1623
1906
|
{
|
1624
1907
|
var isEditable;
|
1625
1908
|
|
1909
|
+
// Empty elements are rejected.
|
1910
|
+
if ( CKEDITOR.dtd.$empty[ el.getName() ] )
|
1911
|
+
return false;
|
1912
|
+
|
1626
1913
|
while ( el && el.type == CKEDITOR.NODE_ELEMENT )
|
1627
1914
|
{
|
1628
1915
|
isEditable = el.isEditable();
|
@@ -1681,8 +1968,15 @@ CKEDITOR.dom.range = function( document )
|
|
1681
1968
|
*/
|
1682
1969
|
getEnclosedNode : function()
|
1683
1970
|
{
|
1684
|
-
var walkerRange = this.clone()
|
1685
|
-
|
1971
|
+
var walkerRange = this.clone();
|
1972
|
+
|
1973
|
+
// Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780)
|
1974
|
+
walkerRange.optimize();
|
1975
|
+
if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT
|
1976
|
+
|| walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT )
|
1977
|
+
return null;
|
1978
|
+
|
1979
|
+
var walker = new CKEDITOR.dom.walker( walkerRange ),
|
1686
1980
|
isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ),
|
1687
1981
|
isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
|
1688
1982
|
evaluator = function( node )
|
@@ -1726,10 +2020,13 @@ CKEDITOR.ENLARGE_ELEMENT = 1;
|
|
1726
2020
|
CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2;
|
1727
2021
|
CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3;
|
1728
2022
|
|
1729
|
-
|
1730
|
-
|
1731
|
-
* @see CKEDITOR.dom.range::checkBoundaryOfElement
|
1732
|
-
*/
|
2023
|
+
// Check boundary types.
|
2024
|
+
// @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement
|
1733
2025
|
CKEDITOR.START = 1;
|
1734
2026
|
CKEDITOR.END = 2;
|
1735
2027
|
CKEDITOR.STARTEND = 3;
|
2028
|
+
|
2029
|
+
// Shrink range types.
|
2030
|
+
// @see CKEDITOR.dom.range.prototype.shrink
|
2031
|
+
CKEDITOR.SHRINK_ELEMENT = 1;
|
2032
|
+
CKEDITOR.SHRINK_TEXT = 2;
|