Version 6.0

Updating from version 5.9

For a detailed description on how to update, please refer to our update guide.

API

The API can be found here: Xeditor 6.0

Changelog

v6.0.2

Changes

Bugfixes

  • Fixed handleInsertElements when no wrapPath is set
  • Fixed typo in Ext.ux.xeditor.util.KeyMap from destoryed to destroyed
  • Fixed issue in initial frame rendereing when first node was a comment or a processing instruction causing the complete document to be rendered into the frame
  • Added missing scope to openDocumentById
  • Fixed issue causing attributes using a default value not to be properly handled when initially created

v6.0.1

Changes

Bugfixes

  • Fixed empty element styling
  • Fixed deletion of local database file when document got saved successfully to the server

v6.0.0

Major Changes

  • Implemented new mechanism to communicate with the server. For this provider were added and all existing requests were adapted. The editor now needs a provider to be able to start. For existing systems it is recommended to use the Ajax provider.
  • Element.getAttributes() method will now return null for attributes that are not populated instead of their default value
  • Element.removeAttribute() method will now only populate attribute with its default value if it's required or the default value is not an empty string
  • Element.removeAttributes() method will now only populate attributes with its default value if it's required or the default value is not an empty string
  • Introduces new plugin Ext.ux.xeditor.plugin.AttributesList which will handle attributes
  • Complete redesign of attributes panel
  • Moved attributes panel from Xeditor core to new plugin Ext.ux.xeditor.plugin.AttributesList
  • Removed methods related to handling of attributes panel, like updateAttributesPanel and createAttributeFieldSetContent
  • Removed editor events updateattributespanel and beforeupdateattributespanel since attributes panel will now be build by separate plugin
  • Refactored Document.getNodeType()
  • Added author class index functionality to user manager
  • Added events beforeaddactiontoentry and addactiontoentry to HistoryManager to be able to track if changes are made in the document without prepare/commit
  • HistoryManager actions no longer have the actual function to process the action but the name of the function to make actions serializable
  • Added property entry to result of HistoryManager.undo and HistoryManger.redo wich is the actual entry that is used for re-/undo
  • Added property minWidth to MarkerManager marker config object properties to make markers where offset.from=offset.to also visible
  • Added property serializer and functions nodeToString and stringToNode to Util
  • Added config documentId to Editor
  • Added property identifier to Document wich has to be provided when creating a new instance
  • Added parameter raw to Document.getContent for getting html content without any for-content-preparations
  • Changed History-behaviour of EventManager.onInsertOrEditButtonClick to prepare earlier and commit inside of element lookup if there is one
  • Added xeditor.css file for adding/adjusting styling of the xeditor component/theme
  • Added fallback to may use dom id's during Document.handleElementIdsCombined if idAttribute is not set
  • Historymanager wont track data-actions of xeditor meta data (xe-editable, xe-removeable, xe-direction) anymore
  • Added return property cloneInformation to method SelectionManager.getElements()
  • Removed saveButton property
  • Introduced toolbarButtonTypes property as well as registerToolbarButton and getToolbarButtonsByType functions which are used to get and set toolbar buttons by type (xedata.type)
  • Adapted all updateToolbarState-Listeners to new toolbar-button-hash
  • Changed toolbarType to type
  • Renamed Mixin from Ext.ux.xeditor.plugin.search.Anchorable to Ext.ux.xeditor.Anchorable
  • Added class Ext.ux.xeditor.ConfigProcessor which now contains methods from Validator and Config
  • Refactored initialization mechanism of Document so it operates asynchronously and more efficient
  • Refactoring of methods initialize and reinitialize to init editor asynchronously
  • Editable / Removable / Direction are now stored using dom attributes (data-editable, data-removable, data-text-direction) instead of setData
  • Changed the name of the role property from isEditable to editable and from isRemovable to removable
  • Changed default of all roles in editable, removable to undefined to support the inheritance by default
  • Frame.iframeEditorContentContainer is not a frame-only element anymore
  • Removed config for browser spellchecking. The body attributes spellcheck and translate will now be set to false automatically
  • Removed fixEmptyTextElements from the document and moved it into the frame
  • Refactoring convertMarkersToElements for performance gain during save process
  • Added class Ext.ux.xeditor.TextLengthCache which introduces a new method of creating cache during document initialization which only respects text nodes and their parents and no more adds spaces automatically (offset)
  • No more spaces are added automatically between/after elements (role property). In detail the following properties have been removed: spacesCount, spacesCountAfter, spaceOffsets, leadingSpaces, trailingSpaces, reinsertChangeSpaces, the following methods have been adjusted and may now return a different result: getNodeTextOffset getNodeTextOffsetUsingCache getNodeTextOffsetUsingTraversal getPlainTextLength getPlainText getPlainTextLengthUsingTraversal getPlainTextLengthUsingCache findTextNodeByOffset findTextNodeByOffsetUsingTraversal findTextNodeByOffsetUsingCache findTextNodesByOffsetRange findTextNodesByOffsetRangeUsingTraversal findTextNodesByOffsetRangeUsingCache findElementByOffsetUsingTraversal findElementByOffsetUsingCache findElementByOffset and the following method has been removed: reinsertChangeSpaces
  • Refactored method convertElementsToMarkers of MarkerManager in order to significantly increase performance
  • Introduces new class Ext.ux.xeditor.MenuManager responsible for handling context and bread crumb menus
  • Moved logic handling menus from Ext.ux.xeditor.Editor to Ext.ux.xeditor.MenuManager
  • Redesign of the complete Copy/Paste handling:
    • The internal clipboard has been removed
    • The clipboard data of the event is now always used. So the content can be recognized automatically by the content type (IE does only suppored Text here)
    • The paste button does no longer works as usual, as it is not possible to trigger a paste event due to safety regulations
    • Events are now context related and no longer method related
  • Removed method Ext.ux.xeditor.Document::insertElementsTextFallback.
  • Added optional caching option for validation result of the schema check which can be controlled by the new configuration flag enableValidatorCaching
  • Removed data-dataname-{nameofdata} from DOM elements since it's not required
  • When setting data attributes with Ext.ux.xeditor.BasicElement.setData() data name will be cleaned for before it will be set (e.g. spaces will be replaced with -)
  • Adapted handling of Ext.ux.xeditor.BasicElement.getData() accordingly
  • Added database initialize with promises and replaced callbacks with promises for database
  • Replaced occurrences of callbacks with promises
  • Removed Method Editor.loadDocumentHtmlLocally since it will be replaced by the new provider handling
  • Removed property localStorageKey from editor since indexed db will now be used instead
  • Added action function hash to history manager
  • Text direction is now stored as dom data attribute
  • Introduced getTextDirection, setTextDirection
  • Reviewbar is now enabled as default
  • Changed initialization-Method names of classes all to initialize() for more consistency
  • All methods that were processing the config data/creating toolbar components have been moved to Ext.ux.xeditor.ConfigProcessor
  • Replaced properties textLengthsTree and textLengthsIndex with new class Ext.ux.xeditor.TextLengthCache in Document
  • Refactored reinitialization of document
  • Document.prepareNodeForDocument no longer operates recursively but also handles element ids
  • Added new property to Document nodesWithoudId which is needed during new initialization method
  • Added new method prepareCommentNodeForDocument which is used within new initialization mechanism of Document
  • Removed properties configLoaded, iframeLoaded, documentLoaded as well as initRequested from Editor class as no longer needed with new init mechanism
  • Removed methods signalConfigLoaded, signalIframeLoaded, signalDocumentLoaded, signalInitRequestLoadDocument, loadConfigFromURL as well as signalDocumentDocumentFailure as no longer needed with new init mechanism
  • Added methods loadDocumentHtml, loadDocumentHtmlFromURL, loadDocumentHtmlLocally as well as loadIframe to Editor class which are used by new init mechanism
  • Added method boot to Editor class which is new starting point of starting up a new editor instance
  • Enhanced license check mechanism
  • Added new method handleNodeIteratorAsync which is used excessively within new initialization method
  • Xeditor Toolbar button objects can now contain a property raw which can be used to set configs to the actual ExtJS component as all configuration contained in data will now be set as xedata on the component
  • Removed namedShortcuts logic and replaced it with the new keybinding logic
  • Added default keybindings to configs
  • Removed class Ext.ux.xeditor.FindReplace since it's now added by new plugin Ext.ux.xeditor.plugin.SearchReplace

