What's New
For complete documentation, please visit the Getting Started page.
Version 1.3.0
With the addition of the following core changes, CLEditor is now capable of supporting mutliple source code formats (including HTML, XHTML and BBCode), as well as producing much cleaner output. These features have been exposed as optional properties, methods, callbacks and plugins to provide an even greater degree of customization, while resulting in an overall reduction in total bandwidth consumption.
Additions / Updates:
- Added an updateTextArea optional parameter which is used to supply a callback handler for converting HTML from the iframe into source code for the textarea.
- Added an updateFrame optional parameter which is used to supply a callback handler for converting source code from the textarea into HTML for the iframe.
- The html button was renamed to source and the button image was updated.
- The .htmlMode() method of the cleditor object was renamed to .sourceMode().
- The textarea and iframe are now updated after the editor loses focus, instead of after every key press and mouse click.
- The change event is now fired after the editor loses focus, instead of after every key press and mouse click.
- During initialization, the editor is now constructed off screen and added to the DOM when finished. This change has significantly reduced the number of DOM changes during initializion, resulting in a faster load time.
- When running under an iPhone, iPod Touch or iPad, all toolbar buttons except the source button will be disabled and the editor will initially appear in source mode. The source button can still be used to preview any HTML that might have been entered.
Bug Fixes:
- Fixed bug that would prevent the textarea from being updated until after the next key press or mouse click when pasting content into the editor using the context menu.
- Fixed bug with FireFox that would cause foreground and background color selections starting with #00 not to be applied.
- Fixed bug with Internet Explorer that would cause all text within the editor to be selected when switching between the source and rich text views.
- Updated the z-index for the cleditorPopup class so that drop down menus work properly within a jQuery UI dialog.
- Fixed bug that was causing the editor to not function under FireFox 1.5.
- Fixed bug that was causing the last input element on popups to be focused instead of the first.
New Plugins:
- XHTML - This plugin is used to generate Transitional XHTML source and will optionally replace old depreciated HTML tags.
- BBCode - This plugin is used to generate BBCode source code common in many CMS packages and message boards.
- Advanced Table - This plugin (donated by Sergio Drago) is similar to the Table Plugin but also allows entry of cell spacing, cell padding, border and CSS style.
Version 1.2.6
- Resolved issue with buttons appearing disabled in certain browsers until the editor receives focus for the first time.
- Fixed bug causing Internet Explorer to display the message 'a.range.length is null or not an object' when the editor is not focused during initialization.
Version 1.2.5
- Resolved issue with Internet Explorer that would cause previously typed text to be replaced when executing the insertimage, createlink and inserthtml commands, even when no text was selected.
Version 1.2.4
- Added a workaround for a bug in Internet Explorer that was causing the editor to lose focus and disable the toolbar buttons when clicking below the end of the document.
- Added a .selectedHTML() method which returns the editor's current selection as an HTML formatted string.
Version 1.2.3
- Added a 'Paste as Text' button which allows pasting of unformatted plain text.
- Toolbar buttons are now enabled and disabled based on availability using the browser's queryCommandEnabled command. Note: Firefox will indicate that the cut, copy and paste commands are available but will block execution of these commands. Also, all version of IE have a bug that corrupts the undo/redo stack, therefore these buttons are always disabled for IE.
- Added a getEnabled callback function for all button definitions to provide a method for plug-in developers to enable/disable buttons based on availability.
- Added a docType property which sets the document type for improved cross browser rendering. The default is HTML 4.01 Transitional.
- Resolved issue that was causing a link tag to be generated with an empty href attribute when the docCSSFile property was an empty string. In certain situations, this would appear to load the page twice.
- Resolved issue that was preventing font changes from being applied in Opera.
Version 1.2.2
- Removed the .restoreSelection() method.
- Renamed the .resizeControls() method to .refresh().
- Resolved issues related to initializing a hidden editor then showing it at a later time.
- Resolved issues related to re-parenting an editor.
- The current selection and caret position under Internet Explorer are now internally managed and properly restored after the editor loses and gains focus. This change eliminates the need for the .restoreSelection() method and causes Internet Explorer to behave more like every other browser.
- Added a docCSSFile property to allow styling of the document contained within the editor.
- Reduced total bandwidth consumption to just over 9K.
Table Plugin Version 1.0.2
- Removed call to the .restoreSelection() method.
Version 1.2.1
- Resolved issue causing font size selections to be improperly applied.
- Resolved issue causing the browse button to not function for file input elements added to popup plugins.
- Resolved issue causing the .cleditorList class grouping selector to leaking out into the page.
- When overriding the default colors, the color selection popup is now sized to better fit it contents.
- For browsers that do not support the cut, copy and paste commands, a more informative message is now displayed.
- All script tags are now HTML encoded to prevent script injection attacks in html mode.
Table Plugin Version 1.0.1
- Added a <br /> element after the closing </table> tag to allow caret positioning at the end of the document.
Version 1.2
Additions
- Added a $(selector).cleditor(options) method to create cleditor instances the jQuery way.
- Added a defaultOptions property to allow option overrides at a global level.
- Added a buttons property to provide access the internal button definitions.
- Added a useCSS option to force the editor to use CSS to style HTML when possible.
- Added a disabled property which is true if the editor is disabled; otherwise false.
- Added a disable() method to disable or enable the editor.
- Added a change event that is triggered when the contents of the editor have changed.
- Added a change() method to simplify the binding of the change event.
- Added a clear() method to clear the editor.
- Added a execCommand() method to execute design mode commands
- Added a hidePopups() method to hide all popups.
- Added a showMessage() method to show a popup messages inside the editor.
- Added a restoreSelection() method to restore the previous selection after focusing another control.
- Added support for custom plugin development.
- Added an HTML table plugin.
- Added an icon plugin.
Deletions
- Removed the $.cleditor(id, options) constructor function.
- Removed the name option used to name the editor.
- Removed all class names from options.
- Removed all background-image urls from the css file.
Other Changes
- All image files are now assumed to be in the images subfolder located in the same folder as the jquery.cleditor.css file.
- All javascript alerts have been replaced with popup messages.
- All javascript prompts have been replaced with custom popups.
- Code optimization and cleanup.
- Bug fixes.
- For security reasons, some browsers do not support script driven access to the clipboard. When a user clicks the cut, copy or paste buttons on these browsers, a popup message is displayed stating this. Users can still interact with the clipboard using the keyboard and context menus.
Version 1.1
- The onkeyup and onmouseup events are now used to keep the editor and textarea in sync. Previously, the onblur event was used and was not consistently being fired across all browsers.
Version 1.0
- Initial Release
