Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

v0.11.0

Compare
Choose a tag to compare
@Reinmar Reinmar released this 03 Sep 18:22
· 2881 commits to master since this release

Bug fixes

  • [Firefox] Prevented setting incorrect initial selection when placeholder was clicked. See ckeditor/ckeditor5#469. (34498a8)

  • AttributeElements created by selection conversion were not merged with AttributeElements created by markers conversion. Closes #1117. (e6c5bcf)

  • DataController#insertContent() and DataController#deleteContent() should strip disallowed attributes from text nodes. Closes #1088. (df83343)

  • DomConverter should actively prevent unwanted scrolling on focus. Closes #951. Closes #707. Closes #706. (cb18a95)

  • LiveSelection will correctly set its properties in case of a non-collapsed default range. This will fix loading data which starts with an object element. Closes #699. (e6e92e9)

  • LiveSelection will not read attributes from object element's children. Closes #986. (93639d0)

  • MarkerDelta transformation should no longer cause editor to crash, if a MarkerOperation had null as it's oldRange or newRange. Closes #943. (d328811)

  • model.Element#getNodeByPath() and model.DocumentFragment#getNodeByPath() should work with offsets not indexes (because path is an array of offsets). Closes #1009. (331d2f4)

  • Schema.checkAttributeInSelection should use element's existing attributes when querying schema. Closes #1110. (25ef1a8)

  • view.Range#getTrimmed() was returning incorrect ranges in some cases. Fixes #1058. (d99c568)

  • AttributeElement with bogus <br /> will now be placed after all UI elements which will fix how those elements are rendered. Closes #1072. (43b6ea9)

  • Editor will no longer crash when ReinsertOperation is transformed by a specific RemoveOperation. Closes #946. (6875eff)

  • Fixed a bug when SplitDelta transformation might cause undo to throw an error in some cases. Closes #1084. (cb9d409)

  • Fixed incorrect markers transformations and conversions. Closes #1112. Closes #1080. Closes #1079. (b71adfb)

  • Multiple spaces in an empty paragraph are now allowed. Closes ckeditor/ckeditor5-typing#101. (9ca61d5)

  • Mutation observer will ignore children mutations if as a result of several native mutations the element's children haven't changed. Closes #1031. (552198e)

  • None of the editable's ancestors should scroll when the DomConverter focuses an editable. Closes #957. (e3bc4d1)

  • Placeholder text now will not be hidden if the element has only ui elements. Closes #1018. (299628b)

  • Prevent unbinding elements that are reused during rendering. Closes #922. (88fcdcb)

  • Prevented editor throwing during SplitDelta x RemoveDelta transformation when SplitDelta's first operation was neither InsertOperation nor ReinsertOperation. Closes #1065. (85e38e1)

  • Fixed remove model-to-view converter for some edge cases. Closes #1068.

  • Singular white spaces (new lines, tabs and carriage returns) will be ignored when loading data when used outside/between block elements. Closes #822. (4c9a0af)

    Also, the range of characters which are being normalized during DOM to view conversion was reduced to [ \n\t\r] to avoid losing space characters (which matches /\s/) that could be significant.

  • Splitting paragraph twice in the same position will now be undoable. Also fixed SplitDelta x SplitDelta transformation. Closes #1096. Closes #1097. (b7cc243)

  • Writer will create a consistent hierarchy for attribute elements with same priorities. Introduced viewElement.getIdentity() method. Closes #1060. (85c96ef)

  • Selection attributes should be cleared in an enqueueChanges() block. Fixed also a bug concerning AttributeDelta x SplitDelta transformation. Closes #1055. (ed1b7e7)

  • Fixed a bug when additional list item has been created when undoing applying block quote to a list followed by splitting list item in that list. Closes #1053. (a6c6167)

  • Fixed a bug when renaming followed by merge or split resulted in multiple elements being incorrectly renamed during undo. Closes #1051. (033e850)

  • If a new position of DocumentSelection cannot be calculated after the content in which the selection was located was removed from the document, the position of the selection should use the "default selection" so it does not end up in disallowed places. Closes #1046. (9f7e0a2)

  • Block filler was rendered before UI elements, interfering with their positioning. Now it will be properly rendered at the end of an element. Closes #1021. (7c014f7)

  • Live ranges and markers, that are at the end of an element, are now correctly transformed when they are split. Closes #1006. (690f32c)

