All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
Changes for the past releases are available below.
View#hasDomSelection property. Closes ckeditor/ckeditor5#6485. (152bdab)Position getters (~60% gain). Reduced time of some common tasks (like loading complex content) by up to 30%. Closes ckeditor/ckeditor5#6579. (670cd7b)TreeWalker by up to 40%. This optimization affects common tasks such as loading the editor data. Closes ckeditor/ckeditor5#6582. (08e8294)Position constructor by optimizing the code path where an element is passed as the position root parameter. Closes ckeditor/ckeditor5#6528. (bfc6c88)is() calls in model and view classes to improve the editor performance. Closes ckeditor/ckeditor5#6529. (ff04509)EditingController requires an instance of StylesProcessor in its constructor.DataController requires an instance of StylesProcessor in its constructor.DomConverter, HtmlDataProcessor and XmlDataProcessor require an instance of the view document in their constructors.View class requires an instance of StylesProcessor as its first argument.createViewElementFromHighlightDescriptor() function that is exported by src/conversion/downcasthelpers.js file requires an instance of the view document as its first argument.view.Document#addStyleProcessorRules() has been moved to the DataController class.#document getter was removed from model nodes. Only the root element holds the reference to the model document. For attached nodes, use node.root.document to access it.DataController does not accept the data processor instance any more.Range#getContainedElement() methods. Closes ckeditor/ckeditor5#6364. (8fb1efa)DataController will now use a single instance of the view document for all its operations (DataController#viewDocument). Closes ckeditor/ckeditor5#6381. (851bac6)Document#version is no longer read-only. (968b193)StylesProcessor rules will not be stored in a singleton, which made them shared between editor instances. In order to allow binding a styles processor instance to a specific view document, we had to replace a dynamic #document property in view nodes with a static one, set upon node creation. Closes ckeditor/ckeditor5#6091. (0e2f02e)startsWith() method to SchemaContext. (11fa53a)DocumentSelection#event:change:marker. Closes ckeditor/ckeditor5#6133. (5106014)Model#createOperationFromJSON() which is an alias for OperationFactory.fromJSON(). Closes ckeditor/ckeditor5#6094. (ebaa2cc)parseAttributes() function performance. This results in improved editor data processing speed. Closes ckeditor/ckeditor5#5854. (ecaf056)--debug engine building flag anymore. Closes ckeditor/ckeditor5#5649. (353f091)DomConverter.blockElements documentation.Selection#getTopMostBlocks() was removed from the public API. Use Selection#getSelectedBlocks() instead.Selection#getSelectedBlocks() does not return blocks nested in other blocks now.Selection#getTopMostBlocks() method. Closes ckeditor/ckeditor5-widget#95. Closes ckeditor/ckeditor5-table#199. (7970f17)transformSets() will now return a Map instance linking transformed operations to the original operations. (61da3ec)bindTwoStepCaretToAttribute() helper. See ckeditor/ckeditor5#1151. (d57ff5a)model.Differ#refreshItem(). (7dc8710)is() method to additional objects from the model and view realms. Closes #1667. (89dbe43)Differ crashing in some scenarios involving attribute changes on elements. Closes #1764. (482e55e)unwrapElement() method to UpcastWriter. (9e97196)Mapper. Closes #1758. (52e701d)#parent or #index) will throw when position points at an incorrect place in its root. Closes #1776. (a359866)DowncastDispatcher#convertChanges(). Now it is convertChanges( differ, markers, writer ).DowncastDispatcher without specifying any conversion API in the constructor, now it is a required parameter.bindTwoStepCaretToAttribute() helper arguments syntax has changed (replaced by an object). Please refer to the helper documentation to learn more.Mapper#unbindElementsFromMarkerName( markerName ) was replaced by Mapper#unbindElementFromMarkerName( element, markerName ).Internal changes only (updated dependencies, documentation, etc.).
view.Document#event:beforeinput. (c74c3d6)type parameter to the model.createBatch() method. (389b72e)model.Writer#insert() will no longer crash when the data to set contains markers that are already in the editor content. Closes #1721. (4ff0656)Model#insertContent() will return a range affected by the insertion. (f4e4644)In Model#deleteContent(), added doNotAutoparagraph flag to options.
Position and LivePosition static creators should handle stickiness param.
Writer#updateMarker() method. Closes #1649. (cf56d90)Schema#setAttributeProperties() and Schema#getAttributeProperties() methods. Closes ckeditor/ckeditor5#1659. (1c6f83a)UpcastConversionApi#getSplitParts(). Also, provided a way to set upcast conversion helper fired for every view element. Closes https://github.com/ckeditor/ckeditor5/issues/1580. Closes https://github.com/ckeditor/ckeditor5/issues/1581. (d0ee3f4)view.DowncastWriter will now correctly wrap and unwrap nested attribute elements. Closes #1716. Closes ckeditor/ckeditor5-font#30. (4126359)Differ and downcasted. Closes ckeditor/ckeditor5#1645. (b2a9d86)Schema#getAttributeProperties() always returns an object. Closes #1717. (b3f5da3)Model#deleteContent() will not throw anymore if the passed selection is in the graveyard root. Closes #1706. (bd875c7)MarkerOperation is transformed during undo. Closes #1604. (da5a390)Selection#is() and DocumentSelection#is() methods in both the model and the view. Closes #1663. (aac4948)selection.getTopMostBlocks() method. (a9c41c8)View#isRenderingInProgress flag to check if the document is in the rendering phase. Closes https://github.com/ckeditor/ckeditor5/issues/1530. (6577d04)Differ#getChangedMarkers. Closes #1658. (2e04af7)DocumentSelection#markers collection. Closes #1615. (b2c1d72)Schema#isInline(). Closes ckeditor/ckeditor5#1049. Closes ckeditor/ckeditor5#1426. (6b36bf1)Model#hasContent(). DataController#get() method can now trim empty data (so it returns empty string instead of <p> </p>). Closes ckeditor/ckeditor5#401. (2b95dc3)addPlaceholder() (now enablePlaceholder()) on the root editable. Introduced the View.detachDomRoot() method. Implemented additional placeholder helpers (showPlaceholder(), hidePlaceholder(), needsPlaceholder()) (see ckeditor/ckeditor5#479). Closes #899. (21dee6b)MarkerOperation OT cases for undo. Closes #1650. (649cae0)MarkerOperation transformation in undo. Closes #1668. (c9932b8)Selection#getTopMostBlocks() should not leak from limit elements. Closes ckeditor/ckeditor5-table#163. (7bc0338)conversion.attributeToElement(). Closes #1617. (fe6d17d)Differ as a change. (7dfaae6)model.Writer from inserting empty text nodes. Closes #1320. (47070b5)View from firing the render event if there were no changes since the last rendering. Closes #1653. Closes #1660. (558638c)attribute:key becomes to attribute:key:$text. Closes #1597. (fd7734e)view.render() by EditingController when the model document isn't changed. Closes #1653. (5d97fd6)Update model selection attributes and markers after each change that affects the selection. Closes #1673. (4f9ac0e)
Add selection post-fixer improvements. Closes #1593. (7f40831)
DataController. Closes #1626. (0fb4295)Conversion class API. Closes #1640. (e7d09cd)editor.data#ready event. (46d9243)wrap() from public API. Closes #1616. (1c7ef68)Schema#findAllowedParent(). Now those parameters match to parameters in other methods of the Schema class. Closes #1636. (6515558)low priority instead of normal. Closes ckeditor/ckeditor5#1399. (c33c49c)8.0.0 and npm to 5.7.1. See: ckeditor/ckeditor5#1507. (612ea3c)DataController#get() method now returns an empty string when the editor content is empty (instead of returning e.g. <p> </p>).attachPlaceholder() has been renamed to enablePlaceholder().enablePlaceholder() accepts a configuration object instead of separate parameters.detachPlaceholder() has been renamed to disablePlaceholder().Conversion#register() method was removed from the public API. Use constructor parameters to pass dispatchers and Conversion#addAlias() to register an alternative conversion group for registered upcast or downcast dispatchers.editor#dataReady event was removed. The editor.data#ready event has been introduced and should be used instead.Schema#findAllowedParent().rootName) from DataController#init() method has been removed. To initialize data on a root different than default one an object with rootName - data pair should be passed.rootName) from DataController#set() method has been removed. To set data on a root different than default one an object with rootName - data pair should be passed.editing.view.render() method was renamed to editing.view.forceRender(). It should be used with caution as it will re-render editing view and repaint the UI.conversion.register() method now accepts single options object as a parameter.downcastElementToElement() helper was removed from public API. Use conversion.for( 'downcast' ).elementToElement() instead.downcastAttributeToElement() helper was removed from public API. Use conversion.for( 'downcast' ).attributeToElement() instead.downcastAttributeToAttribute() helper was removed from public API. Use conversion.for( 'downcast' ).attributeToAttribute() instead.downcastMarkerToElement() helper was removed from public API. Use conversion.for( 'downcast' ).markerToElement() instead.downcastMarkerToHighlight() helper was removed from public API. Use conversion.for( 'downcast' ).markerToHighlight() instead.upcastElementToElement() helper was removed from public API. Use conversion.for( 'upcast' ).elementToElement() instead.upcastElementToAttribute() helper was removed from public API. Use conversion.for( 'upcast' ).elementToAttribute() instead.upcastAttributeToAttribute() helper was removed from public API. Use conversion.for( 'upcast' ).attributeToAttribute() instead.upcastElementToMarker() helper was removed from public API. Use conversion.for( 'upcast' ).elementToMarker() instead.insertUIElement() and removeUIElement() downcast converters were removed from public API. Use conversion.for( 'downcast' ).markerToElement() instead.highlightText(), highlightElement() and removeHighlight() downcast converters were removed from public API. Use conversion.for( 'downcast' ).markerToHighlight() instead.insertElement() downcast converter was removed from public API. Use conversion.for( 'downcast' ).elementToElement() instead.changeAttribute() downcast converter was removed from public API. Use conversion.for( 'downcast' ).attributeToAttribute() instead.createDocumentFragment(), createElement() and createText() methods in UpcastWriter. Additionally, the View#change() method now returns the return value of its callback. Closes #1549. (ec13c85)Model#insertContent() method will accept offset parameter. (00dd70c)Made Position.createAt() require the offset when the first parameter is a model/view item. This change affected the following methods too. Closes #1554. (00dd70c)
model.Position.createAt()model.Range.createCollapsedAt()model.Selection#setFocus()model.Writer#insert()model.Writer#insertText()model.Writer#insertElement()model.Writer#move()model.Writer#setSelectionFocus()view.Writer#setSelectionFocus()view.Position.createAt()view.Range.createCollapsedAt()view.Selection#setFocus()See breaking changes.
Model#deleteContent() will properly merge elements inside a limit element. Closes ckeditor/ckeditor5#1265. (5d26bc3)MoveOperation x SplitOperation transformation for a case when graveyard element is moved. Closes #1580. (f88c918)MoveOperation x SplitOperation transformation special case. Closes ckeditor/ckeditor5#1288. (b92a800)Writer#insert() affect the data. Closes #1583. (72aaaf0)ContainerElement#getFillerOffset() can now be re-used in other places in the code (it is now exported by the module). See ckeditor/ckeditor5-list#117. (12f28bb)Position, Range and Selection static factories from those classes to the model/view writers and Model/View instances. Previously, those factories were available as static methods of the Position, Range and Selection classes which meant that you needed to import those classes to your plugin's code to create new instances. That required your package to depend on @ckeditor/ckeditor5-engine and was not very useful in general. After this change, you can create instances of those classes without importing anything. See the "Breaking changes" section for more details. Closes #1555. (e7f8467)Position.createAt() method was removed from the public API. Use writer.createPositionAt() instead. This method is also available on the Model instance.offset parameter of the following methods does not default to 0 and hence is no longer optional when itemOrPosition is a model/view item:
model.Position.createAt()model.Range.createCollapsedAt()model.Selection#setFocus()model.Writer#insert()model.Writer#insertText()model.Writer#insertElement()model.Writer#move()model.Writer#setSelectionFocus()view.Writer#setSelectionFocus()view.Position.createAt()view.Range.createCollapsedAt()view.Selection#setFocus()Position.createBefore() method was removed from the public API. Use writer.createPositionBefore() instead. This method is also available on the Model instance.Position.createFromPosition() method was removed. Use writer.createPositionAt( position ) to create a new position instance. This method is also available on the Model instance.Position.createFromParentAndOffset() method was removed. Use writer.createPositionAt( parent, offset ) instead. This method is also available on the Model instance.Range.createIn() method was removed from the public API. Use writer.createRangeIn() instead. This method is also available on the Model instance.Range.createOn() method was removed from the public API. Use writer.createRangeOn() instead. This method is also available on the Model instance.Range.createFromRange() method was removed from the public API.Range.createFromParentsAndOffsets() method was removed from the public API.Range.createFromPositionAndShift() method was removed from the public API.Range.createCollapsedAt() method removed method was removed. Use writer.createRange( position ) to create collapsed range. This method is also available on the Model instance.Position.createAfter() method was removed from the public API. Use writer.createPositionAfter() instead. This method is also available on the Model instance.Position.createAt() method was removed from the public API. Use writer.createPositionAt() instead. This method is also available on the View instance.Position.createAfter() method was removed from the public API. Use writer.createPositionAfter() instead. This method is also available on the View instance.Position.createBefore() method was removed from the public API. Use writer.createPositionBefore() instead. This method is also available on the View instance.Position.createFromPosition() method was removed. Use writer.createPositionAt( position ) to create a new position instance. This method is also available on the View instance.Range.createIn() method was removed from the public API. Use writer.createRangeIn() instead. This method is also available on the View instance.Range.createOn() method was removed from the public API. Use writer.createRangeOn() instead. This method is also available on the View instance.Range.createFromRange() method was removed from the public API.Range.createFromPositionAndShift() method was removed from the public API.Range.createFromParentsAndOffsets() method was removed from the public API.Range.createCollapsedAt() method removed method was removed. Use writer.createRange( position ) to create a collapsed range. This method is also available on the View instance.Range.createFromRanges() method was removed from the public API.insertionPosition is equal to the range end. Modified transformations to align with that change. Closes https://github.com/ckeditor/ckeditor5/issues/1278. (e0e961f)Schema#checkAttributeInSelection() will include selection's attributes in the context of the check. Closes #1546. (8fa632c)startsWithFiller should correctly work with DOM Text nodes that are inside of an iframe. (16b0280)Huge thanks to Dmitri Pisarev for this contribution!
view.DowncastWriter manually. Closes #1571. (420166a)Array.sort(). (00fbf7f)Mapper outside the conversion scope. Closes #1415. (6de6a00)Huge thanks to Mate Bartus for this contribution!
Operation.className property to a short one. Closes #1513. (7765953)stringify() dev util output the content of the UIElement (see ckeditor/ckeditor5-media-embed#1). (49cd795)toJSON() methods serialize nested objects. Closes #1477. (27ab310)Aligned Schema#getValidRanges() results to changes in AttributeOperation.
Unified RemoveOperation and ReinsertOperation to have just one MoveOperation.
Simplified LiveRange#event:change second parameter which is now an object containing Position not an Operation.
model.change() or model.enqueueChange() block. Closes #1528. (2ef33b1)Writer to DowncastWriter. Closes #1515. (5fd1ea5)DowncastWriter#rename() method. The DowncastWriter#remove() method now accepts range or item. Closes #1521. (d289b74)model.insertContent() accepts range and position. Closes ckeditor/ckeditor5#1243. (bcdaaa9)DowncastWriter#rename() method. See #1521.src/view/writer module was renamed to src//view/downcastwriter.LiveRange#event:change second parameter is now an object containing property deletionPosition. It can be model.Position instance, if the range was moved to the graveyard root. The position is equal to the position from which nodes were removed. Otherwise, it is set to null.Schema#getValidRanges() will now return only flat ranges. If an attribute is allowed on some nodes and in those nodes children, multiple "nested" ranges will be returned.Schema#getValidRanges() is now a generator.model.Writer#setAttribute() (and AttributeOperation) now applies attribute only to the top-level nodes in the range (instead of all the nodes in the range).Feature: The schema.getLimitElement() method now accepts also Range and Position as a parameter.
ElementDefinition#priority property which allows specifying the priority of created element during the downcast conversion. Closes #1408. (e20e133)ModelDocument#change:data event. Closes #1418. (872f4ff)<br> element. Closes #1422. (ba3d641)<br> elements. Closes ckeditor/ckeditor5#1024. (3e74554)model.Differ should handle attribute change transformation correctly. Closes #1404. (3769a02)view.Writer should deeply add and remove view.AttributeElements to/from their clone groups. Closes #1401. (e6bb59b)bindTwoStepCaretToAttribute() behavioral helper should not fail in more complex cases. Closes #1301. Closes #1346. Closes ckeditor/ckeditor5#937. Closes ckeditor/ckeditor5#922. Closes ckeditor/ckeditor5#946. (f0fd2d8)writer#updateMarker() method. Closes #1299. (bed647f)#isBefore and #isAfter in model.Node and view.Node. Additionally, model.Node#is() and view.Node#is() and view.Node#getPath() were added. Closes #1365. (4c38683)model.Differ should not throw when multiple, intersecting remove changes were buffered. Closes #1392. (3a348fd)model.Range#getTransformedByDelta should not crash for MoveDelta which moves no nodes. Closes #1358. (ff8ba9e)conversion.downcast-converters.changeAttribute should not consume if element creators returned null. Closes #1369. (6866256)conversion.downcast-converters.downcastAttributeToElement should let specify from what element the model attribute will be converted. Closes #1370. (f8dec1e).ck class for editor UI components (see: ckeditor/ckeditor5#494). (6bf32c0)model.Writer#setTextData() method. Closes #1363. (b484822)writer#setMarker() method is used only to create a new marker and it does not accept a marker instance as a parameter. To update existing marker use writer#updateMarker() method.options.usingOperation option in writer#setMarker() is now a required one.range parameter was removed. Use options.range instead.MatcherPattern, view ElementDefinition and options for conversion utils have been renamed: class to classes, style to styles, attribute to attributes.view.DocumentSelection. It has protected API and can be modified only by the view writer. Observers creating instance of selection (like SelectionObserver, MutationObserver) use the view.Selection class now.In 1.0.0-beta.1 the engine's API has underwent a thorough review which resulted in a deep refactoring. Most of the underlying concepts and architecture remained untouched. The API, though, is brand new. The changes are huge and, in this package exclusively, resulted in changing 40.000 LOC. Therefore, the list of changes below is neither complete nor will explain you how the engine is structured now and how to should migrate to this version.
Instead, we recommend reading https://ckeditor.com/docs/ckeditor5/latest/framework/guides/architecture/editing-engine.html once more (it will be updated in a couple of days after the release).
The good news is that the our focus when designing the new API was on developer experience. APIs which were dangerous or confusing were removed or hidden and new APIs were added in their place. The engine is now safer and more useful library and we hope you'll enjoy it :).
'word' unit in the modifySelection() helper. (f37a97a)true as view.Matcher's attribute match to check if that attribute is set. Closes #1239. (bc1c3e5)conversion.ModelConsumable methods. Closes #1214. (131e9c8)Feature: Schema#findAllowedParent() has been introduced.
Feature: SchemaContext#concat() has been introduced.
ViewElementDefinition and definition-based-converters module with a set of utils allowing to turn element definitions to converters. Closes #1198. (d2e9f06)DocumenSelection#change:range event will be fired only once after multiple selection live ranges have changed. Closes #1281. (b26935c)model.DocumentSelection should update it's attributes after each change, including external changes. Closes #1267. (b91d967)Model#insertContent() will not merge nodes if the model after the merge would violate schema rules. Closes ckeditor/ckeditor5#730. (2a73830)Schema#getLimitElement() will return a proper limit element (the root element) if one of the selection's ranges have the root element as the limit element. Closes #1275. (050a415)Document#focus event before rendering to be sure that selection changes are processed on Firefox and Safari. Closes ckeditor/ckeditor5#676. Closes #1157. Closes #1155. Closes #1153. (aba8e68)DataController#set(). Closes #1278. (8c56dce)model.Differ are dismissed if they are in inserted/removed parent. Closes https://github.com/ckeditor/ckeditor5/issues/733. (e70ab96)model.Differ when multiple change items interfere with each other. Closes #1309. Closes https://github.com/ckeditor/ckeditor5/issues/849. (30dcf6c)NS_ERROR_FAILURE error when moving selection from a nested editable to the root editable. Closes ckeditor/ckeditor5#721. (4b7d435)DocumentSelection. Closes #903. (7e352e3)model.Differ checks whether the operation should be buffered or not. Closes #1326. (3e9f81b)model.Node from a model.Document to a model.DocumentFragment. Closes #1337. (24b97f5)style attribute. Closes #1179. (fc7da80)render() and change() methods flow. Introduced post-fixers in the view. Closes #1312. (63b9d14)Position and Range immutable in model and view. Closes #897. (836dfd8)Writer should be used instead. Closes #738. (a4f3dad)consumable parameter to conversionApi parameter in downcast. Closes #1294. Closes #1261. (731db37)Document#getNearesetSelectionRange to Schema. Closes #1227. (d1838a4)Writer, introduced LiveSelection. Closes #1209. (7db1fee)baseVersion set to null. Closes #1211. (b527d7f)Fixed: Markers again are properly converted in engine.controller.DataController.
Fixed: Markers are cleared now before an operation is applied to model.Document tree to fix scenarios where marker range could not be converted to the view after the model changed.
Writer from usage outside of the change block. Closes #1212. (2592bf1)model.Differ. Changes now will be converted after all changes in a change block are done. Closes #1172. (6479bfd)render() method can be now provided without using inheritance. Closes #1254. (e05b8b1)view.Writer is no longer an object literal with functions but a class.view.Renderer, view.DomConverter and observers are moved to view.View.view#event:render is introduced to indicate a moment when all changes are applied and document may be rendered to the DOM.view.View is introduced. Changes to the view document tree structure should be done by using writer provided to callback in view.change() method.ViewConversionApi#splitToAllowedParent has been introduced.ViewConversionApi#storage has been introduced.ViewConsumable has been merged to ViewConversionApi.Schema#findAllowedParent has been introduced.
Feature: SchemaContext#concat has been introduced.DataController#parse, DataController#toModel, ViewConversionDispatcher#convert gets SchemaContextDefinition as a contex instead of String.model.Range will now be extended if it was collapsed and it was transformed by insertion. Closes #1159. (5f020b0)deleteContent() algorithm will use merging to "remove" empty element which will ensure a better conflict resolution on collaborative editing. Closes #1161. (0dd29d4)renderer-skipped-selection-rendering warning since it doesn't bring any value. Closes #1158. (4a5a5d1)removeHighlight() function now accepts descriptor id instead of a HighlightDescriptor object. Closes #1164. (7bde6f7)model.Range will now be correctly transformed if it was at the end of a split element. Instead of sticking to the old element, it will be moved to the end of the new element. Closes #1142. (1be7ed1)Range#getTransformedByDelta() that caused editor to crash after some MergeDeltas were transformed. Closes #1132. (97a4f4b)MergeDelta transformation in a specific case. Closes #1103. (ef1b07e)<code> will be rendered in a normal way (previously DomConverter tried to treat <code> like a preformatted block which is not what HTML needs). Closes #1126. (88630b7)model.DocumentSelection#hasOwnRange property. Closes #1137. (4feb678)Schema#removeDisallowedAttributes() method to filter out disallowed attributes from given nodes. Closes #1120. (d776c71)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)ReinsertOperation is transformed by a specific RemoveOperation. Closes #946. (6875eff)SplitDelta transformation might cause undo to throw an error in some cases. Closes #1084. (cb9d409)DomConverter focuses an editable. Closes #957. (e3bc4d1)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.
enqueueChanges() block. Fixed also a bug concerning AttributeDelta x SplitDelta transformation. Closes #1055. (ed1b7e7)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)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)Selection#setTo(), introduced Selection#setIn(), Selection#setOn(), Range.createCollapsedAt() and renamed few existing Selection methods for both model and view. Closes #1074. (070c313)EditingControler is observable from now. Observable property isReadOnly was added to the ViewDocument and EditingController. Closes #1024. Closes ckeditor/ckeditor5#503. (e8fd17d)view.Document#scrollToTheSelection() method. Closes #660. (4479c40)DataController#hasContent(). Closes #1114. (712ccfc)model.Node#getCommonAncestor() and view.Node#getCommonAncestor(). Closes #1033. (f913aee)Position#getCommonAncestor( position ) and Range#getCommonAncestor() methods for the view and model. Closes #1002. (0e29844)Schema#getLimitElement(). Closes #1042. (691e53e)view.Document#keyup event (fired by the KeyObserver). Closes #1026. (cc766ab)Selection#isEntireContentSelected( element ) method. Closes #1063. (1902d7a)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)#history property. Closes #940. (7d8db49)Schema helpers – #checkAttributeInSelection() and #getValidRanges(). Closes #969. (34a7a06)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)model.Document#event:change, even if the operation does nothing (for example, if operation changes attribute to the same value). Closes #1099. (6502bbb)options.includeSelf to getCommonAncestor(). Closes #1036. (4a4a89a)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).
ModelConverterBuilder#toStamp() functionality is renamed to ModelConverterBuilder#toElement(). Introduced ModelConverterBuilder#toVirtualSelection() which replaces current marker to element conversion.DataController#deleteContent() option was renamed from merge to leaveUnmerged and the default behavior of the function was changed to merge blocks.wrapRange() and unwrapRange() functions from model-to-view-converters.js as they're no longer used.Selection#collapse() to Selection#setCollapsedAt().Selection#setFocus() to Selection#moveFocusTo().includeNode option of Node#getAncestors() methods (model and view) was renamed to includeSelf. See #1036.convertSelectionMarker() function from model-selection-to-view-converters.js.deltaTransform#transformDeltaSets() is now an internal method. Use Document#transformDeltas() instead.Renderer#getCorrespondingDom() and Renderer#getCorrespondingView() methods.Renderer#getCorrespondingDomText() method to Renderer#findCorrespondingDomText() and Renderer#getCorrespondingViewText() to Renderer#findCorrespondingViewText().Renderer#getCorrespondingDomElement() and Renderer#getCorrespondingDomDocumentFragment() into one method Renderer#mapViewToDom().Renderer#getCorrespondingViewElement() and Renderer#getCorrespondingViewDocumentFragment() into Renderer#mapDomToView().History API for deleting undone deltas has been removed.DomConverter#domToView() will not throw when converting a comment. Closes #647. (ffc41d4)ViewConverterBuilder#fromAttribute() should not create incorrect matcher object for Matcher if passed attribute was other than class or style. Closes #919. (6701c4b)Minor upgrades to ViewConversionBuilder:
ViewConversionBuilder will not convert if "creator function" returned null.ViewConversionBuilder#toAttribute() value param optional. If not set, the attribute value is taken from converted view element.view.Element's inline styles parser. Big property values (like base64 encoded images) should not crash the editor anymore. Closes #881. (3d494a3)dev-utils.DeltaReplayer. Closes #906. (69cfdd1)data.output during view-to-model conversion. See breaking changes. Closes #932. (16ae05a)model.MarkerCollection will now include marker name after semicolon. Closes #911. (3a8ebed)model.Element#clone() now does not clone children when passed false and recursively clones children when passed true. Closes #689. (ccb0659)ViewConversionDispatcher#convert() will always return model.DocumentFragment (which may be empty in various cases). conversionApi#convertItem() will log a warning if data.output contains a different value than model.Node or model.DocumentFragment or null. conversionApi#convertChildren() will always return model.DocumentFragment.model.Element#clone() does not clone children when not in the deep mode. See #689.DataController#insertContent() behavior, so it doesn't clone given nodes. Closes #869. (45f0f33)AttributeDelta should not be added to batch. Closes #875. (425399b)LiveRange position would be lost when using wrap and unwrap deltas. Closes #841. (efe3987)The base algorithm implemented in Range#_getTransformedByDocumentChange() will now include all model items between the old and new range boundary. See https://github.com/ckeditor/ckeditor5-engine/issues/877#issuecomment-287740021 for more details.
<br> at the end of the block element are filtered out by the mutation observer. Closes #882. (3583cae)ReinsertOperation targets back to same graveyard holder from which the nodes were re-inserted. Closes #891. (ea6c881)DataController#insertContent() now accepts also model items. Closes #870. (d00c973)dev-utils.DeltaReplayer. Introduced new logging methods in dev-utils.enableEngineDebug(). Closes #828. (eb855d9)DataController#deleteContent() in a case of nested elements to better match situations like using Backspace after a block quotation. Closes #710. (42a4429)SelectionObserver's infinite loop check which should improve its stability. Closes #889. (8b859fb)BuildModelConverter#fromMarkerCollapsed() is removed. Use BuildModelConverter#fromMarker() instead.insertUIElement() model to view converter now supports collapsed and non-collapsed ranges.view.Matcher#getElementName() now returns proper value when named function is used as a pattern. Closes #850. (93f41c5)model.Range no longer sticks to its neighbour node when that node is moved. Closes #852. (ccd23d1)remove() converter no longer removes view.UIElements that are next to removed nodes. Closes #854. (c054ded)dev-utils/model#setData() should work with custom roots. Closes #815. (0ad3074)null from the element creators in converters for selection attributes and markers. It does not crash the conversion anymore. Closes #833. (8ffa038)Schema#limits with DataController's methods. Closes #818. (e3c3e33)is() method in model and view tree nodes and document fragments. Closes #809. (1525bde)model.Selection#getSelectedBlocks(). Closes #811. (9f3f35f)Schema#limits map. See #818. (a66bcdd)view.Document#selectionChangeDone event. Closes #791. (3a15236)view.Range#getEnlarged(), view.Range#getTrimmed(), view.Position#getLastMatchingPosition(), model.Position#getLastMatchingPosition(), view.TreeWalker#skip(), model.TreeWalker#skip(). Closes #789. (973f2ba)view.UIElement class and view.writer.clear() method. Closes #788. (64be1f6)view.UIElement. Closes #792. (1731e69)ModelConversionDispatcher now uses remove + insert events to convert move and rename changes, instead of dedicated move and rename events. Closes #837. (f63657c)view.Range.enlarge() and view.Range.shrink() should not pass the container limit because the view.Writer expects that the whole range is in the same container. Closes #830. (8d4a1ca)ModelConversionDispatcher no longer fires move and rename events. This means that feature converters added as callbacks to those should be replaced by remove and insert converters.view.DocumentFragment#getAncestors(). Closes #803. Closes #805.Position.getAncestors() should return elements in the same order as Node.getAncestors().Range#getTrimmed() or Range#getEnlarged() before operating on a range returned from Mapper.