From: Jason Woofenden
Date: Sat, 29 Jun 2013 22:38:43 +0000 (-0400)
Subject: vanilla ckeditor-4.0_full
X-Git-Tag: v4.0_full
X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=commitdiff_plain;h=4625dba05116026713fee9008dd93306be0d1553
vanilla ckeditor-4.0_full
---
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:
-
- Security update: Added protection against XSS attack and possible path disclosure in PHP sample.
-
-
- CKEditor 3.6.6
-
- Fixed issues:
-
- #9866 : [IE10] The full toolbar is displayed in two lines in RTL environment.
- #9483 : [IE10] Fixed script error on float panel opening.
- #6410 : SCAYT will show no suggestions when appropriate, instead of not appearing.
- #7533 , #9439 : Fixed SCAYT issues with setData().
- #9167 : Improper HTML transformations happening on specific cases.
- #9553 : Properly handle dash values in the style field of dialogs.
- #9787 : [IE9] onChange wasn't fired for checkboxes in dialogs.
- #8888 : It was not possible to scroll dialogs on very small viewports.
- #9594 : The TAB key was having no effect on focused read-only editor.
-
-
- CKEditor 3.6.5
-
- New features:
-
- #9195 : It is now possible to remove contextmenu.
-
-
- Fixed issues:
-
- #9132 : [IE8] Fixed js error when closing paste dialog.
- #9101 : Tab key in smiley and special char dialog now moves focus to dialog buttons.
- #9209 : Fixed IE7 crash when switching list item type.
- #8995 : Fixed incorrect HTML escaping in bbcode plugin.
- #6168 : Fixed style definition with styles defined as inline style attribute.
- #9097 : [IE] Fixed small selection flaw when select starts from the blank region outside body.
- #9129 : Fixed various Del/Backspace keystroke behaviors inside of HTML list.
- #9117 : [FF] Fixed js error when calling setData() on a hidden editor.
- #9289 : Disallowed creating javascript links through the link dialog.
- #9312 : Fixed table with multiple <tbody> output generated in wrong order.
- #8795 : Fixed table resize plugin not working when document overflows horizontally.
- #8888 : Fixed dialog dimension overflowing small view port.
- #9311 : Fixed vertical scroll being impossible when autogrow plugin is used during maximized editor.
- #1961 : The "id" attribute will be appended to anchors alongside the "name" attribute.
- #9219 : The <source> element is now protected while parsing the contents.
- #9281 : [Safari] Fixed inline style breaking dialog advanced tab.
- #9281 : [IE8] Fixed not being able to remove border from the image dialog.
-
-
- CKEditor 3.6.4
-
- Fixed issues:
-
- #8887 : Ugly hover effect for buttons in dialog windows due to slightly wrong background position.
- #8783 : getAttribute( 'contenteditable' )
returns 'inherited' on IE7 and IE6 for elements created from code.
- #8463 : WebKit: Cut/Copy buttons didn't go on "enabled" state after selecting text in the editor.
- #9043 : Command newpage didn't return its name when afterCommandExec
event was fired.
- #9015 : Applied ARIA label on dialog file input element.
- #9016 : Applied the "presentation" role on the iframe element in dialog file field markup.
- #8949 : Image Properties does not show in context menu when the image is wrapped in a div with the width set.
- #9008 : Fixed list items order reversed when merging two lists.
- #9042 : [Safari] Fixed pasting left garbage html at the end of document.
- #7745 : The list of frames on JAWS will not any more show the "ALT+0 for help" text for the editor entry.
- #8979 : Overriding matches will not any more interfere on the Font size combo.
- #5447 : Anchor names created by the Link dialog are now trimmed to protect against unwanted spaces.
- #8997 : Styles are lost on sub-lists when converting list type.
- #8971 : [IE7] Dialog size are stretched when long text field value is received.
- #8945 : Fake elements now show alternative text on High Contrast mode.
- #8985 : Better handling of Enter key events on dialogs.
- #8925 : [Firefox] Unexpected page scroll on large floating block when editor is re-focused.
- #8978 : [IE] Saved editor text selection is lost after close menu.
- #9022 : [IE7] Fixed wrong selection introduced in empty editor document when click to the bottom-right of the document.
- #9034 : [IE7] Fixed JavaScript error caused by drag-to-select at the bottom of the document.
- #9057 : Unexpected block established when decreasing indent of a styled list item.
- #9063 : Styles on sub-list are lost when decreasing indent of the parent list.
- #9047 : [Firefox] Anchors in the preview window will now work properly.
- #8941 : [Webkit] Content region disappeared when resizing the browser.
- #8968 : [Firefox] The forcePasteAsPlainText
configuration is not working when using Ctrl/Cmd-V .
- #6217 : Handled Del/Backspace key at the boundary of table to unify the cursor position.
- #8950 : Changed the cursor position after calling editor::insertElement
on block element.
- #9080 : Fixed Backspace key in front of the list item to join with previous line.
- #3592 : Removed the "title" field from flash dialog advanced tab.
- #9084 : [IE] Dragging absolute positioned elements is now enabled by default.
- #8879 : Corrected styling of labels used in dialog windows.
- #8921 : [Chrome] Paste on a newly created CKEditor instance does not work on Chrome.
- #9036 : Find feature cannot locate certain words while Match Whole Word is enabled.
- #9069 : [Chrome] Issue with popups not opening properly on Chrome 20 makes it impossible to view the file browser window.
- #5811 : Code for Image dialog is missing dialog dependency.
- #5810 : Code for Div Container is missing dialog dependency.
- #5809 : Dialog a11yhelp is missing dialog dependency.
- #4045 : "Field Name" Column in sample_posteddata.php
is to narrow.
- Updated the following language files as submitted to the CKEditor UI Translation Center : Bulgarian, Chinese, Czech, Danish, Esperanto, Estonian, Greek, Italian, Norwegian, Portuguese, Romanian, Vietnamese.
-
-
- CKEditor 3.6.3
-
- New features:
-
- #7430 : Justify commands now perform alignment on the element when an image is selected.
- #8706 : Better ARIA accessibility for the color picker dialog window.
- #7366 : Editor paste function is now available on browser toolbar and context menu.
-
-
- Fixed issues:
-
- #8634 : [IE] Command execution always returns true
in IE browsers.
- #8333 : Dialog windows can now be closed with the Esc key even if there is no Cancel button available.
- #8644 : Missing variable declaration in the dialog plugin.
- #8699 : Focus is now moved to the clicked button and back to color picker dialog window opener (button) in all browsers after the dialog window is closed.
- #8132 : [IE9] Link line gets broken when it contains a br
tag.
- #8629 : Optimize float panel layout when there is not enough space in the viewport.
- #7955 : [FF] Page Up and Page Down in the WYSIWYG mode cause the selection to become lost.
- #8698 : Esc key does not close the color picker dialog window.
- #8413 : HTML comment nodes break content styling in tables.
- #7932 , #8643 : [IE] Clicking below the content region scrolls the page to the top.
- #5538 , #8729 : [IE] Focus jump results in incorrect context menu display.
- #6359 : [IE] Selectable area in blank WYSIWYG editor is too small.
- #7326 , #8074 : [FF] Scrolling does not work correctly in editor with large amount of text.
- #8630 : HTML events are now disabled when loading data.
- #8433 : [IE9] Use W3C event model.
- #8691 : [IE] Pasting invalid HTML crashes the browser.
- #8345 : [IE] Selection is not properly restored after closing the Link dialog window.
- #6308 : Vertical-only resize imposes fixed width on editor chrome.
- #7360 : [WebKit] WYSIWYG area sometimes does not resize with the chrome.
- #5527 : Do not encode the #
character sent from the file browser.
- #8014 : Autogrow now stretches to fit the content when switching editor modes.
- #8249 : Inconsistent behavior with the Backspace key used at the start of a list item.
- #8617 : [WebKit] Selection becomes broken after an inline style is opened.
- #8527 : Insertion with cursor before an empty anchor is error-prone.
- #8632 : Cursor panic when the Backspace key is used in a list item.
- #8455 : Mousedown focus is too agressive.
- #8475 : Issue with deleting elements with inline styling in tables.
- #8324 : [IE8] Undo generates an error when a control type element is selected.
- #7946 : Find and Replace dialog window result does not scroll into view when the editor is off the viewport.
- #8157 : Flash/IFrame dialog window cannot be closed when displayed over Flash/IFrame with dialog_startupFocusTab
set to true
.
- #8305 : Text direction lost when converting a paragraph to a list.
- #8379 : The cursor moves to the start of the document when inserting a row or column is undone.
- #6666 : Removed references to element.all
.
- #8732 : Issue when CKEDITOR.range::enlarge
passes through comment nodes.
- #7492 : The Style system can now use overrides with the same element (change classes instead of nesting).
- #6111 : Splitting table cells results in incorrect column spans.
- #8247 : [IE] Error when aligning a document with page breaks inside of contents.
- #8540 : Orphan texts inside a list or table are now properly fixed.
- #8774 : The Entities plugin can now be configured to only output XML entities.
- #8602 : Image source is now properly hidden when running data through the data processor.
- #8812 : [IE] Issues with the native range translation with comments in the DOM.
- #7907 : Decreasing indentation of a RTL block in a list item loses text direction.
- #8835 : Right margin on IE<8 removed to avoid mouse click confusion.
- #8400 : [IE] Script error when closing the Cell Properties dialog window if the table cell text is selected.
- #8248 : [IE8] Issues with Backspace and Del keys when used at the start or end of list items.
- #8855 : [Chrome] Issue with the popup window size in Chrome 18 makes it impossible to view the file browser window.
- #8407 : Unneeded aria-posinset
and aria-setsize
for a list block are now removed.
- #8701 : Highlight field in the color picker does not show the correct color when keyboard navigation is used.
- #8509 : Table height gets copied from the width value when the Advanced tab is hidden.
- #8432 : [IE8] openDialog('image')
error.
- #8493 : [IE] It is impossible to add a link to the selected text.
- #8528 : Redundant imagePreviewBoxId
in the Image Properties dialog window is now removed.
- #8864 : [IE] Fix ARIA presentation of toolbar rich combo in JAWS.
- #8459 : Fix wrong undo step on enter key.
- #8895 : Editing anchors using the Link dialog window could not work in release version.
- #8876 : <link> element in the floating panels have been moved to <head>.
- Updated the following language files as submitted to the CKEditor UI Translation Center : Arabic, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, Esperanto, Estonian, Faroese, French, German, Greek, Gujarati, Hindi, Italian, Macedonian, Norwegian (Bokmål and Nynorsk), Polish, Portuguese, Turkish, Uighur, Ukrainian, Vietnamese, Welsh.
-
-
- CKEditor 3.6.2
-
- New features:
-
- #6089 : The editor is now enabled on iOS 5 (iPad and iPhone).
- #7354 : It is now possible to exit from blockquotes by using the Enter key on empty paragraphs.
- #7931 : The mode
event now carries the previous editor mode.
- #6161 : New autoGrow_onStartup
configuration option.
- #8052 : autogrow
is now available as an editor command .
- #3457 : It is now possible to edit the contents of <textarea>
elements through the dialog window.
- #8242 : The "»" character is now added to the Special Character dialog window.
-
-
- Fixed issues:
-
- #8171 , #8172 : Updated links to WebSpellChecker.net.
- #8155 : Tooltips in the Special Character dialog window corrected.
- #8163 : The name of the filebrowserWindowFeatures
configuration setting corrected to match the documented name.
- #8124 : The Style fields in Advanced dialog window tabs are now validated according to CSS style attribute syntax.
- #8025 : The checkboxes in the Find and Replace dialog window are now part of a fieldset.
- #7943 : CSS conflict no longer appears when the page styles set the float
property of label
elements.
- #8016 : [WebKit] Flash content is not visible when previewing content.
- #6908 : Text color should always be applied to the linked text.
- #7619 : [IE] IFrame shim now consolidates the editor dialog window to avoid having it masked by embedded objects.
- #7900 : [FF] Copy/Paste operations for table cells no longer break the Table Properties dialog window.
- #7243 : Inline JavaScript events may become corrupted.
- #7448 : List creation in RTL blocks is wrongly merged with the above LTR block.
- #6957 : Highlighting of searched terms does not reach read-only blocks.
- #7948 : Tooltips with information about correct length units are now displayed for the Width/Height fields of the Table Properties dialog window.
- #6212 : [WebKit] Editor resize may scroll the host page.
- #6540 : [Safari] Editor loses focus on resizing.
- #7908 : [IE] Unlink command is sometimes missing from the context menu of a link.
- #8159 : Editor fails to load if the browser has no default language set.
- #7490 : [IE] Block format leaks to the next unselected line when enterMode
is set to BR
.
- #8087 : Indenting list items may add redundant text direction attributes.
- #6200 : Add styling for certain dialog window element types that miss focus outline (like checkbox).
- #7894 : Fault tolerance when parsing a malformed link.
- #8049 : Bullets/Numbers are invisible for list items with LTR text direction.
- #8222 : [IE] Incorrect selection locking after opening a dialog window in some cases.
- #7002 : [IE] Undo operation when a table is selected results in an error.
- #8232 : [IE] Unable to apply inline style that starts at the end of a link text.
- #7153 : Fail to load the source version of the editor after the window is loaded.
- #8246 : Bad editing performance on certain document contents.
- #7912 : Cursor trapped in an invisible element after pressing the Enter key.
- #7645 : Full list or table deletion with the Backspace/Delete key.
- #8050 : AutoGrow feature better fits the content styles.
- #8349 : [IE9] Larger toolbar top offset on HTML5 pages.
- #8352 : [IE9] Toolbar wrapping is incorrect.
- #8080 : JavaScript error when inserting a new table row.
- Updated the following language files:
- #8263 : Dutch;
- #8238 : Estonian;
- #8193 : Finnish;
- German;
- Hebrew;
- #8179 : Hungarian;
- #8128 : Italian;
- #8371 : Lithuanian;
- #8126 , #8256 : Norwegian (Bokmal and Nynorsk);
- #8356 : Persian;
- Polish;
- Portuguese (Brazil);
- #8151 , #8298 : Russian;
- Spanish;
-
-
-
- CKEditor 3.6.1
-
- New features:
-
- #4556 : Initial support for HTML5 elements.
- #6492 : The Find/Replace dialog window will now be populated with text selected in the editor.
- #7323 : New align
property in dialog window UI elements for field alignment.
- #6462 : A wider range of CSS length units (like pt and percentage) are now supported in related dialog window fields.
- #7911 : New Remove Anchor option is now available in the context menu.
- #7387 : Allow styleDefinition
to be applied to a set of elements.
- #4345 : A new langLoaded
event added to CKEDITOR.editor
in order to make it possible to perform "by code" language updates.
- #7959 : The cursor will now blink in the first cell after a table is inserted.
- #7885 : New editor::removeMenuItem
API for removing plugin context menu items introduced.
- #7991 : Introduce the controlStyle
and inputStyle
definitions to allow fine-grained controlling of dialog window element styles.
-
-
- Fixed issues:
-
- #7914 : ATTENTION! The signature for the setReadOnly()
function has been changed, reversing the meaning of the parameter to be passed to it. Please make sure to update your code when upgrading.
- #7657 : Wrong margin mirroring when creating a list from RTL paragraphs.
- #7620 : A glitch in list pasting from Microsoft Word caused by broken child references when filtering.
- #7811 : [IE] Deleting table row throws a JavaScript error.
- #6962 : Changed the CKEDITOR.CTRL
, CKEDITOR.SHIFT
and CKEDITOR.ALT
constant values to avoid collision with any possible Unicode character.
- #6263 : Some table cell context menu options may be incorrectly disabled.
- #6247 : Focus is not restored properly after a drop-down menu is closed.
- #7334 : [IE7] Indentation style does not apply to RTL lists.
- #6845 : Spaces inside the URL field in the Link dialog window will now be removed.
- #7840 : [IE] Opening the Table Properties dialog window via the context menu causes a JavaScript error.
- #7733 : Flash movies inserted with the Flash Properties dialog window are not displaying properly when injected into the page.
- #7837 : [IE<8] Inserting a page break results in an error.
- #7804 : The HTML5 wbr
tag is now recognized by the editor.
- #7867 : The file browser for the background image in the Document Properties plugin dialog window does not work.
- #7130 : The column resizer gripping area is invading adjacent table cells.
- #7844 : [FF] Calling setData()
on a hidden editor caused editor not to display.
- #7860 : The BBCode plugin was stripping BBCode tags that were not implemented in the plugin, but from now on they will be handled as simple text.
- #7321 : [IE6] Contents inside the RTL fields in dialog windows are overflowing.
- #7323 : [IE Quirks] Some fields are not centered in the dialog window.
- #5955 : Editor accessibility issue with JAWS when a drop-down menu is placed as the first item in the toolbar.
- #6671 : [FF] Selection of an item from the Styles drop-down list is not refreshed after the style is removed.
- #7879 : The Style and Height/Width fields of the Table Properties dialog window are not synchronized.
- #7581 : [IE] The Enter key pressed at the end of a list item containing the start
attribute crashes the browser.
- #7266 : Dialog window fields that did not pass validation are now ARIA-compatible with aria-invalid
.
- #7742 : [WebKit] Indentation, alignment, and language direction are not applied on an empty document without the editor being in focus.
- #7801 : [Opera] Pasted paragraphs now split partially selected blocks.
- #6663 : Table caption that contains rich text is corrupted after an edit done with the Table Properties dialog window.
- #7893 : [WebKit, Opera, IE<8] It is impossible to link to anchors in the document.
- #7637 : Cursor position might in some cases cause problems after inserting a page break.
- #5314 : The aria-selected
attribute is not removed when toolbar drop-down menu items are deselected.
- #7749 : Small check introduced to avoid issues with custom data processors and the insertHtml
function.
- #7269 : [WebKit] Paste from Word is including the full file://
URL path for anchor links.
- #7584 : Start number of the List dialog window now works with numbered list items.
- #6975 : [IE6, IE7] A definition list crashes Internet Explorer on HTML output.
- #7841 : Deleting a column with a cell deleted in one of the rows does not work.
- #7944 : The Enter key should not split or create new paragraphs inside caption elements.
- #7639 : [IE9] Browser might crash when an object is selected in the document.
- #7847 : [IE8] Inserting an image with non-secure source in a HTTPS page breaks the dialog window.
- #7953 : [IE] Text selection lost after the browser context menu is opened.
- #5239 : Inconsistent focus behavior after closing a toolbar drop-down menu.
- #6470 : The Start attribute of a Numbered List is rendered incorrectly if the field is left empty.
- #7324 : [IE6 Quirks] Context menus are not displayed correctly.
- #7566 : BiDi: Increasing indentation of a list item changes the language direction.
- #7839 : [IE] Pasting multi-level numbered lists from Microsoft Word does not work properly.
- #188 : [IE] Object selection was making the toolbar inactive in some situations.
- Updated the following language files:
-
-
- CKEditor 3.6
-
- New features:
-
- #7044 : New BBCode sample plugin that makes the editor output (one dialect of) BBCode format.
- #5647 : Accessibility enhancements to the structure of the toolbar.
- #5647 : The Kama skin now presents separators for the toolbar items, making it easier to group buttons and have a cleaner layout.
- #5647 : Usability enhancements to keyboard navigation on the toolbar. The Tab key is now used to jump between toolbar groups, while the Arrow keys can be used to cycle within the group. The new toolbarGroupCycling
setting can be used to change the Arrow keys behavior.
- #1376 : It is now possible to put the editor in the "read-only" state, so that the users would not be able to introduce changes to the contents. Check out the new CKEDITOR.editor::setReadOnly
method, the CKEDITOR.editor::readOnly
property, the CKEDITOR.editor::readOnly
event, and the readOnly
setting.
- #3582 : New presentation of anchor elements in the WYSIWYG mode.
- #6737 : The Format drop-down list will now display the preview of its contents exactly as defined in their style configurations.
- #6654 : A new autoParagraph
configuration setting is added to disable the auto paragraphing feature.
- #901 : New Stylesheet Parser (stylesheetparser
) plugin that fills the Styles drop-down list based on the CSS classes available for the content. Check the new sample to learn how to use it.
- #2988 : New Document Properties (docprops
) plugin that sets the metadata of the page in the Full Page mode.
- #7240 : New Developer Tools (devtools
) plugin that shows information about dialog window UI elements to allow for easier customization.
- #6841 : Pressing the Enter key at the end of a pre-formatted block will now exit from it.
- #6850 : The About CKEditor dialog window now contains a link to CKEditor User's Guide.
- #5745 : Extra configuration options for the iframeDialog
can now be passed.
- #6589 : The onDialogEvent
function will now be used automatically in the iframeDialog
contents if no callback is used on creation.
- #7757 : Georgian localization added.
-
-
- Fixed issues:
-
- #6774 : Internal styles are not included in the contents.css
sample.
- #6521 : Added sample for the TableResize plugin.
- #6664 : Page break is sometimes merged into block-level elements.
- #7594 : Toolbar keyboard navigation is not possible after recreating the editor.
- #6657 : Allow to style the entire dialog window field when the input element is disabled.
- Updated the following language files:
-
-
- CKEditor 3.5.4
-
- Fixed issues:
-
- Added protection against XSS attacks in PHP samples when displaying element names.
- #7347 : The Enter key will no longer be caught by the dialog window covering the editor.
- #6718 : Paste from Word command overrides the Force Paste as Plain Text configuration.
- #6629 : Padding body is no longer needed when the last block is pre-formatted.
- #4844 : [IE] Dialog windows fail to load if there are too many editor instances on the page.
- #5788 : HTML parser trims empty spaces following <br>
elements.
- #7513 : Invalid markup could cause the editor to hang.
- #6109 : Paste and Paste as Plain Text dialog windows now use the standard commitContent
and setupContent
methods.
- #7588 : The editor code now has a protection system to avoid issues when including ckeditor.js
more than once in the page.
- #7322 : Text font plugin now recognizes font family names that contain quotes.
- #7540 : Paste from Word introduces wrong spaces.
- #7697 : Successive calls of the replace()
method did not work after SCAYT context menu initialization.
- Updated the following language files:
-
-
- CKEditor 3.5.3
-
- New features:
-
- #4890 : Added the possibility to edit the rel
attribute for links.
- #7004 : Allow loading plugin translations even if they are not present in the plugin definition.
- #7315 : Firing the resize
event on dialog window instances is now possible.
- #7259 : Dialog window definition allows to specify initial width
and height
values.
- #7131 : List item numbering is now supported on pasting from Microsoft Word.
-
-
- Fixed issues:
-
- #1272 : [WebKit] It is now possible to apply styles to collapsed selections in Safari and Chrome.
- #7054 : The tooltips for special characters are now lowercased, making them more readable.
- #7102 : "Replace DIV" sample did not work when double-clicking inside the formatted text.
- #7088 : Loading of plugins failed on new instances of the editor after the Insert Special Character dialog window was used.
- #6215 : Removal of inline styles now also removes overrides.
- #6144 : Rich text drop-down lists have wrong height when toolbar is wrapped.
- #6387 : AutoGrow may cause an error when editor instance is destroyed too quickly after a height change.
- #6901 : Mixed direction content was not properly respected in a shared toolbar setting.
- #4809 : Table-related tags are output in wrong order.
- #7092 : Corrupted toolbar button state for inline style after switching to Source.
- #6921 : Pasted text marked by SCAYT in one language is not re-checked if another spellchecking language is selected in the editor.
- #6614 : Enhancement of the resize handle in RTL.
- #5924 : Flash plugin now recognizes Flash content without an embed
tag.
- #4475 : Protected source in attributes and inline CSS text is not handled correctly.
- #6984 : [FF] Trailing line breaks are lost in ENTER_BR
.
- #6987 : [IE] Text selection lost when calling editor::insertHtml
from a dialog window in some situations.
- #6865 : BiDi mirroring does not work when a text direction change is done through a dialog window.
- #6966 : [IE] Unintended paragraph is created in an empty document in enterMode
set for BR
and DIV
.
- #7084 : SCAYT dialog window is now working properly with more than one editor instance in a page.
- #6662 : [FF] List structure pasting error caused by a regression from FF3.5.x is now fixed.
- #7300 : Link dialog window now loads numeric values correctly.
- #7330 : New list items no longer inherit the value
attribute from their sibling.
- #7293 : The "Automatic" color button is now presented correctly without focus inside the editor.
- #7018 : [IE] Toolbar drop-down lists did not have a border around them.
- #7073 : Image dialog window no longer allows zero height and width value to be entered.
- #7316 : [FF] Clicking on "Paste" button incorrectly breaks the line at the cursor position.
- #6751 : Inline whitespaces are incorrectly stripped when pasting from Word.
- #6236 : [IE] Fixing malformed nested list structure which was introduced by the Backspace key.
- #6649 : [IE] Selection of the full table sometimes does not work.
- #6946 : HTML parser is now able to fix orphan list items.
- #6861 : Indenting a list item should retain the text direction.
- #6938 : Outdenting a list item should retain the text direction.
- #6849 : Correct Enter key behavior on list item.
- #7113 : [WebKit] Undesired document scroll on click after scrolling.
- #6491 : Undesired Image dialog window dimension lock reset on URL change.
- #7284 : [FF Quirks] Maximize now works correctly.
- #6609 : [IE9] Browser in high contrast mode is not properly detected.
- #7222 : [WebKit] Impossible to apply a single style to a collapsed selection without giving the editor focus.
- #7180 : [IE9] When using Kama skin and RTL layout dialog window buttons were not being displayed correctly.
- #7182 : [IE9] When using Office2003/v2 skin and RTL layout dialog window shadows were corrupted.
- #6913 : Invalid escape sequence (\b
) was used in the PHP integration.
- #5757 : [IE6] Text was not wrapping in the accessibility instructions dialog window.
- [6604] : Xml.js
and Ajax.js
are now available as plugins ('xml' and 'ajax').
- #7304 : Microsoft Word cleanup function is not always invoked when clicking on the "Paste From Word" button.
- #6658 : [IE] Pasting text from Microsoft Word with one or more tabs between list items was failing.
- #7433 : [IE9] ENTER_BR
at the end of a block breaks due to an IE9 regression.
- #7432 : [WebKit] Unable to create a new list in an empty document.
- #4880 : CKEditor changes tag style inside HTML comment with cke_protected
.
- #7023 : [IE] JavaScript error when a Selection Field is inserted into a page.
- #7034 : Inserting special characters into styled text.
- #7132 : Paste toolbar buttons are becoming disabled.
- #7138 : The api.html
sample in Opera does not work as expected.
- #7160 : Cannot paste the form element on top of the page.
- #7171 : Double-clicking an image in non-editable content opens the editing dialog window.
- #7455 : Extra line break is added automatically to the preformatted element.
- #7467 : [Firefox] Extra br
element is added in a nested list.
- Updated the following language files:
- #7124 : Czech;
- #7126 : French;
- #7140 : Catalan;
- #7215 : Faroese;
- #7177 : Finnish;
- #7163 : Norwegian (no and nb);
- #7219 : Swedish;
- #7183 : Afrikaans;
- Hebrew;
- Spanish;
- Polish;
- German;
-
-
-
- CKEditor 3.5.2
-
- Fixed issues:
-
- #7168 : [IE9] Destroying an editor instance throws an error.
- #7169 : [IE9] Menu item has incorrect height.
- #7178 : [IE9] Read-only attributes do not work in IE9.
- #7181 : [IE9] Toolbar items are not aligned in v2 and Office2003 skins.
- #7174 : [IE9] Elements path does not load correctly when the editor is switched back from Source to WYSIWYG.
-
-
- CKEditor 3.5.1
-
- New features:
-
- #6107 : It is now possible to remove block styles using Styles and Paragraph Format drop-down lists.
- #5590 : Remove Format command works in collapsed selections.
- #5755 : The dialog_buttonsOrder
option now works in Internet Explorer.
- #6869 : The data-cke-nostyle
attribute (which was introduced for escaping the element from been influenced by the style system since 3.5) is deprecated in favor of the new data-nostyle
attribute.
- Revised sample pages with code examples and clarifications.
-
-
- Fixed issues:
-
- #5855 : Updating a link multiple times generates wrong href
attribute.
- #6166 : Error on Maximize command, when the toolbar button is not shown.
- #6607 : Table cell "merge down" and "merge right" commands work only once.
- #6228 : Merge down does not work, throwing a JavasSript error.
- #6625 : BIDI: Mixed LTR/RTL direction causes incorrect behavior.
- #6881 : IFrame capitalization is now consistent throughout labels.
- #6686 : BIDI: [FF] When we apply explicit language direction to a numbered/bulleted list, the corresponding language direction toolbar icon is not highlighted.
- #6566 : It is now possible to exit a blockquote using ENTER_BR
.
- #6868 : Partial (invalid) list structure crashes the editor on load.
- #6804 : Buggy behavior when editing the legend
element inside a fieldset
.
- #6724 : [IE7] Nested list display bug on empty list item.
- #6715 : List items do not create paragraphs after the list placed in a table cell is removed.
- #6695 : [Webkit] Display bug after the editor is restored from the full screen mode.
- #6661 : [IE] Pre-formatted style does not preserve applied text direction.
- #6655 : Using the editor resize grip causes small visual offsets.
- #6604 : The div
element should be used as a formatting block in ENTER_BR
.
- #6249 : BIDI: List item bullets are off viewport with RTL text direction.
- #6610 : BIDI: ENTER_BR
change direction in one line out of multiple.
- #6872 : [IE] Link target field is not populated properly when no target is set.
- #6880 : Samples: Added a user-friendly message for users on servers without PHP support.
- #6628 : Setting config.enterMode
from PHP fails.
- #6278 : Comments were moved above the br
tags.
- #6687 : Empty tag should be removed in inline-style format.
- #6645 : Allow to configure whether " (double quotes) characters should be encoded in the contents.
- #6336 : IE: (double)clicking an input type="submit"
button submitted the form.
- #6646 : Context menu was not working for text inputs present in the initial content.
- #6641 : Copying and pasting links inside the editor was not working.
- #4208 : The disableObjectResizing
setting now works in IE.
- #6242 : [IE] Editing existing links with href
of a relative path mangles containing text.
- #5930 : [IE] Style definitions are no longer lowercased.
- #5361 : Preview window's title should reflect the title tag in full page mode.
- #5522 : [IE] In versions < 8 or compatibility mode, type="text"
was missing in text fields.
- #6126 : [IE] Avoid problems if there are two buttons named "submit".
- #6791 : [IE7] Editor did not show up when the name of a replaced textarea matched the name of a meta
tag in the page.
- #5684 : [FF] When forcePasteAsPlainText
is used, the cursor disappears after paste.
- #6390 : Prevent toolbar dialog window buttons from being clicked twice.
- #6684 : [Webkit] Toolbar buttons are not wrapping correctly when the editor is displayed inside a table.
- #6703 : [IE] editor focus
event not fired in an instance, when a dialog window closes.
- #6873 : Difficult to drag the resize grip of the spell checker dialog window.
- #6896 : [Webkit] Unable to paste into source area when the editor is maximized.
- #6020 : The state of the Cut, Copy, and Paste toolbar now matches the state of the context menu buttons.
- #5256 : JavaScript error thrown when percent (%) sign is used in image URL.
- #6577 : [FF] Selection error when an element containing the editor instance is hidden.
- #5500 : [IE] value
attribute of text input dialog window field was missing.
- #6665 : [IE] name
field of Link dialog window was missing.
- #6639 : Line-breaks inside pasted list item from Microsoft Word break the list structure.
- #6909 : [IE] GIF icons of toolbar button from custom plugins are not diplayed in zoom level 100%.
- #6860 : [FF] Double-clicking the placeholder element in order to open a Placeholder dialog window throws a JavaScript error.
- #6630 : Empty pre
elements are output differently in various browsers.
- #6568 : Insert table row/column does not work with spanning.
- #6735 : Inaccurate read-only selection detection.
- #6728 : BIDI: Change direction does not work with list nested inside a blockquote.
- #6432 : Inserting a table in place of a fully selected list results in a JavaScript error.
- #6438 : [IE] Performance enhancement when typing inside an element with many child nodes.
- #6970 : [IE] Dialog window shadows were presented inaccurately.
- #6672 : [IE] Unnecessary br
element is no longer inserted after a form.
- #7087 : [FF] Sometimes it was not possible to move cursor out of link at the end of block.
- Updated the following language files:
-
-
- CKEditor 3.5
-
- New features:
-
- #4090 : Full Adobe AIR support.
- #5084 : Dialog windows are now resizable with a grip located in the footer.
- #5755 : Introduced the dialog_buttonsOrder setting, making it possible to control the buttons order.
- #4648 : Added the new iFrame plugin.
- #6010 : The Automatic option of the font/background color panel now represents the real color.
- #5654 : New "placeholder" plugin.
- #6334 : CKEditor now uses HTML5's data-* attributes for its internal attributes.
- #6103 : It's now possible to control the styling of inline read-only elements with the disableReadonlyStyling setting. It's also possible to avoid inline-styling any element by setting its "data-cke-nostyle" attribute to "1".
- #5404 : fillEmptyBlocks configuration option of v2 is now available.
- #5367 : New CKEDITOR.editor#insertText method (check api.html sample page for usages) is now provided to insert plain text into editor.
- #5915 : New removeDialogTabs configuration option to hide certain dialog tabs.
-
-
- Fixed issues:
-
- #4821 : Icons in the toolbar were distorted with IE and zoom != 100%.
- #5587 : Visual improvements in dialogs, reinforce field label on separate line.
- #4652 : Now it's able to disable editor context menu by simply removing the "contextmenu" plugin.
- #5599 : Labels of "specialchar" dialog are now translated.
- #6419 : [IE] List creation by merging problem.
- #6502 : Removed IE6 image preloading, which was used to defect the duplicate request of background images.
- #6822 : Added labels to fake objects.
- #6898 : [IE6] Toolbar icons becomes invisible in RTL.
- Updated the following language files:
-
-
- CKEditor 3.4.3
-
- Fixed issues:
-
- #6554 : [Webkit] cannot type after inserting Page Break.
- #6569 : Indentation now complies with text direction of the only item.
- #6579 : The jQuery adapter was not working properly and was turned on in incompatible environments.
- #6644 : Restrict onmousedown
handler to the toolbar area.
- #6656 : Panelbutton's buttons became active when clicking on Source.
- #6248 : Whitespaces (nbsp
elements) were incorrectly added into empty table cells and list items.
- #6575 : Tabs disappearing in Link dialog window after a specific sequence of actions.
- #6510 : Margin mirroring does not respect style configuration.
- #6471 : BIDI: Pressing Decrease Indent in an RTL bulleted list causes incorrect behaviour.
- #6479 : BIDI: Language direction is not being preserved when pressing Enter after a Paragraph Format was applied.
- #6670 : BIDI: Indent & List icons are not reversed when we apply RTL direction to a paragraph with any of Paragraph Formatting options.
- #6640 : Floating panels are now being closed when switching modes.
- #4790 : Remove list with multiple items in enterBr
doesnot preserve line breaks.
- #6297 : Floated inline elements are not taking part in behavior of blocks anymore.
- #6171 : [Firefox] Opening rich content drop-down list scrolls host page to the top when editor has a vertical scrollbar.
- #6330 : List markers from MS Word with Roman numbering are not preserved.
- #6720 : Attribute protection might detect wrong elements.
- #6580 : [IE9] Flash dialog window does not get filled up.
- #6447 : Decreasing indentation of a list with indentClasses
config does not work.
- #5894 : Adding custom buttons at the bottom of a dialog window does not cause it to expand to include its contents.
- #6513 : Wrong ARIA attributes created on list options of Styles drop-down list.
- #6150 : [Safari] Color dialog window was broken.
- #6747 : Full screen layout issue caused by page element focus outside editor.
- #6779 : Clicking the body
element on elements path turns the selection on and off immediately.
- #6781 : [IE7] Dialog windows are broken with RTL, Office 2003 and v2 skins.
- #6798 : [IE7] Dialog window buttons disappearing in RTL after dragging.
- #6806 : [IE7] Dialog window buttons invisible on focus.
- #6588 : Copy and paste adds <span>
if SCAYT is enabled.
- #6673 : IE Target combo for Image Link shown as blank even when we select <not set>
as an option.
- Updated the following language files:
-
-
- CKEditor 3.4.2
-
- New features:
-
- #5024 : Added a sample that shows how to output HTML that is valid for Flash.
-
-
- Fixed issues:
-
- #5237 : English text in dialogs' title was flipped when using RTL language (office2003 and v2 skins).
- #6289 : Deleting nested table removed the parent cell.
- #6341 : The editor contents now have the text cursor.
- #6153 : Chrome: tab focus is wrong.
- #6261 : Focus and infinite loop between multiple editors.
- #6170 : Dedicated class names are removed from floating panels when opening another panel.
- #6339 : Autogrow plugin now doesn't work on maximized editors.
- #6237 : BIDI: Applying same language direction to all paragraphs not working.
- #6353 : [IE] Resize was broken with office2003 and v2 skins.
- #6375 : Avoiding errors when hiding the editor after the blur event.
- #6133 : Styled paragraphs result on buggy list creation.
- #5074 : Link target is not removed when changing to popup.
- #6408 : [IE] Autogrow now works correctly on Quirks.
- #6420 : [IE] The table properties dialog now correctly retrieves the caption text.
- #6141 : It was impossible to outdent a list when indentOffset was set to 0.
- #6377 : FF width and height are not shown for smiley in Image properties dialog.
- #5399 : Lists pasted from Word do not maintain their nesting.
- #6225 : [FF] Cannot transform several lines to list with enterMode BR.
- #6467 : [FF] It is now possible to disable the plugin command on "mode" event.
- #6461 : Attributes are now being kept when changing block formatting.
- #6226 : BIDI: Language direction applied to a Paragraph is removed when we apply one of Paragraph formatting options.
- #5395 : [Opera] Native context menu incorrectly opened after Opera 10.2.
- #6444 : [Opera] Close panels and dialogs don't return focus to wysiwyg frame.
- #6332 : IE: V2 skin bottom dialog's border broken.
- #5646 : Parser incorrectly removes inline element when there's only one comment node enclosed.
- #6189 : Minor code size reduction.
- #5045 : uiColor behaved wrong if multiple editors were used with period in their names.
- #5766 : Config entry "ignoreEmptyParagraph" should only remove one single empty paragraph in document.
- #5931 : Unable to apply inline style because of nested elements with same style name.
- #6083 : Dialog close sometimes cause collapsed editor selection before the insertion.
- #6253 : BIDI: creating a Numbered/Bulleted list causing improper behavior on bidi.
- #4023 : [Opera] Maximize plugin.
- #6403 : [Opera] Font name options are not correctly marked in dropdown list.
- #4534 : [Opera] Arrow key to navigate through combo list has side effects of window scrolling.
- #6534 : [Opera] Menu key brings up both CKEditor and browser context menu.
- #6534 : [Opera] Menu key brings up both CKEditor and browser context menu.
- #6416 : [IE9] Unable to make text selection with mouse in source area.
- #6417 : [IE9] Context menu opens at the upper-left corner always.
- #6501 : [IE9] Context menu item layout is broken.
- #6099 : BIDI: when we apply explicit language direction to Numbered/Bulleted List the corresponding BIDI Tool bar icon is not highlighted in the Toolbar.
- #6100 : BIDI: when we change Table language direction indentation of text in Table cells is not applied correctly.
- #6376 : BIDI: buttons should not toggle the base language direction.
- #6235 : BIDI: Applying direction to multi-paragraph selection within a div.
- #6187 : [IE6] Multi-instance loading produces 404s on background images.
- #5446 : Setting config.filebrowserImageBrowseUrl results in displaying also Browser Server on links.
- #5626 : CKeditor 3.2.1 : html content attached makes ckeditor crash the browser FF/IE.
- #6508 : BiDi: Margin mirroring logic doesn't honor CSS direction.
- #6043 : BIDI: When we apply RTL direction to a right aligned Paragraph, Paragraph is not moved to the left & Alignment of Paragraph is not changed.
- #6485 : BIDI: When direction is applied on partial selected list, the style is been incorrectly applied to the entire list.
- #6087 : Cursor of input fields in dialog isn't visible in RTL.
- #5595 : Extra leading spaces added in preformatted block.
- #6094 : Match full word option doesn't stop on block boundaries.
- #5730 : [Safari] Continual pastes (holding paste key) breaks document contents.
- #5850 : [IE] Inline style misbehaviors at the beginning of numbered/bulleted list.
- Updated the following language files:
- #6427 : Ukrainian;
- #6464 : Finnish;
- Hebrew;
-
-
-
- CKEditor 3.4.1
-
- New features:
-
-
- Fixed issues:
-
- #6027 : Modifying Table Properties by selecting more than one cell caused issues.
- #6146 : IE: Floating panels were being opened in the wrong place in RTL pages with horizontal scrollbars.
- #6055 : The timestamp is now added only once to each loaded file.
- #6097 : The bookmarks now use the right name.
- #5717 : Removed the scayt_contextMenuOntop setting and the SCAYT context menu options are always on top.
- #5956 : [FF] It was impossible to create an editor inside an hidden container.
- #5753 : It was impossible to have a default value for the name field in the select dialog.
- #6041 : BIDI: Direction of Increase Indent & Decrease Indent icons are not reversed after changing Lang direction to RTL.
- #6138 : List indentation is not working.
- #5649 : Image dialog too wide when many styles are set.
- #5715 : Cell color picker dialog returns focus to document.
- #6108 : Fixed div style.
- #5336 : Remove object style.
- #6155 : [[FF]] Modifying Table Header Properties by selecting first Row, causing several issues.
- #6163 : Focus not going to Tabs in Image dialog when we went to Edit the Image.
- #6177 : IE we can't start Numbered/Bulleted list on a Empty page.
- #6034 : Horizontal Alignment applied to Table cell is not updated correctly in the Toolbar.
- #6112 : BIDI: Alignment set to text in Table cell is not shown in the Tool bar when we press Enter to start a new Paragraph.
- #6117 : BIDI: Language direction is changing when we come out of Numbered/Bulleted list.
- #6182 : Language Direction field on the Advanced tab of Table Properties dialog has a fixed pixel width.
- #5487 : Fullpage writer problem with line-break.
- #6197 : The CKEDITOR.loader base path auto-detection was not working with the _source folder.
- #6240 : Font Names & Font Sizes should be shown Left Align even for RTL Languages.
- #5975 : Page-break should have proper Alt Text instead of Unknown object. so that JAWS reads it properly.
- #6255 : Inserting a page break as the first node triggered an error.
- #6188 : [IE7] Automatic color button had the wrong cursor.
- #6129 : The show blocks' labels are now shown in the right for RTL languages.
- #5421 : ­ entity not converted when config.entities=false.
- #5769 : xhtml code generation problem instead of   (htmlentities, entities,entities_additional,..., configuration).
- #4472 : [FF3] Browser window scrolls to loaded CKEditor.
- #6230 : Fixed invalid parameter count for setTimeout function call.
- #5335 : Several lines' formatted data will be merged to one line when we apply Numbers/Bullets.
- #5353 : wrong width of editor after resize() called in Firefox 3.6.
- #5778 : [IE] Unwanted scroll on first mouse right-click.
- #5218 : [FF] Copy/paste of an image from same domain changed URL to relative URL.
- #6265 : Popup window properties were visible in the link dialog's target tab when nothing was selected.
- #6075 : [FF] Newly created links didn't fill in information on edit.
- #6183 : The toolbar panels options sometimes had the contents' link color.
- #6192 : [WebKit] Inserting smileys was not working because of editor focus issues.
- #6178 : [WebKit] Inserting elements by code was failing if the editor didn't receive the focus first.
- #6179 : [WebKit] The Image dialog was not working if the editor didn't receive the focus first.
- #4657 : [Opera] Styles where not working with collapsed selections.
- #5839 : "Insert row after" was removing the ids of the elements from the clicked row.
- #6315 : DIV plugin TT #2885 regression.
- Updated the following language files:
-
-
- CKEditor 3.4
-
- Fixed issues:
-
- #6118 : Initial focus is now set to the tabs in the table properties dialog.
- #6135 : The dialogadvtab plugin now uses the correct label.
- #6125 : Focus was lost after applying commands in Opera.
- #6137 : The table dialog was missing the default width value on second opening.
-
-
- CKEditor 3.4 Beta
-
- New features:
-
- #5909 : New BiDi feature, making it possible to switch the base language direction of block elements.
- #5268 : Introducing the "tableresize" plugin, which makes it possible to resize tables columns by mouse drag. It's not enabled by default, so it must be enabled in the configurations file.
- #979 : New enableTabKeyTools configuration to allow using the TAB key to navigate through table cells.
- #4606 : Introduce the "autogrow" plugin, which makes the editor resize automatically, based on the contents size.
- #5737 : Added support for the HTML5 contenteditable attribute , making it possible to define read only regions into the editor contents.
- #5418 : New "Advanced" tab introduced on the Table Properties dialog. It's based on the new dialogadvtab plugin.
- #6082 : Introduced the useComputedState setting, making it possible to control whether toolbar features, like alignment and direction, should reflect the "computed" selection states, even when the effective feature value is not applied.
-
-
- Fixed issues:
-
- #5911 : BiDi: List items should support and retain correct base language direction
- #5689 : Make it possible to run CKEditor inside of Firefox chrome.
- #6042 : It wasn't possible to align a paragraph with the dir attribute to the opposite direction.
- #6058 : Fixed a small style glitch with file upload fields in IE+Quirks.
-
-
- CKEditor 3.3.2
-
- New features:
-
- #5882 : Introduce the dialog#selectPage event, replicating the OnDialogTabChange feature available in FCKeditor 2.
- #5927 : The native controls in ui.dialog.elements can be styled with the controlStyle definition.
-
-
- Fixed issues:
-
- #1644 : Removed references to cursor:hand in the stylesheets.
- #5411 : Anchor, hidden fields and Page-Break objects can no longer be resized.
- #5456 : Initial focus incorect in api_dialog sample page.
- #5628 : Incorrect <pre> siblings merging.
- #5829 : Adding validation for start number field in list style dialog.
- #5845 : Context menu on empty list item loses selection.
- #5860 : [IE] > in attribute values are incorrectly escaped.
- #5905 : SCAYT is not any more enabled by default.
- #5736 : Improved the text generated for mailto: links if no text was selected.
- #4779 : Adjust resize_minWidth and resize_minHeight if smaller than actual dimensions.
- #5687 : Navigation through colors is now compatible with RTL.
- #4615 : [IE] Text fields are no longer disrupted in dialog with RTL.
- #5887 : The number of columns in the smileys table is now configurable via the smiley_columns setting.
- #5100 : It was possible to drag&drop some elements like context menu items or dropdown entries.
- #5933 : Text color and background color panels don't have scrollbars anymore under office2003 and v2 skins.
- #5943 : An error is no longer generated when using percent or pixel values in the image dialog.
- #5951 : Avoid problems with security systems due to the usage of UniversalXPConnect.
- #5441 : Avoid errors if the editor instance is removed from the DOM before calling its destroy() method.
- #4997 : Provide better access to the native input in the ui.dialog.file element.
- #5914 : Modified the Smileys dialog to make active only the images and not their borders.
- #5565 : The scrollbar does not behaves erratically when opening a rich combo in RTL page.
- #5843 : In CKEditor 3.3: When we set the focus in the 'instanceReady' event, FF3.6 is giving js error.
- #5902 : paste and pastetext dialogs cannot be skinned easily.
- #5959 : Dialog auto focus does not check for hidden tabs.
- #5415 : Undo not working when we change the Table Properties for the table on a saved page.
- #5435 : IE: we can't start Numbered/Bulleted list in Tables by Clicking on Insert/Remove Numbers/Bullets Icon.
- #5832 : The JQuery adapter sample is not working properly with SSL.
- #5728 : Text field & Upload Button in Upload Tab of Image Properties dialog are not shown Properly in Arabic.
- #5436 : IE: Cursor goes to next Table Cell after we insert a Smiley in the Table Cell.
- #5580 : Maximize does not work properly in the Office 2003 and V2 skins.
- #5495 : The link dialog was breaking the undo system on some situations.
- #5775 : Required field's label to contain a CSS class to allow it to be styled differently.
- #5999 : Table dialog rows and columns fields are now marked as required.
- #5693 : baseHref detection in the flash dialog now works correctly.
- #5690 : Table cell's width attribute is now respected properly.
- #5819 : Introducing the new removeFormatCleanup event and making sure remove format doesn't break the showborder plugin.
- #5558 : After pasting on WebKit based browsers the editor now scrolls to the end of the pasted content.
- #5799 : Correct plugin dependencies for the liststyle plugin with contextMenu and dialog.
- #5436 : IE: The cursor was moving to the wrong position when inserting inline elements at the end of cells on tables.
- #5984 : Firefox: CTRL+HOME was creating an unwanted empty paragraph at the start of the document.
- #5634 : IE: It was needed to click twice in the editor to make it editable on some situations.
- #5338 : Pasting from Open Office could lead on error.
- #5224 : Some invalid markup could break the editor.
- #5455 : It was not possible to remove formatting from pasted content on specific cases.
- #5735 : IE: The editor was having focus issues when the previous selection got hidden by scroll operations.
- #5563 : Firefox: The disableObjectResizing and disableNativeTableHandles settings stopped working.
- #5781 : Firefox: Editing was not possible in an empty document.
- #5293 : Firefox: Unwanted BR tags were being left in the editor output when it should be empty.
- #5280 : IE: Scrollbars where reacting improperly when clicking in the bar space.
- #5840 : Some dialog access keys are conflicting with "Ctrl + A", select all text behavior on text input.
- #6059 : Changing list type didn't preserve the list's attributes.
- #5193 : In Firefox, the element path options had the text cursor instead of the arrow.
- #6073 : The list context menu was showing the wrong option when in a mixed list hierarchy.
- #6074 : The Insert Table Column command was duplicating the selected column cells ids.
- #6066 : The toolbar combos had the text cursor instead of the arrow.
- #6062 : The toolbar buttons had the text cursor instead of the arrow.
- #6068 : [IE7] A few labels were hidden in a RTL language.
- #6000 : Safari and Chrome where scrolling the contents to the top when moving the focus to the editor.
- #6090 : IE: Textarea with selection inside causes Link dialog issues.
- #5079 : Page break in lists move to above the list when you switch from WYSIWYG to HTML mode and back.
- Updated the following language files:
- Chinese Simplified;
- Hebrew;
- #5962 : German;
- #5645 : Portuguese;
- #5797 : Turkish;
-
-
-
- CKEditor 3.3.1
-
- Fixed issues:
-
- #5780 : Text selection lost when opening some of the dialogs.
- #5787 : Liststyle plugin wasn't packaged into the core (CKEDITOR.resourceManager.load exception).
- #5637 : Fix wrong nesting that generated "<head> must be a child of <html>" warning in Webkit.
- #5790 : Internal only attributes output on fullpage <html> tag.
- #5761 : [IE] Color dialog matrix buttons are barely clickable in quirks mode.
- #5759 : [IE] Clicking on the scrollbar and then on the host page causes error.
- #5772 : List style dialog is missing tab page ids.
- #5782 : [FF] Wysiwyg mode is broken by 'display' style changes on editor's parent DOM tree.
- #5801 : [IE] contentEditable="false" doesn't apply in effect on inline-elements.
- #5794 : Empty find matching twice results in JavaScript error.
- #5732 : If it isn't possible to connect to the SCAYT servers the dialogs might hang in Firefox. Fix for Firefox>=3.6.
- #5807 : [FF2] New page command results in uneditable document.
- #5807 : [FF2] SCAYT plugin is disabled in Firefox2 due to selection interference.
- #5772 : [IE] Some numbered list style types are not supported by IE6/7 and causes JavaScript error.
-
-
- CKEditor 3.3
-
- New features:
-
- #635 : The properties dialog will now open when double clicking on objects.
- #3893 : It's now possible to indent/outdent lists when selecting the first list item.
- #4968 : The contentsLangDirection setting now has a default value 'ui' which inherit language direction from the editor UI language.
- #4649 : The color picker dialog is now accessible.
- #3593 : The editing area is now enabled by contentEditable="true" instead of designMode="on" to allow creating uneditable content elements in all browsers.
- #4056 : Hidden fields will now be displayed as fake element just like in FCKeditor 2.
-
-
- CKEditor 3.2.2
-
- New features:
-
- The SCAYT spell checker is now enabled by default through the autoStartup setting.
- #5631 : The SCAYT context menu options can now be reorganized through the scayt_contextMenuItemsOrder setting.
- #4231 : Introducing the resize_dir setting , to be able to restrict manual resizing of the editor to only one direction (horizontal/vertical).
- #5479 : Introducing the classic ASP integration files and samples.
- #5024 : Added samples (HTML and XHTML ) to show how to output HTML using fonts and other attributes instead of styles.
- #4358 : Introduced the List Properties dialog.
- #5485 : Adding the contentsLanguage configuration option to be able to set the language for the editor contents.
-
-
- Fixed issues:
-
- #5330 : Corrected detection of CTRL and META keys in Macs for the context menu.
- #5434 : Fixed access denied issues with IE when accessing web sites through IPv6 IP addresses.
- #4476 : [IE] Inaccessible empty list item contains sub list.
- #4881 : [IE] Selection range broken because of cutting a single control type element from it.
- #5505 : Image dialog throw JavaScript error when click close dialog before preview area is loading.
- #5144 : [Chrome] Paste in Webkit sometimes leaves extra 'div' element.
- #5021 : [Firefox] Typing in empty document start from second line when enterMode = CKEDITOR.ENTER_BR.
- #5416 : [IE] Delete table throws a error when enterMode = CKEDITOR.ENTER_BR.
- #4459 : [IE] Select element is penetrating the maximized editor in IE6.
- #5559 : [IE] The first call to setData is affected by iframe cache when loading the wysiwyg mode.
- #5567 : [IE] Remove inline styles in some case doesn't join identical siblings.
- #5450 : [FireFox] Press ENTER on 'replace' button result wrong.
- #5121 : Recognizes the <br /> tag as a separator when apply block styles and enterMode = CKEDITOR.ENTER_BR.
- #5575 : CKEDITOR.replaceAll should consider all kind of white spaces between class names.
- #5582 : Prevent the default behavior when click the 'x' button to close dialog box.
- #5584 : ENTER key with forceEnterMode turns on doesn't inherit current block attributes.
- #4797 : [Opera] Press ENTER key in dialog fields to close throws JavaScript error.
- #5578 : Add flash fake element align property when switch mode (source to wysiwyg).
- #5577 : Update delete column behavior when choose multiple cells in the same column.
- #5512 : Open context menu with SHIFT+F10 doesn't get correct editor selection.
- #5433 : English protocol text directions in Link dialog are not incorrect in 'rtl' UI languages.
- #5553 : Paste dialog clipboard area text direction is incorrect for 'rtl' content languages.
- #4734 : Font size resets when font name is changed in an empty numbered list.
- #5237 : English text in dialogs' title is flipped when using RTL language.
- #3257 : Create list doesn't keep blocks as headings.
- #5111 : [Firefox] JAWS doesn't respect PC cursor mode (application role) on toolbar.
- #5530 : Page break for printing can't be removed with undo.
- #5381 : Unable to place cursor between two paragraphs in body.
- #5568 : [IE6/7] Selecting a entire table cell changes the original range.
- #5623 : [Firefox] Apply style that edges another inline style result incorrect.
- #5586 : [Firefox] Maximize the second editor ruins full screen mode.
- #5617 : HTML filter system does not allow two 'text' filter rules.
- #5663 : General memory clean up after destroying last instance.
- #5461 : [IE] Fix Paste from Word dialog doesn't accept imput problem.
- #5676 : Make color buttons use RRGGBB instead of RGB for better compatibility with IE.
- #4948 : [Safari] Select the first/last cell of table to open context menu may lead to undetected table.
- #5591 : [Firefox] Select a list item makes selected element broken.
- #5667 : Pasting in a RTL page content causes shows up the horizontal scrollbar.
- #5688 : Duplicate ids are used in dialog definition.
- #5719 : [IE] 'change' dialog event should not be triggered when dialog is already closed.
- #5747 : [IE] Error thrown when IE input field editing mode is turned on.
- #5516 : IE8: Toolbar buttons have higher bottom padding.
- #5402 : SHIFT-ENTER could now be used to exit from preformat block.
- SCAYT plugin related:
- #4836 : Using SCAYT result in fragile elements when applying inline styles.
- #5425 : [Opera] Disable SCAYT plugin for Opera browser.
- #5632 : SCAYT word marker is not visible on text with background-color set.
- #4125 : Remove Format command incorrectly removes SCAYT word markers.
- #5671 : SCAYT bootstrap script could be added multiple times unnecessarily.
- #5573 : SCAYT move cursor position after insert element into marked word text.
- #5546 : SCAYT interferes with undo/redo commands.
- #5570 : [IE] First enabling SCAYT blind cursor in editor.
- #5741 : Enable SCAYT cause error in multiple editor instances.
- #5744 : Remove editor with SCAYT enabled in source mode throws error.
-
- Updated the following language files:
-
-
- CKEditor 3.2.1
-
- New features:
-
- #4478 : Enable the SelectAll command in source mode.
- #5150 : Allow names in the CKEDITOR.config.colorButton_colors setting.
- #4810 : Adding configuration option for image dialog preview area filling text.
- #536 : Object style now could be applied on any parent element of current selection.
- #5290 : Unified stylesSet loading removing dependencies from the styles combo.
- Now the configuration entry is named 'config.stylesSet' instead of config.stylesCombo_stylesSet and the default location
- is under the 'styles' plugin instead of 'stylescombo'.
- #5352 : Allow to define the stylesSet array in the config object for the editor.
- #5302 : Adding config option "forceEnterMode".
- #5216 : Extend CKEDITOR.appendTo to allow a data parameter for the initial value.
- #5024 : Added sample to show how to output XHTML and avoid deprecated tags.
-
-
- Fixed issues:
-
- #5152 : Indentation using class attribute doesn't work properly.
- #4682 : It wasn't possible to edit block elements in IE that had styles like width, height or float.
- #4750 : Correcting default order of buttons layout in dialogs on Mac.
- #4932 : Fixed collapse button not clickable on simple toolbar.
- #5228 : Link dialog is automatically changes protocol when URLs that starts with '?'.
- #4877 : Fixed CKEditor displays source code in one long line (IE quirks mode + office2003 skin).
- #5132 : Apply inline style leaks into sibling words which are seperated spaces.
- #3599 : Background color style on sized text displayed as narrow band behind.
- #4661 : Translation missing in link dialog.
- #5240 : Flash alignment property is not presented visually on fake element.
- #4910 : Pasting in IE scrolls document to the end.
- #5041 : Table summary attribute can't be removed with dialog.
- #5124 : All inline styles cannot be applied on empty spaces.
- #3570 : SCAYT marker shouldn't appear inside elements path bar.
- #4553 : Dirty check result incorrect when editor document is empty.
- #4555 : Unreleased memory when editor is created and destroyed.
- #5118 : Arrow keys navigation in RTL languages is incorrect.
- #4721 : Remove attribute 'value' of checkbox in IE.
- #5278 : IE: Add validation to check for bad window names of popup window.
- #5171 : Dialogs contains lists don't have proper voice labels.
- #4791 : Can't place cursor inside a form that end with a checkbox/radio.
- #4479 : StylesCombo doesn't reflect the selection state until it's first opened.
- #4717 : 'Unlink' and 'Outdent' command buttons should be disabled on editor startup.
- #5119 : Disabled command buttons are not being properly styled when focused.
- #5307 : Hide dialog page cause problem when there's two tab pages remain.
- #5343 : Active list item ARIA role is wrongly placed.
- #3599 : Background color style applying to text with font size style has been narrowly rendered.
- #4711 : Line break character inside preformatted text makes it unable to type text at the end of previous line.
- #4829 : [IE] Apply style from combo has wrong result on manually created selection.
- #4830 : Retrieving selected element isn't always right, especially selecting using keyboard (SHIFT+ARROW).
- #5128 : Element attribute inside preformatted text is corrupted when converting to other blocks.
- #5190 : Template list entry shouldn't gain initial focus open templates list dialog opens.
- #5238 : Menu button doesn't display arrow icon in high-contrast mode.
- #3576 : Non-attributed element of the same name with the applied style is incorrectly removed.
- #5221 : Insert table into empty document cause JavaScript error thrown.
- #5242 : Apply 'automatic' color option of text color incorrectly removes background-color style.
- #4719 : IE does not escape attribute values properly.
- #5170 : Firefox does not insert text into styled element properly.
- #4026 : Office2003 skin has no toolbar button borders in High Contrast in IE7.
- #4348 : There should have exception thrown when 'CKEDITOR_BASEPATH' couldn't be figured out automatically.
- #5364 : Focus may not be put into dialog correctly when dialog skin file is loading slow.
- #4016 : Justify the layout of forms select dialog in Chrome and IE7.
- #5373 : Variable 'pathBlockElements' defines wrong items in CKEDITOR.dom.elementPath.
- #5082 : Ctrl key should be described as Cmd key on Mac.
- #5182 : Context menu is not been announced correctly by ATs.
- #4898 : Can't navigate outside table under the last paragraph of document.
- #4950 : List commands could compromise list item attribute and styles.
- #5018 : Find result highlighting remove normal font color styles unintentionally.
- #5376 : Unable to exit list from within a empty block under list item.
- #5145 : Various SCAYT fixes.
- #5319 : Match whole word doesn't work anymore after replacement has happened.
- #5363 : 'title' attribute now presents on all editor iframes.
- #5374 : Unable to toggle inline style when the selection starts at the linefeed of the previous paragraph.
- #4513 : Selected link element is not always correctly detected when using keyboard arrows to perform such selection.
- #5372 : Newly created sub list should inherit nothing from the original (parent) list, except the list type.
- #5274 : [IE6] Templates preview image is displayed in wrong size.
- #5292 : Preview in font size and family doesn't work with custom styles.
- #5396 : Selection is lost when use cell properties dialog to change cell type to header.
- #4082 : [IE+Quirks] Preview text in the image dialog is not wrapping.
- #4197 : Fixing format combo don't hide when editor blur on Safari.
- #5401 : The context menu break layout with Office2003 and V2 skin on IE quirks mode.
- #4825 : Fixing browser context menu is opened when clicking right mouse button twice.
- #5356 : The SCAYT dialog had issues with Prototype enabled pages.
- #5266 : SCAYT was disturbing the rendering of TH elements.
- #4688 : SCAYT was interfering on checkDirty.
- #5429 : High Contrast mode was being mistakenly detected when loading the editor through Dojo's xhrGet.
- #5221 : Range is mangled when making collapsed selection in an empty paragraph.
- #5261 : Config option 'scayt_autoStartup' slow down editor loading.
- #3846 : Google Chrome - No Img properties after inserting.
- #5465 : ShiftEnter=DIV doesn't respect list item when pressing ENTER at end of list item.
- #5454 : After replaced success, the popup window couldn't be closed and a js error occured.
- #4784 : Incorrect cursor position after delete table cells.
- #5149 : [FF] Cursor disappears after maximize when the editor has focus.
- #5220 : DTD now shows tolerance to <style> appear inside content.
- #5440 : Mobile browsers (iPhone, Android...) are marked as incompatible as they don't support editing features.
- #5504 : [IE6/7] 'Paste' dialog will always get opened even when user allows the clipboard access dialog when using 'Paste' button.
- Updated the following language files:
-
-
- CKEditor 3.2
-
- New features:
-
- Several accessibility enhancements:
- #4502 : The editor accessibility is now totally based on WAI-ARIA .
- #5015 : Adding accessibility help dialog plugin.
- #5014 : Keyboard navigation compliance with screen reader suggested keys.
- #4595 : Better accessibility in the Templates dialog.
- #3389 : Esc/Arrow Key now works for closing sub menu.
-
- #4973 : The Style field in the Div Container dialog is now loading the styles defined in the default styleset used by the Styles toolbar combo.
-
-
- Fixed issues:
-
- #5049 : Form Field list command in JAWS incorrectly lists extra fields.
- #5008 : Lock/Unlock ratio buttons in the Image dialog was poorly designed in High Contrast mode.
- #3980 : All labels in dialogs now use <label> instead of <div>.
- #5213 : Reorganization of some entries in the language files to make it more consistent.
- #5199 : In IE, single row toolbars didn't have the bottom padding.
-
-
- CKEditor 3.1.1
-
- New features:
-
- #4399 : Improved support for external file browsers by allowing executing a callback function.
- #4612 : The text of links is now updated if it matches the URL to which it points to.
- #4936 : New localization support for the Welsh language.
-
-
- Fixed issues:
-
- #4272 : Kama skin toolbar was broken in IE+Quirks+RTL.
- #4987 : Changed the url which is called by the Browser Server button in the Link tab of Image Properties dialog.
- #5030 : The CKEDITOR.timestamp wasn't been appended to the skin.js file.
- #4993 : Removed the float style from images when the user selects 'not set' for alignment.
- #4944 : Fixed a bug where nested list structures with inconsequent levels were not being pasted correctly from MS Word.
- #4637 : Table cells' 'nowrap' attribute was not being loaded by the cell property dialog. Thanks to pomu0325.
- #4724 : Using the mouse to insert a link in IE might create incorrect results.
- #4640 : Small optimizations for the fileBrowser plugin.
- #4583 : The "Target Frame Name" field is now visible when target is set to 'frame' only.
- #4863 : Fixing iframedialog's height doesn't stretch to 100% (except IE Quirks).
- #4964 : The BACKSPACE key positioning was not correct in some cases with Firefox.
- #4980 : Setting border, vspace and hspace of images to zero was not working.
- #4773 : The fileBrowser plugin was overwriting onClick functions eventually defined on fileButton elements.
- #4731 : The clipboard plugin was missing a reference to the dialog plugin.
- #5051 : The about plugin was missing a reference to the dialog plugin.
- #5146 : The wsc plugin was missing a reference to the dialog plugin.
- #4632 : The print command will now properly break on the insertion point of page break for printing.
- #4862 : The English (United Kingdom) language file has been renamed to en-gb.js.
- #4618 : Selecting an emoticon or the lock and reset buttons in the image dialog fired the onBeforeUnload event in IE.
- #4678 : It was not possible to set tables' width to empty value.
- #5012 : Fixed dependency issues with the menu plugin.
- #5040 : The editor will not properly ignore font related settings that have extra item separators (semi-colons).
- #4046 : Justify should respect config.enterMode = CKEDITOR.ENTER_BR.
- #4622 : Inserting tables multiple times was corrupting the undo system.
- #4647 : [IE] Selection on an element within positioned container is lost after open context-menu then click one menu item.
- #4683 : Double-quote character in attribute values was not escaped in the editor output.
- #4762 : [IE] Unexpected vertical-scrolling behavior happens whenever focus is moving out of editor in source mode.
- #4772 : Text color was not being applied properly on links.
- #4795 : [IE] Press 'Del' key on horizontal line or table result in error.
- #4824 : [IE] <br/> at the very first table cell breaks the editor selection.
- #4851 : [IE] Delete table rows with context-menu may cause error.
- #4951 : Replacing text with empty string was throwing errors.
- #4963 : Link dialog was not opening properly for e-mail type links.
- #5043 : Removed the possibility of having an unwanted script tag being outputted with the editor contents.
- #3678 : There were issues when editing links inside floating divs with IE.
- #4763 : Pressing ENTER key with text selected was not deleting the text in some situations.
- #5096 : Simple ampersand attribute value doesn't work for more than one occurrence.
- #3494 : Context menu is too narrow in some translations.
- #5005 : Fixed HTML errors in PHP samples.
- #5123 : Fixed broken XHTML in User Interface Languages sample.
- #4893 : Editor now understands table cell inline styles.
- #4611 : Selection around <select> in editor doesn't cause error anymore.
- #4886 : Extra BR tags were being created in the output HTML.
- #4933 : Empty tags with BR were being left in the DOM.
- #5127 : There were errors when removing dialog definition pages through code.
- #4767 : CKEditor was not working when ckeditor_source.js is loaded in the <body> .
- #5062 : Avoided security warning message when loading the wysiwyg area in IE6 under HTTPS.
- #5135 : The TAB key will now behave properly when in Source mode.
- #4988 : It wasn't possible to use forcePasteAsPlainText with Safari on Mac.
- #5095 : Safari on Mac deleted the current selection in the editor when Edit menu was clicked.
- #5140 : In High Contrast mode, arrows were now been displayed for menus with submenus.
- #5163 : The undo system was not working on some specific cases.
- #5162 : The ajax sample was throwing errors when loading data.
- #4999 : The Template dialog was not generating an undo snapshot.
- Updated the following language files:
-
-
- CKEditor 3.1
-
- New features:
-
- #4067 : Introduced the full page editing support (from <html> to </html>).
- #4228 : Introduced the Shared Spaces feature.
- #4379 : Introduced the new powerful pasting system and word cleanup procedure, including enhancements to the paste as plain text feature.
- #2872 : Introduced the new native PHP API, the first standardized server side support.
- #4210 : Added CKEditor plugin for jQuery.
- #2885 : Added 'div' dialog and corresponding context menu options.
- #4574 : Added the table merging tools and corresponding context menu options.
- #4340 : Added the email protection option for link dialog.
- #4463 : Added inline CSS support in all places where custom stylesheet could apply.
- #3881 : Added color dialog for 'more color' option in color buttons.
- #4341 : Added the 'showborder' plugin.
- #4549 : Make the anti-cache query string configurable.
- #4708 : Added the 'htmlEncodeOutput' config option.
- #4342 : Introduced the bodyId and bodyClass settings to specify the id and class. to be used in the editing area at runtime.
- #3401 : Introduced the baseHref setting so it's possible to set the URL to be used to resolve absolute and relative URLs in the contents.
- #4729 : Added support to fake elements for comments.
-
-
- Fixed issues:
-
- #4707 : Fixed invalid link is requested in image preview.
- #4461 : Fixed toolbar separator line along side combo enlarging the toolbar height.
- #4596 : Fixed image re-size lock buttons aren't accessible in high-contrast mode.
- #4676 : Fixed editing tables using table properties dialog overwrites original style values.
- #4714 : Fixed IE6 JavaScript error when editing flash by commit 'Flash' dialog.
- #3905 : Fixed 'wysiwyg' mode causes unauthenticated content warnings over SSL in FF 3.5.
- #4768 : Fixed open context menu in IE throws js error when focus is not inside document.
- #4822 : Fixed applying 'Headers' to existing table does not work in IE.
- #4855 : Fixed toolbar doesn't wrap well for 'v2' skin in all browsers.
- #4882 : Fixed auto detect paste from MS-Word is not working for Safari.
- #4882 : Fixed unexpected margin style left behind on content cleaning up from MS-Word.
- #4896 : Fixed paste nested list from MS-Word with measurement units set to cm is broken.
- #4899 : Fixed unable to undo pre-formatted style.
- #4900 : Fixed ratio-lock inconsistent between browsers.
- #4901 : Fixed unable to edit any link with popup window's features in Firefox.
- #4904 : Fixed when paste happen from dialog, it always throw JavaScript error.
- #4905 : Fixed paste plain text result incorrect when content from dialog.
- #4889 : Fixed unable to undo 'New Page' command after typing inside editor.
- #4892 : Fixed table alignment style is not properly represented by the wrapping div.
- #4918 : Fixed switching mode when maximized is showing background page contents.
-
-
- CKEditor 3.0.2
-
- New features:
-
- #4343 : Added the configuration option 'browserContextMenuOnCtrl' so it's possible to enable the default browser context menu by holding the CTRL key.
-
-
- Fixed issues:
-
- #4552 : Fixed float panel doesn't show up since editor instanced been destroyed once.
- #3918 : Fixed fake object is editable with Image dialog.
- #4053 : Fixed 'Form Properties' missing from context menu when selection collapsed inside form.
- #4401 : Fixed customized by removing 'upload' tab page from 'Link dialog' cause JavaScript error.
- #4477 : Adding missing tag names in object style elements.
- #4567 : Fixed IE throw error when pressing BACKSPACE in source mode.
- #4573 : Fixed 'IgnoreEmptyPargraph' config doesn't work with the config 'entities' is set to 'false'.
- #4614 : Fixed attribute protection fails because of line-break.
- #4546 : Fixed UIColor plugin doesn't work when editor id contains CSS selector preserved keywords.
- #4609 : Fixed flash object is lost when loading data from outside editor.
- #4625 : Fixed editor stays visible in a div with style 'visibility:hidden'.
- #4621 : Fixed clicking below table caused an empty table been generated.
- #3373 : Fixed empty context menu when there's no menu item at all.
- #4473 : Fixed setting rules on the same element tag name throws error.
- #4514 : Fixed press 'Back' button breaks wysiwyg editing mode is Firefox.
- #4542 : Fixed unable to access buttons using tab key in Safari and Opera.
- #4577 : Fixed relative link url is broken after opening 'Link' dialog.
- #4597 : Fixed custom style with same attribute name but different attribute value doesn't work.
- #4651 : Fixed 'Deleted' and 'Inserted' text style is not rendering in wysiwyg mode and is wrong is source mode.
- #4654 : Fixed 'CKEDITOR.config.font_defaultLabel(fontSize_defaultLabel)' is not working.
- #3950 : Fixed table column insertion incorrect when selecting empty cell area.
- #3912 : Fixed UIColor not working in IE when page has more than 30+ editors.
- #4031 : Fixed mouse cursor on toolbar combo has more than 3 shapes.
- #4041 : Fixed open context menu on multiple cells to remove them result in only one removed.
- #4185 : Fixed resize handler effect doesn't affect flash object on output.
- #4196 : Fixed 'Remove Numbered/Bulleted List' on nested list doesn't work well on nested list.
- #4200 : Fixed unable to insert 'password' type filed with attributes.
- #4530 : Fixed context menu couldn't open in Opera.
- #4536 : Fixed keyboard navigation doesn't work at all in IE quirks mode.
- #4584 : Fixed updated link Target field is not updating when updating to certain values.
- #4603 : Fixed unable to disable submenu items in contextmenu.
- #4672 : Fixed unable to redo the insertion of horizontal line.
- #4677 : Fixed 'Tab' key is trapped by hidden dialog elements.
- #4073 : Fixed insert template with replace option could result in empty document.
- #4455 : Fixed unable to start editing when image inside document not loaded.
- #4517 : Fixed 'dialog_backgroundCoverColor' doesn't work on IE6.
- #3165 : Fixed enter key in empty list item before nested one result in collapsed line.
- #4527 : Fixed checkbox generate invalid 'checked' attribute.
- #1659 : Fixed unable to click below content to start editing in IE with 'config.docType' setting to standard compliant.
- #3933 : Fixed extra <br> left at the end of document when the last element is a table.
- #4736 : Fixed PAGE UP and PAGE DOWN keys in standards mode are not working.
- #4725 : Fixed hitting 'enter' before html comment node produces a JavaScript error.
- #4522 : Fixed unable to redo when typing after insert an image with relative url.
- #4594 : Fixed context menu goes off-screen when mouse is at right had side of screen.
- #4673 : Fixed undo not available straight away if shift key is used to enter first character.
- #4690 : Fixed the parsing of nested inline elements.
- #4450 : Fixed selecting multiple table cells before apply justify commands generates spurious paragraph in Firefox.
- #4733 : Fixed dialog opening sometimes hang up Firefox and Safari.
- #4498 : Fixed toolbar collapse button missing tooltip.
- #4738 : Fixed inserting table inside bold/italic/underline generates error on ENTER_BR mode.
- #4246 : Fixed avoid XHTML deprecated attributes for image styling.
- #4543 : Fixed unable to move cursor between table and hr.
- #4764 : Fixed wrong exception message when CKEDITOR.editor.append() to non-existing elements.
- #4521 : Fixed dialog layout in IE6/7 may have scroll-bar and other weird effects.
- #4709 : Fixed inconsistent scroll-bar behavior on IE.
- #4776 : Fixed preview page failed to open when relative URl contains in document.
- #4812 : Fixed 'Esc' key not working on dialogs in Opera.
- Updated the following language files:
-
-
- CKEditor 3.0.1
-
- New features:
-
- #4219 : Added fallback mechanism for config.language.
- #4194 : Added support for using multiple css style sheets within the editor.
-
-
- Fixed issues:
-
- #3898 : Added validation for URL value in Image dialog.
- #3528 : Fixed Context Menu issue when triggered using Shift+F10.
- #4028 : Maximize control's tool tip was wrong once it is maximized.
- #4237 : Toolbar is chopped off in Safari browser 3.x.
- #4241 : Float panels are left on screen while editor is destroyed.
- #4274 : Double click event is incorrect handled in 'divreplace' sample.
- #4354 : Fixed TAB key on toolbar to not focus disabled buttons.
- #3856 : Fixed focus and blur events in source view mode.
- #3438 : Floating panels are off by (-1px, 0px) in RTL mode.
- #3370 : Refactored use of CKEDITOR.env.isCustomDomain().
- #4230 : HC detection caused js error.
- #3978 : Fixed setStyle float on IE7 strict.
- #4262 : Tab and Shift+Tab was not working to cycle through CTRL+SHIFT+F10 context menu in IE.
- #3633 : Default context menu isn't disabled in toolbar, status bar, panels...
- #3897 : Now there is no image previews when the URL is empty in image dialog.
- #4048 : Context submenu was lacking uiColor.
- #3568 : Dialogs now select all text when tabbing to text inputs.
- #3727 : Cell Properties dialog was missing color selection option.
- #3517 : Fixed "Match cyclic" field in Find & Replace dialog.
- #4368 : borderColor table cell attribute haven't worked for none-IE
- #4203 : In IE quirks mode + toolbar collapsed + source mode editing block height was incorrect.
- #4387 : Fixed: right clicking in Kama skin can lead to a javascript error.
- #4397 : Wysiwyg mode caused the host page scroll.
- #4385 : Fixed editor's auto adjusting on DOM structure were confusing the dirty checking mechanism.
- #4397 : Fixed regression of [3816] where turn on design mode was causing Firefox3 to scroll the host page.
- #4254 : Added basic API sample.
- #4107 : Normalize css font-family style text for correct comparision.
- #3664 : Insert block element in empty editor document should not create new paragraph.
- #4037 : 'id' attribute is missing with Flash dialog advanced page.
- #4047 : Delete selected control type element when 'Backspace' is pressed on it.
- #4191 : Fixed: dialog changes confirmation on image dialog appeared even when no changes have been made.
- #4351 : Dash and dot could appear in attribute names.
- #4355 : 'maximize' and 'showblock' commands shouldn't take editor focus.
- #4504 : Fixed 'Enter'/'Esc' key is not working on dialog button.
- #4245 : 'Strange Template' now come with a style attribute for width.
- #4512 : Fixed styles plugin incorrectly adding semicolons to style text.
- #3855 : Fixed loading unminified _source files when ckeditor_source.js is used.
- #3717 : Dialog settings defaults can now be overridden in-page through the CKEDITOR.config object.
- #4481 : The 'stylesCombo_stylesSet' configuration entry didn't work for full URLs.
- #4480 : Fixed scope attribute in th.
- #4467 : Fixed bug to use custom icon in context menus. Thanks to george.
- #4190 : Fixed select field dialog layout in Safari.
- #4518 : Fixed unable to open dialog without editor focus in IE.
- #4519 : Fixed maximize without editor focus throw error in IE.
- Updated the following language files:
-
-
- CKEditor 3.0
-
- New features:
-
- #3188 : Introduce
- <pre> formatting feature when converting from other blocks.
- #4445 : editor::setData now support an optional callback parameter.
-
-
- Fixed issues:
-
- #2856 : Fixed problem with inches in Paste From Word plugin.
- #3929 : Using Paste dialog,
- the text is pasted into current selection
- #3920 : Mouse cursor over characters in
- Special Character dialog now is correct
- #3882 : Fixed an issue
- with PasteFromWord dialog in which default values was ignored
- #3859 : Fixed Flash dialog layout in Webkit
- #3852 : Disabled textarea resizing in dialogs
- #3831 : The attempt to remove the contextmenu plugin
- will not anymore break the editor
- #3781 : Colorbutton is now disabled in 'source' mode
- #3848 : Fixed an issue with Webkit in witch
- elements in the Image and Link dialogs had wrong dimensions.
- #3808 : Fixed UI Color Picker dialog size in example page.
- #3658 : Editor had horizontal scrollbar in IE6.
- #3819 : The cursor was not visible
- when applying style to collapsed selections in Firefox 2.
- #3809 : Fixed beam cursor
- when mouse cursor is over text-only buttons in IE.
- #3815 : Fixed an issue
- with the form dialog in which the "enctype" attribute is outputted as "encoding".
- #3785 : Fixed an issue
- in CKEDITOR.tools.htmlEncode() which incorrectly outputs in IE8.
- #3820 : Fixed an issue in
- bullet list command in which a list created at the bottom of another gets merged to the top.
-
- #3830 : Table cell properties dialog
- doesn't apply to all selected cells.
- #3835 : Element path is not refreshed
- after click on 'newpage'; and safari is not putting focus on document also.
-
- #3821 : Fixed an issue with JAWS in which
- toolbar items are read inconsistently between virtual cursor modes.
- #3789 : The "src" attribute
- was getting duplicated in some situations.
- #3591 : Protecting flash related elements
- including '<object>', '<embed>' and '<param>'.
-
- #3759 : Fixed CKEDITOR.dom.element::scrollIntoView
- logic bug which scroll even element is inside viewport.
-
- #3773 : Fixed remove list will merge lines.
-
- #3829 : Fixed remove empty link on output data.
- #3730 : Indent is performing on the whole
- block instead of selected lines in enterMode = BR.
- #3844 : Fixed UndoManager register keydown on obsoleted document
- #3805 : Enabled SCAYT plugin for IE.
- #3834 : Context menu on table caption was incorrect.
- #3812 : Fixed an issue in which the editor
- may show up empty or uneditable in IE7, 8 and Firefox 3.
- #3825 : Fixed JS error when opening spellingcheck.
- #3862 : Fixed html parser infinite loop on certain malformed
- source code.
- #3639 : Button size was inconsistent.
- #3874 : Paste as plain text in Safari loosing lines.
- #3849 : Fixed IE8 crashes when applying lists and indenting.
- #3876 : Changed dialog checkbox and radio labels to explicit labels.
- #3843 : Fixed context submenu position in IE 6 & 7 RTL.
- #3864 : [FF]Document is not editable after inserting element on a fresh page.
- #3883 : Fixed removing inline style logic incorrect on Firefox2.
- #3884 : Empty "href" attribute was duplicated on output data.
- #3858 : Fixed the issue where toolbars
- break up in IE6 and IE7 after the browser is resized.
- #3868 : [chrome] SCAYT toolbar options was in reversed order.
- #3875 : Fixed an issue in Safari where
- table row/column/cell menus are not useable when table cells are selected.
- #3896 : The editing area was
- flashing when switching forth and back to source view.
- #3894 : Fixed an issue where editor failed to initialize when using the on-demand loading way.
- #3903 : Color button plugin doesn't read config entry from editor instance correctly.
- #3801 : Comments at the start of the document was lost in IE.
- #3871 : Unable to redo when undos to the front of snapshots stack.
- #3909 : Move focus from editor into a text input control is broken.
- #3870 : The empty paragraph
- desappears when hitting ENTER after "New Page".
- #3887 : Fixed an issue in which the create
- list command may leak outside of a selected table cell and into the rest of document.
- #3916 : Fixed maximize does not enlarge editor width when width is set.
- #3879 : [webkit] Color button panel had incorrect size on first open.
- #3839 : Update Scayt plugin to reflect the latest change from SpellChecker.net.
- #3742 : Fixed wrong dialog layout for dialogs without tab bar in IE RTL mode .
- #3671 : Fixed body fixing should be applied to the real type under fake elements.
- #3836 : Fixed remove list in enterMode=BR will merge sibling text to one line.
- #3949 : Fixed enterKey within pre-formatted text introduce wrong line-break.
- #3878 : Whenever possible,
- dialogs will not present scrollbars if the content is too big for its standard
- size.
- #3782 : Remove empty list in table cell result in collapsed cell.
- Updated the following language files:
- #3984 : [IE]The pre-formatted style is generating error.
- #3946 : Fixed unable to hide contextmenu.
- #3956 : Fixed About dialog in Source Mode for IE.
- #3953 : Fixed keystroke for close Paste dialog.
- #3951 : Reset size and lock ratio options were not accessible in Image dialog.
- #3921 : Fixed Container scroll issue on IE7.
- #3940 : Fixed list operation doesn't stop at table.
- #3891 : [IE] Fixed 'automatic' font color doesn't work.
- #3972 : Fixed unable to remove a single empty list in document in Firefox with enterMode=BR.
- #3973 : Fixed list creation error at the end of document.
- #3959 : Pasting styled text from word result in content lost.
- #3793 : Combined images into sprites.
- #3783 : Fixed indenting command in table cells create collapsed paragraph.
- #3968 : About dialog layout was broken with IE+Standards+RTL.
- #3991 : In IE quirks, text was not visible in v2 and office2003 skins.
- #3983 : In IE, we'll now
- silently ignore wrong toolbar definition settings which have extra commas being
- left around.
- Fixed the following test cases:
- #3992 : core/ckeditor2.html
- #4138 : core/plugins.html
- #3801 : plugins/htmldataprocessor/htmldataprocessor.html
-
- #3989 : Host page horizontal scrolling a lot when on having righ-to-left direction.
- #4001 : Create link around existing image result incorrect.
- #3988 : Destroy editor on form submit event cause error.
- #3994 : Insert horizontal line at end of document cause error.
- #4074 : Indent error with 'indentClasses' config specified.
- #4057 : Fixed anchor is lost after switch between editing modes.
- #3644 : Image dialog was missin radio lock.
- #4014 : Firefox2 had no dialog button backgrounds.
- #4018 : Firefox2 had no richcombo text visible.
- #4035 : [IE6] Paste dialog size was too small.
- #4049 : Kama skin was too wide with config.width.
- The following released files now doesn't require the _source folder
- #4086 : _samples/ui_languages.html
- #4093 : _tests/core/dom/document.html
- #4094 : Smiley plugin file
- #4097 : No undo/redo support for fontColor and backgroundColor buttons.
-
- #4085 : Paste and Paste from Word dialogs were not well styled in IE+RTL.
- #3982 : Fixed enterKey on empty list item result in weird dom structure.
- #4101 : Now it is possible to close dialog before gets focus.
- #4075 : [IE6/7]Fixed apply custom inline style with "class" attribute failed.
- #4087 : [Firefox]Fixed extra blocks created on create list when full document selected.
- #4097 : No undo/redo support for fontColor and backgroundColor buttons.
- #4111 : Fixed apply block style after inline style applied on full document error.
- #3622 : Fixed shift enter with selection not deleting highlighted text.
- #4092 : [IE6] Close button was missing for dialog without multiple tabs.
- #4003 : Markup on the image dialog was disrupted when removing the border input.
- #4096 : Editor content area was pushed down in IE RTL quirks.
- #4112 : [FF] Paste dialog had scrollbars in quirks.
- #4118 : Dialog dragging was
- occasionally behaving strangely .
- #4077 : The toolbar combos
- were rendering incorrectly in some languages, like Chinese.
- #3622 : The toolbar in the v2
- skin was wrapping improperly in some languages.
- #4119 : Unable to edit image link with image dialog.
- #4117 : Fixed dialog error when transforming image into button.
- #4058 : [FF] wysiwyg mode is sometimes not been activated.
- #4114 : [IE] RTE + IE6/IE7 Quirks = dialog mispositoned.
- #4123 : Some dialog buttons were broken in IE7 quirks.
- #4122 : [IE] The image dialog
- was being rendered improperly when loading an image with long URL.
- #4144 : Fixed the white-spaces at the end of <pre> is incorrectly removed.
- #4143 : Fixed element id is lost when extracting contents from the range.
- #4007 : [IE] Source area overflow from editor chrome.
- #4145 : Fixed the on demand
- ("basic") loading model of the editor.
- #4139 : Fixed list plugin regression of [3903].
- #4147 : Unify style text normalization logic when comparing styles.
- #4150 : Fixed enlarge list result incorrect at the inner boundary of block.
- #4164 : Now it is possible to paste text
- in Source mode even if forcePasteAsPlainText = true.
- #4129 : [FF]Unable to remove list with Ctrl-A.
- #4172 : [Safari] The trailing
- <br> was not been always added to blank lines ending with .
- #4178 : It's now possible to
- copy and paste Flash content among different editor instances.
- #4193 : Automatic font color produced empty span on Firefox 3.5.
- #4186 : [FF] Fixed First open float panel cause host page scrollbar blinking.
- #4227 : Fixed destroy editor instance created on textarea which is not within form cause error.
- #4240 : Fixed editor name containing hyphen break editor completely.
- #3828 : Malformed nested list is now corrected by the parser.
-
-
- CKEditor 3.0 RC
-
- Changelog starts at this release.
-
-
-
diff --git a/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:
-
- 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.
- Extract (decompress) the downloaded file into the root of your
- web site.
-
-
- 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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
- Click the buttons to create and remove a CKEditor instance.
-
-
-
-
-
-
-
-
-
- Edited Contents:
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
-
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:
-
-
- Adding dialog window tabs – "My Tab" in the "Link" dialog window.
- Removing a dialog window tab – "Target" tab from the "Link" dialog window.
- Adding dialog window fields – "My Custom Field" in the "Link" dialog window.
- Removing dialog window fields – "Link Type" and "Browse Server" in the "Link"
- dialog window.
- Setting default values for dialog window fields – "URL" field in the
- "Link" dialog window.
- Creating a custom dialog window – "My Dialog" dialog window opened with the "My Dialog" toolbar button.
-
-
-For details on how to create this setup check the source code of this sample page.
-
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
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
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- Output
-
-
- Editor 1:
-
-<%
- ' 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
-%>
-
- Editor 2:
-
-<%
-' 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
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- Output
-
-
- Editor 1:
-
-<%
-
-''
- ' 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
-%>
-
- Editor 2:
-
-<%
-' 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:
-
-
-
- Create an instance of the CKEditor class:
-dim editor
-set editor = New CKEditor
-
-
- Set the path to the folder where CKEditor has been installed, by default it will use /ckeditor/
- editor.basePath = "../../"
-
-
- Now use one of the three main methods to create the CKEditor instances:
-
-
-
-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
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- Output
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
- <%
- ' 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
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- Output
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
- Editor 2:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
- <%
- ' 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
-
-
-
-
-
- Field Name
- Value
-
-
- <%
- Dim sForm
- For Each sForm in Request.Form
- %>
-
- <%=Server.HTMLEncode( sForm )%>
- <%=Server.HTMLEncode( Request.Form(sForm) )%>
-
- <% Next %>
-
-
-
-
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
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- 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
-
-
-
-
-
- Field Name
- Value
-
-
- $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 );
-?>
-
-
-
-
-
-
-
-
-
diff --git a/_samples/assets/output_for_flash.fla b/_samples/assets/output_for_flash.fla
deleted file mode 100644
index 27e68cc..0000000
Binary files a/_samples/assets/output_for_flash.fla and /dev/null differ
diff --git a/_samples/assets/output_for_flash.swf b/_samples/assets/output_for_flash.swf
deleted file mode 100644
index dbe17b6..0000000
Binary files a/_samples/assets/output_for_flash.swf and /dev/null differ
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- CKEditor using the autogrow
plugin with its default configuration:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
- CKEditor using the autogrow
plugin with maximum height set to 400 pixels:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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
- });
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- This is some [b]sample text[/b]. You are using [url=http://ckeditor.com/]CKEditor[/url].
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- 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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- When Enter is pressed:
-
- Create a new <P> (recommended)
- Create a new <DIV>
- Break the line with a <BR>
-
-
-
- When Shift+Enter is pressed:
-
- Create a new <P>
- Create a new <DIV>
- Break the line with a <BR> (recommended)
-
-
-
-
-
-
- This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- CKEditor using the docprops
plugin and working in the Full Page mode:
- <html><head><title>CKEditor Sample</title></head><body><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></body></html>
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
-
-
-
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.
- });
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <b>sample text</b>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
- });
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <span class="Bold">sample text</span>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- Editor 1:
-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 2:
-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);
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- Editor 1:
-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 2:
-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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
- 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();
-?>
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
- Editor 2:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
- 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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
-
- Editor 1:
-
-
- 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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- CKEditor using the placeholder
plugin with its default configuration:
- <p>This is a [[sample placeholder]]. You are using <a href="http://ckeditor.com/">CKEditor</a>. </p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- Editor 1:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
- Editor 2:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
-
-
- Editor 1 (uses the shared toolbar and elements path):
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
- Editor 2 (uses the shared toolbar and elements path):
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
- Editor 3 (uses the shared toolbar only):
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
- Editor 4 (no shared spaces):
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- "Kama" skin
- The default skin used in CKEditor. No additional configuration is required.
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
- "Office 2003" skin
- Use the following code to configure a CKEditor instance to use the "Office 2003" skin.
-CKEDITOR.replace( 'textarea_id ',
- {
- skin : 'office2003'
- });
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
- "V2" skin
- Use the following code to configure a CKEditor instance to use the "V2" skin.
-CKEDITOR.replace( 'textarea_id ',
- {
- skin : 'v2'
- });
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
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.
-
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- CKEditor using the stylesheetparser
plugin with its default configuration:
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
-
- CKEditor using the tableresize
plugin:
-
-<table style="width: 500px;">
- <caption>
- A sample table</caption>
- <tbody>
- <tr>
- <td>
- Column 1</td>
- <td>
- Column 2</td>
- </tr>
- <tr>
- <td>
- You can resize a table column.</td>
- <td>
- Hover your mouse over its border.</td>
- </tr>
- <tr>
- <td>
- Watch the cursor change.</td>
- <td>
- Now click and drag to resize.</td>
- </tr>
- </tbody>
-</table>
-
-
-
-
-
-
-
-
-
-
-
-
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' ] ]
- });
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
- 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.
-
-
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
- The second editor instance includes the UI Color Picker toolbar button. The
- default UI color was defined, so the skin color is not used.
-
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
- CKEditor requires JavaScript to run . In a browser with no JavaScript
- support, like yours, you should still see the contents (HTML data) and you should
- be able to edit it normally, without a rich editor interface.
-
-
-
-
-
- Available languages ( languages!):
-
-
- (You may see strange characters if your system does not
- support the selected language)
-
-
- <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
-
-
-
-
-
-
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( '', tagName, '>' );
- },
-
- /**
- * 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 .
- 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 element, spaces should be touched differently.
- inTextarea = false,
- // Indicate we're inside a element, spaces should be touched differently.
- inPre = false;
-
- function checkPending( newTagName )
- {
- var pendingBRsSent;
-
- if ( pendingInline.length > 0 )
- {
- for ( var i = 0 ; i < pendingInline.length ; i++ )
- {
- var pendingElement = pendingInline[ i ],
- pendingName = pendingElement.name,
- pendingDtd = CKEDITOR.dtd[ pendingName ],
- currentDtd = currentNode.name && CKEDITOR.dtd[ currentNode.name ];
-
- if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) )
- {
- if ( !pendingBRsSent )
- {
- sendPendingBRs();
- pendingBRsSent = 1;
- }
-
- // Get a clone for the pending element.
- pendingElement = pendingElement.clone();
-
- // Add it to the current node and make it the current,
- // so the new element will be added inside of it.
- pendingElement.parent = currentNode;
- currentNode = pendingElement;
-
- // Remove the pending element (back the index by one
- // to properly process the next entry).
- pendingInline.splice( i, 1 );
- i--;
- }
- else
- {
- // Some element of the same type cannot be nested, flat them,
- // e.g. foo bar . (#7894)
- if ( pendingName == currentNode.name )
- addElement( currentNode, currentNode.parent, 1 ), i--;
- }
- }
- }
- }
-
- function sendPendingBRs()
- {
- while ( pendingBRs.length )
- currentNode.add( pendingBRs.shift() );
- }
-
- /*
- * Beside of simply append specified element to target, this function also takes
- * care of other dirty lifts like forcing block in body, trimming spaces at
- * the block boundaries etc.
- *
- * @param {Element} element The element to be added as the last child of {@link target}.
- * @param {Element} target The parent element to relieve the new node.
- * @param {Boolean} [moveCurrent=false] Don't change the "currentNode" global unless
- * there's a return point node specified on the element, otherwise move current onto {@link target} node.
- */
- function addElement( element, target, moveCurrent )
- {
- // Ignore any element that has already been added.
- if ( element.previous !== undefined )
- return;
-
- target = target || currentNode || fragment;
-
- // Current element might be mangled by fix body below,
- // save it for restore later.
- var savedCurrent = currentNode;
-
- // If the target is the fragment and this inline element can't go inside
- // body (if fixForBody).
- if ( fixForBody && ( !target.type || target.name == 'body' ) )
- {
- var elementName, realElementName;
- if ( element.attributes
- && ( realElementName =
- element.attributes[ 'data-cke-real-element-type' ] ) )
- elementName = realElementName;
- else
- elementName = element.name;
-
- if ( elementName && !( elementName in CKEDITOR.dtd.$body || elementName == 'body' || element.isOrphan ) )
- {
- // Create a in the fragment.
- currentNode = target;
- parser.onTagOpen( fixForBody, {} );
-
- // The new target now is the
.
- element.returnPoint = target = currentNode;
- }
- }
-
- // Rtrim empty spaces on block end boundary. (#3585)
- if ( element._.isBlockLike
- && element.name != 'pre' && element.name != 'textarea' )
- {
-
- var length = element.children.length,
- lastChild = element.children[ length - 1 ],
- text;
- if ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT )
- {
- if ( !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) )
- element.children.length = length -1;
- else
- lastChild.value = text;
- }
- }
-
- target.add( element );
-
- if ( element.name == 'pre' )
- inPre = false;
-
- if ( element.name == 'textarea' )
- inTextarea = false;
-
-
- if ( element.returnPoint )
- {
- currentNode = element.returnPoint;
- delete element.returnPoint;
- }
- else
- currentNode = moveCurrent ? target : savedCurrent;
- }
-
- parser.onTagOpen = function( tagName, attributes, selfClosing, optionalClose )
- {
- var element = new CKEDITOR.htmlParser.element( tagName, attributes );
-
- // "isEmpty" will be always "false" for unknown elements, so we
- // must force it if the parser has identified it as a selfClosing tag.
- if ( element.isUnknown && selfClosing )
- element.isEmpty = true;
-
- // Check for optional closed elements, including browser quirks and manually opened blocks.
- element.isOptionalClose = tagName in optionalCloseTags || optionalClose;
-
- // This is a tag to be removed if empty, so do not add it immediately.
- if ( isRemoveEmpty( element ) )
- {
- pendingInline.push( element );
- return;
- }
- else if ( tagName == 'pre' )
- inPre = true;
- else if ( tagName == 'br' && inPre )
- {
- currentNode.add( new CKEDITOR.htmlParser.text( '\n' ) );
- return;
- }
- else if ( tagName == 'textarea' )
- inTextarea = true;
-
- if ( tagName == 'br' )
- {
- pendingBRs.push( element );
- return;
- }
-
- while( 1 )
- {
- var currentName = currentNode.name;
-
- var currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ]
- || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) )
- : rootDtd;
-
- // If the element cannot be child of the current element.
- if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] )
- {
- // Current node doesn't have a close tag, time for a close
- // as this element isn't fit in. (#7497)
- if ( currentNode.isOptionalClose )
- parser.onTagClose( currentName );
- // Fixing malformed nested lists by moving it into a previous list item. (#3828)
- else if ( tagName in listBlocks
- && currentName in listBlocks )
- {
- var children = currentNode.children,
- lastChild = children[ children.length - 1 ];
-
- // Establish the list item if it's not existed.
- if ( !( lastChild && lastChild.name == 'li' ) )
- addElement( ( lastChild = new CKEDITOR.htmlParser.element( 'li' ) ), currentNode );
-
- !element.returnPoint && ( element.returnPoint = currentNode );
- currentNode = lastChild;
- }
- // Establish new list root for orphan list items.
- else if ( tagName in CKEDITOR.dtd.$listItem && currentName != tagName )
- parser.onTagOpen( tagName == 'li' ? 'ul' : 'dl', {}, 0, 1 );
- // We're inside a structural block like table and list, AND the incoming element
- // is not of the same type (e.g.
td1 td2 ), we simply add this new one before it,
- // and most importantly, return back to here once this element is added,
- // e.g.
- else if ( currentName in nonBreakingBlocks && currentName != tagName )
- {
- !element.returnPoint && ( element.returnPoint = currentNode );
- currentNode = currentNode.parent;
- }
- else
- {
- // The current element is an inline element, which
- // need to be continued even after the close, so put
- // it in the pending list.
- if ( currentName in CKEDITOR.dtd.$inline )
- pendingInline.unshift( currentNode );
-
- // The most common case where we just need to close the
- // current one and append the new one to the parent.
- if ( currentNode.parent )
- addElement( currentNode, currentNode.parent, 1 );
- // We've tried our best to fix the embarrassment here, while
- // this element still doesn't find it's parent, mark it as
- // orphan and show our tolerance to it.
- else
- {
- element.isOrphan = 1;
- break;
- }
- }
- }
- else
- break;
- }
-
- checkPending( tagName );
- sendPendingBRs();
-
- element.parent = currentNode;
-
- if ( element.isEmpty )
- addElement( element );
- else
- currentNode = element;
- };
-
- parser.onTagClose = function( tagName )
- {
- // Check if there is any pending tag to be closed.
- for ( var i = pendingInline.length - 1 ; i >= 0 ; i-- )
- {
- // If found, just remove it from the list.
- if ( tagName == pendingInline[ i ].name )
- {
- pendingInline.splice( i, 1 );
- return;
- }
- }
-
- var pendingAdd = [],
- newPendingInline = [],
- candidate = currentNode;
-
- while ( candidate != fragment && candidate.name != tagName )
- {
- // If this is an inline element, add it to the pending list, if we're
- // really closing one of the parents element later, they will continue
- // after it.
- if ( !candidate._.isBlockLike )
- newPendingInline.unshift( candidate );
-
- // This node should be added to it's parent at this point. But,
- // it should happen only if the closing tag is really closing
- // one of the nodes. So, for now, we just cache it.
- pendingAdd.push( candidate );
-
- // Make sure return point is properly restored.
- candidate = candidate.returnPoint || candidate.parent;
- }
-
- if ( candidate != fragment )
- {
- // Add all elements that have been found in the above loop.
- for ( i = 0 ; i < pendingAdd.length ; i++ )
- {
- var node = pendingAdd[ i ];
- addElement( node, node.parent );
- }
-
- currentNode = candidate;
-
- if ( candidate._.isBlockLike )
- sendPendingBRs();
-
- addElement( candidate, candidate.parent );
-
- // The parent should start receiving new nodes now, except if
- // addElement changed the currentNode.
- if ( candidate == currentNode )
- currentNode = currentNode.parent;
-
- pendingInline = pendingInline.concat( newPendingInline );
- }
-
- if ( tagName == 'body' )
- fixForBody = false;
- };
-
- parser.onText = function( text )
- {
- // Trim empty spaces at beginning of text contents except and .
- if ( ( !currentNode._.hasInlineStarted || pendingBRs.length ) && !inPre && !inTextarea )
- {
- text = CKEDITOR.tools.ltrim( text );
-
- if ( text.length === 0 )
- return;
- }
-
- var currentName = currentNode.name,
- currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ]
- || ( currentNode._.isBlockLike ?
- CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd;
-
- // Fix orphan text in list/table. (#8540) (#8870)
- if ( !inTextarea &&
- !currentDtd [ '#' ] &&
- currentName in nonBreakingBlocks )
- {
- parser.onTagOpen( currentName in listBlocks ? 'li' :
- currentName == 'dl' ? 'dd' :
- currentName == 'table' ? 'tr' :
- currentName == 'tr' ? 'td' : '' );
- parser.onText( text );
- return;
- }
-
- sendPendingBRs();
- checkPending();
-
- if ( fixForBody
- && ( !currentNode.type || currentNode.name == 'body' )
- && CKEDITOR.tools.trim( text ) )
- {
- this.onTagOpen( fixForBody, {}, 0, 1 );
- }
-
- // Shrinking consequential spaces into one single for all elements
- // text contents.
- if ( !inPre && !inTextarea )
- text = text.replace( /[\t\r\n ]{2,}|[\t\r\n]/g, ' ' );
-
- currentNode.add( new CKEDITOR.htmlParser.text( text ) );
- };
-
- parser.onCDATA = function( cdata )
- {
- currentNode.add( new CKEDITOR.htmlParser.cdata( cdata ) );
- };
-
- parser.onComment = function( comment )
- {
- sendPendingBRs();
- checkPending();
- currentNode.add( new CKEDITOR.htmlParser.comment( comment ) );
- };
-
- // Parse it.
- parser.parse( fragmentHtml );
-
- // Send all pending BRs except one, which we consider a unwanted bogus. (#5293)
- sendPendingBRs( !CKEDITOR.env.ie && 1 );
-
- // Close all pending nodes, make sure return point is properly restored.
- while ( currentNode != fragment )
- addElement( currentNode, currentNode.parent, 1 );
-
- return fragment;
- };
-
- CKEDITOR.htmlParser.fragment.prototype =
- {
- /**
- * Adds a node to this fragment.
- * @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}.
- * @param {Number} [index] From where the insertion happens.
- * @example
- */
- add : function( node, index )
- {
- isNaN( index ) && ( index = this.children.length );
-
- var previous = index > 0 ? this.children[ index - 1 ] : null;
- if ( previous )
- {
- // If the block to be appended is following text, trim spaces at
- // the right of it.
- if ( node._.isBlockLike && previous.type == CKEDITOR.NODE_TEXT )
- {
- previous.value = CKEDITOR.tools.rtrim( previous.value );
-
- // If we have completely cleared the previous node.
- if ( previous.value.length === 0 )
- {
- // Remove it from the list and add the node again.
- this.children.pop();
- this.add( node );
- return;
- }
- }
-
- previous.next = node;
- }
-
- node.previous = previous;
- node.parent = this;
-
- this.children.splice( index, 0, node );
-
- this._.hasInlineStarted = node.type == CKEDITOR.NODE_TEXT || ( node.type == CKEDITOR.NODE_ELEMENT && !node._.isBlockLike );
- },
-
- /**
- * Writes the fragment HTML to a CKEDITOR.htmlWriter.
- * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
- * @example
- * var writer = new CKEDITOR.htmlWriter();
- * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<P><B>Example' );
- * fragment.writeHtml( writer )
- * alert( writer.getHtml() ); "<p><b>Example</b></p>"
- */
- writeHtml : function( writer, filter )
- {
- var isChildrenFiltered;
- this.filterChildren = function()
- {
- var writer = new CKEDITOR.htmlParser.basicWriter();
- this.writeChildrenHtml.call( this, writer, filter, true );
- var html = writer.getHtml();
- this.children = new CKEDITOR.htmlParser.fragment.fromHtml( html ).children;
- isChildrenFiltered = 1;
- };
-
- // Filtering the root fragment before anything else.
- !this.name && filter && filter.onFragment( this );
-
- this.writeChildrenHtml( writer, isChildrenFiltered ? null : filter );
- },
-
- writeChildrenHtml : function( writer, filter )
- {
- for ( var i = 0 ; i < this.children.length ; i++ )
- this.children[i].writeHtml( writer, filter );
- }
- };
-})();
diff --git a/_source/core/htmlparser/text.js b/_source/core/htmlparser/text.js
deleted file mode 100644
index 0866ee3..0000000
--- a/_source/core/htmlparser/text.js
+++ /dev/null
@@ -1,53 +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.text = function( value )
- {
- /**
- * The text value.
- * @type String
- * @example
- */
- this.value = value;
-
- /** @private */
- this._ =
- {
- isBlockLike : false
- };
- };
-
- CKEDITOR.htmlParser.text.prototype =
- {
- /**
- * The node type. This is a constant value set to {@link CKEDITOR.NODE_TEXT}.
- * @type Number
- * @example
- */
- type : CKEDITOR.NODE_TEXT,
-
- /**
- * Writes the HTML representation of this text to a CKEDITOR.htmlWriter.
- * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
- * @example
- */
- writeHtml : function( writer, filter )
- {
- var text = this.value;
-
- if ( filter && !( text = filter.onText( text, this ) ) )
- return;
-
- writer.text( text );
- }
- };
-})();
diff --git a/_source/core/lang.js b/_source/core/lang.js
deleted file mode 100644
index 46fe129..0000000
--- a/_source/core/lang.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
-For licensing, see LICENSE.html or http://ckeditor.com/license
-*/
-
-(function()
-{
- var loadedLangs = {};
-
- /**
- * @namespace Holds language related functions.
- */
- CKEDITOR.lang =
- {
- /**
- * The list of languages available in the editor core.
- * @type Object
- * @example
- * alert( CKEDITOR.lang.en ); // "true"
- */
- languages :
- {
- 'af' : 1,
- 'ar' : 1,
- 'bg' : 1,
- 'bn' : 1,
- 'bs' : 1,
- 'ca' : 1,
- 'cs' : 1,
- 'cy' : 1,
- 'da' : 1,
- 'de' : 1,
- 'el' : 1,
- 'en-au' : 1,
- 'en-ca' : 1,
- 'en-gb' : 1,
- 'en' : 1,
- 'eo' : 1,
- 'es' : 1,
- 'et' : 1,
- 'eu' : 1,
- 'fa' : 1,
- 'fi' : 1,
- 'fo' : 1,
- 'fr-ca' : 1,
- 'fr' : 1,
- 'gl' : 1,
- 'gu' : 1,
- 'he' : 1,
- 'hi' : 1,
- 'hr' : 1,
- 'hu' : 1,
- 'is' : 1,
- 'it' : 1,
- 'ja' : 1,
- 'ka' : 1,
- 'km' : 1,
- 'ko' : 1,
- 'ku' : 1,
- 'lt' : 1,
- 'lv' : 1,
- 'mn' : 1,
- 'ms' : 1,
- 'nb' : 1,
- 'nl' : 1,
- 'no' : 1,
- 'pl' : 1,
- 'pt-br' : 1,
- 'pt' : 1,
- 'ro' : 1,
- 'ru' : 1,
- 'sk' : 1,
- 'sl' : 1,
- 'sr-latn' : 1,
- 'sr' : 1,
- 'sv' : 1,
- 'th' : 1,
- 'tr' : 1,
- 'ug' : 1,
- 'uk' : 1,
- 'vi' : 1,
- 'zh-cn' : 1,
- 'zh' : 1
- },
-
- /**
- * Loads a specific language file, or auto detect it. A callback is
- * then called when the file gets loaded.
- * @param {String} languageCode The code of the language file to be
- * loaded. If null or empty, autodetection will be performed. The
- * same happens if the language is not supported.
- * @param {String} defaultLanguage The language to be used if
- * languageCode is not supported or if the autodetection fails.
- * @param {Function} callback A function to be called once the
- * language file is loaded. Two parameters are passed to this
- * function: the language code and the loaded language entries.
- * @example
- */
- load : function( languageCode, defaultLanguage, callback )
- {
- // If no languageCode - fallback to browser or default.
- // If languageCode - fallback to no-localized version or default.
- if ( !languageCode || !CKEDITOR.lang.languages[ languageCode ] )
- languageCode = this.detect( defaultLanguage, languageCode );
-
- if ( !this[ languageCode ] )
- {
- CKEDITOR.scriptLoader.load( CKEDITOR.getUrl(
- '_source/' + // @Packager.RemoveLine
- 'lang/' + languageCode + '.js' ),
- function()
- {
- callback( languageCode, this[ languageCode ] );
- }
- , this );
- }
- else
- callback( languageCode, this[ languageCode ] );
- },
-
- /**
- * Returns the language that best fit the user language. For example,
- * suppose that the user language is "pt-br". If this language is
- * supported by the editor, it is returned. Otherwise, if only "pt" is
- * supported, it is returned instead. If none of the previous are
- * supported, a default language is then returned.
- * @param {String} defaultLanguage The default language to be returned
- * if the user language is not supported.
- * @param {String} [probeLanguage] A language code to try to use,
- * instead of the browser based autodetection.
- * @returns {String} The detected language code.
- * @example
- * alert( CKEDITOR.lang.detect( 'en' ) ); // e.g., in a German browser: "de"
- */
- detect : function( defaultLanguage, probeLanguage )
- {
- var languages = this.languages;
- probeLanguage = probeLanguage || navigator.userLanguage || navigator.language || defaultLanguage;
-
- var parts = probeLanguage
- .toLowerCase()
- .match( /([a-z]+)(?:-([a-z]+))?/ ),
- lang = parts[1],
- locale = parts[2];
-
- if ( languages[ lang + '-' + locale ] )
- lang = lang + '-' + locale;
- else if ( !languages[ lang ] )
- lang = null;
-
- CKEDITOR.lang.detect = lang ?
- function() { return lang; } :
- function( defaultLanguage ) { return defaultLanguage; };
-
- return lang || defaultLanguage;
- }
- };
-
-})();
diff --git a/_source/core/loader.js b/_source/core/loader.js
deleted file mode 100644
index 5d42ebf..0000000
--- a/_source/core/loader.js
+++ /dev/null
@@ -1,240 +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.loader} objects, which is used to
- * load core scripts and their dependencies from _source.
- */
-
-if ( typeof CKEDITOR == 'undefined' )
- CKEDITOR = {};
-
-if ( !CKEDITOR.loader )
-{
- /**
- * Load core scripts and their dependencies from _source.
- * @namespace
- * @example
- */
- CKEDITOR.loader = (function()
- {
- // Table of script names and their dependencies.
- var scripts =
- {
- 'core/_bootstrap' : [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptloader', 'core/tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'core/dom/comment', 'core/dom/elementpath', 'core/dom/text', 'core/dom/rangelist' ],
- 'core/ckeditor' : [ 'core/ckeditor_basic', 'core/dom', 'core/dtd', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/htmlparser/filter', 'core/htmlparser/basicwriter', 'core/tools' ],
- 'core/ckeditor_base' : [],
- 'core/ckeditor_basic' : [ 'core/editor_basic', 'core/env', 'core/event' ],
- 'core/command' : [],
- 'core/config' : [ 'core/ckeditor_base' ],
- 'core/dom' : [],
- 'core/dom/comment' : [ 'core/dom/node' ],
- 'core/dom/document' : [ 'core/dom', 'core/dom/domobject', 'core/dom/window' ],
- 'core/dom/documentfragment' : [ 'core/dom/element' ],
- 'core/dom/element' : [ 'core/dom', 'core/dom/document', 'core/dom/domobject', 'core/dom/node', 'core/dom/nodelist', 'core/tools' ],
- 'core/dom/elementpath' : [ 'core/dom/element' ],
- 'core/dom/event' : [],
- 'core/dom/node' : [ 'core/dom/domobject', 'core/tools' ],
- 'core/dom/nodelist' : [ 'core/dom/node' ],
- 'core/dom/domobject' : [ 'core/dom/event' ],
- 'core/dom/range' : [ 'core/dom/document', 'core/dom/documentfragment', 'core/dom/element', 'core/dom/walker' ],
- 'core/dom/rangelist' : [ 'core/dom/range' ],
- 'core/dom/text' : [ 'core/dom/node', 'core/dom/domobject' ],
- 'core/dom/walker' : [ 'core/dom/node' ],
- 'core/dom/window' : [ 'core/dom/domobject' ],
- 'core/dtd' : [ 'core/tools' ],
- 'core/editor' : [ 'core/command', 'core/config', 'core/editor_basic', 'core/focusmanager', 'core/lang', 'core/plugins', 'core/skins', 'core/themes', 'core/tools', 'core/ui' ],
- 'core/editor_basic' : [ 'core/event' ],
- 'core/env' : [],
- 'core/event' : [],
- 'core/focusmanager' : [],
- 'core/htmlparser' : [],
- 'core/htmlparser/comment' : [ 'core/htmlparser' ],
- 'core/htmlparser/element' : [ 'core/htmlparser', 'core/htmlparser/fragment' ],
- 'core/htmlparser/fragment' : [ 'core/htmlparser', 'core/htmlparser/comment', 'core/htmlparser/text', 'core/htmlparser/cdata' ],
- 'core/htmlparser/text' : [ 'core/htmlparser' ],
- 'core/htmlparser/cdata' : [ 'core/htmlparser' ],
- 'core/htmlparser/filter' : [ 'core/htmlparser' ],
- 'core/htmlparser/basicwriter': [ 'core/htmlparser' ],
- 'core/lang' : [],
- 'core/plugins' : [ 'core/resourcemanager' ],
- 'core/resourcemanager' : [ 'core/scriptloader', 'core/tools' ],
- 'core/scriptloader' : [ 'core/dom/element', 'core/env' ],
- 'core/skins' : [ 'core/scriptloader' ],
- 'core/themes' : [ 'core/resourcemanager' ],
- 'core/tools' : [ 'core/env' ],
- 'core/ui' : []
- };
-
- var basePath = (function()
- {
- // This is a copy of CKEDITOR.basePath, but requires the script having
- // "_source/core/loader.js".
- if ( CKEDITOR && CKEDITOR.basePath )
- return CKEDITOR.basePath;
-
- // Find out the editor directory path, based on its