Changes

  • data-editable and data-removable will not be set automatically for all elements where it was configured
  • Added property highlightClassName containing the class name that will be set on highlighted elements, e.g. when hovering over the breadcrumb
  • Editor will now save proper XHTML instead of HTML. This makes the parsing as XHTML on the backend before the content could be transformed obsolete
  • Editable, removable, frameonly and preserve selection now have an inheritance. To use these, the value undefined can be used.
  • Added polyfills for Promise.prototype.finally, Element.prototype.matches, Element.prototype.closest
  • Replaced usage of Ext.util.Observable with Ext.mixin.Observable
  • Added database initialize with promises and replaced callbacks with promises for database
  • Repalces callbacks with promises
  • Introduces new role properties enableCopyElementItem, enableCopyElementTextItem, enableCutElementItem, enableDeleteElementItem and enableRemoveElementItem defining whether those items should be added to the context and bread crumb menu
  • Added polyfill for Math.imul
  • Fixing of empty text will now only be redone for changed elements or for all if the frame has changed
  • Introduces new role properties enableCopyElementItem, enableCopyElementTextItem, enableCutElementItem, enableDeleteElementItem and enableRemoveElementItem defining whether those items should be added to the context and bread crumb menu
  • Added new config highlightReadOnly to editor which will highlight not editable elements when enabled
  • Added new error class to be able to handle all errors in the same way
  • Added new method isElementVisible to Ext.ux.xeditor.Util which is used in order to determine whether element is visible
  • Methods BasicElement.addClass, BasicElement.removeClass and BasicElement.hasClass now use native dom functions instead of regular expressions
  • Added wrapper Methods BasicElement.addClasses and BasicElement.removeClasses for adding/removing multiple classes at once
  • updateToolbarState will now no longer update the toolbar when the selection offset has changed, since this doesn't affect which buttons are enabled (performance gain)
  • Added method fromURLs to class Config
  • Moved logic of createProcessingInstructionNode from Document (method still exists) into new method of Util with same name
  • Moved method createProcessingInstructionByCommentValue from document to Util
  • Added property internal to roles which defines that this element is only used for internal usage and is not part of the original schema (e.g. dummy elements used for MathML usage)
  • Added method removeSelectionClasses which will remove selectionClass from all elements within the document
  • Refactored handling of selection class in order to also catch edge cases which previously would have been not handled
  • Adjusted default classes of roles xeditor.tableColGroup and xeditor.tableCol in order to support display of table width
  • Made Ext.ux.xeditor.Editor.selectionClassName a config option

Bugfixes

  • Added missing parameter ignoreRemoved to findNextTreeSibling since it's also used by function findNextTreeSibling which gets called by it
  • Extended Ext.promise.Promise to support IE
  • Fixed incorrect offset calculation/caching caused by place holder character
  • Fixed bug causing DOM error when entry got removed from review bar in certain circumstances
  • Fixed store handling of Ext.ux.xeditor.NavigationBreadcrumb to be able to handle multiple instances of Ext.ux.xeditor.NavigationBreadcrumb
  • Added Bugfix to not get errors in overflow menu if button contains custom attributes.
  • Added missing parameter ignoreRemoved to findNextTreeSibling since it's also used by function findNextTreeSibling which gets called by it
  • Fixed creation of toggle buttons. The initial value is no longer discarded
  • Fixed wrong key input timeout handling causing new history entry after potentially every char typed