Features

  • DataController#deleteContent() will leave a paragraph if the entire content was selected. Closes #1012. (17e70c3)

    On the occasion $root element has been marked as a limit element in Schema in order to simplify the checks.

  • model.LiveRange#event:change got renamed to change:range. Introduced model.LiveRange#event:change:content. Closes #1089. (ec22a29)

  • model.LiveRange#event:change now contains data.batch instance which changed the range. Closes #1076. (c6f5e9f)

  • Enhanced Selection#setTo(), introduced Selection#setIn(), Selection#setOn(), Range.createCollapsedAt() and renamed few existing Selection methods for both model and view. Closes #1074. (070c313)

  • Hide the caret when the editor is read-only. EditingControler is observable from now. Observable property isReadOnly was added to the ViewDocument and EditingController. Closes #1024. Closes ckeditor/ckeditor5#503. (e8fd17d)

  • Highlights on text nodes will be now unwrapped basing on descriptor id (which by default is marker name). Closes #1108. (885901f)

  • Implemented view.Document#scrollToTheSelection() method. Closes #660. (4479c40)

  • Introduced the highlights feature. (af34f31)

  • Introduced DataController#hasContent(). Closes #1114. (712ccfc)

  • Introduced model.Node#getCommonAncestor() and view.Node#getCommonAncestor(). Closes #1033. (f913aee)

  • Introduced Position#getCommonAncestor( position ) and Range#getCommonAncestor() methods for the view and model. Closes #1002. (0e29844)

  • Introduced Schema#getLimitElement(). Closes #1042. (691e53e)

  • Introduced view.Document#keyup event (fired by the KeyObserver). Closes #1026. (cc766ab)

  • Introduced the Selection#isEntireContentSelected( element ) method. Closes #1063. (1902d7a)

  • OT will use context information to achieve better conflict resolution. (481eb9b)

    This change includes refactoring of: History, RemoveOperation, operational transformation algorithms, delta transformation algorithms and more.

    Context information will be used instead of removing deltas from history, which caused bugs in more complicated scenarios. This mostly affects undo algorithms.

  • UIElement has its own render method used by DomConverter and can create DOM children. Improved integration with observers and other view elements. Closes #799. (7fc52ea)

  • When engine debugging is on, additional logs will be provided when delta transformation causes editor to throw an error. (2ae80ca)

  • When engine debugging is on, deltas that are results of transformation will keep their history of changes in #history property. Closes #940. (7d8db49)

  • Introduced two Schema helpers – #checkAttributeInSelection() and #getValidRanges(). Closes #969. (34a7a06)

Other changes

  • Changed the merge option of DataController.deleteContent() to leaveUnmerged. The default value stayed false, so the default behavior of the function was changed to merge blocks. Closes #982. (56347d1)

  • From now, every operation execution will fire model.Document#event:change, even if the operation does nothing (for example, if operation changes attribute to the same value). Closes #1099. (6502bbb)

  • Introduced options.includeSelf to getCommonAncestor(). Closes #1036. (4a4a89a)

  • The Selection#getSelectedBlocks() method will not return a block in which selection ends if no content of that block is selected. Closes #984. (d3e7afa)

    For example, in the following case only the first two paragraphs will be returned:

    <paragraph>[Foo</paragraph>
    <paragraph>Bar</paragraph>
    <paragraph>]Baz</paragraph>

    The reasoning behind this change is that the user doesn't consider the last block as selected in such a case (as its selection isn't even visible).

BREAKING CHANGES

  • ModelConverterBuilder#toStamp() functionality is renamed to ModelConverterBuilder#toElement(). Introduced ModelConverterBuilder#toVirtualSelection() which replaces current marker to element conversion.
  • The DataController#deleteContent() option was renamed from merge to leaveUnmerged and the default behavior of the function was changed to merge blocks.
  • Removed wrapRange() and unwrapRange() functions from model-to-view-converters.js as they're no longer used.
  • Renamed marker stamps to marker elements in code and docs.
  • Renamed Selection#collapse() to Selection#setCollapsedAt().
  • Renamed Selection#setFocus() to Selection#moveFocusTo().
  • The includeNode option of Node#getAncestors() methods (model and view) was renamed to includeSelf. See #1036.
  • Parameter change for convertSelectionMarker() function from model-selection-to-view-converters.js.
  • deltaTransform#transformDeltaSets() is now an internal method. Use Document#transformDeltas() instead.
  • Removed Renderer#getCorrespondingDom() and Renderer#getCorrespondingView() methods.
  • Renamed Renderer#getCorrespondingDomText() method to Renderer#findCorrespondingDomText() and Renderer#getCorrespondingViewText() to Renderer#findCorrespondingViewText().
  • Merged Renderer#getCorrespondingDomElement() and Renderer#getCorrespondingDomDocumentFragment() into one method Renderer#mapViewToDom().
  • Merged Renderer#getCorrespondingViewElement() and Renderer#getCorrespondingViewDocumentFragment() into Renderer#mapDomToView().
  • History API for deleting undone deltas has been removed.