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

Releases: ckeditor/ckeditor5-engine

v13.0.0

28 Feb 11:53
Compare
Choose a tag to compare

Features

  • Added an additional event in markers conversion. Improved how MarkerOperation is transformed during undo. Closes #1604. (da5a390)
  • Implemented Selection#is() and DocumentSelection#is() methods in both the model and the view. Closes #1663. (aac4948)
  • Introduce the selection.getTopMostBlocks() method. (a9c41c8)
  • Introduce the read-only View#isRenderingInProgress flag to check if the document is in the rendering phase. Closes ckeditor/ckeditor5#1530. (6577d04)
  • Introduced Differ#getChangedMarkers. Closes #1658. (2e04af7)
  • Introduced DocumentSelection#markers collection. Closes #1615. (b2c1d72)
  • Introduced support for inline objects (enables support for inline widgets). Introduced Schema#isInline(). Closes [ckeditor/ckeditor5#1049](ckeditor/ckeditor5#1049). Closes [ckeditor/ckeditor5#1426](ckeditor/ckeditor5#1426). (6b36bf1)
  • Introduced whitespace trimming to Model#hasContent(). DataController#get() method can now trim empty data (so it returns empty string instead of <p>&nbsp;</p>). Closes [ckeditor/ckeditor5#401](ckeditor/ckeditor5#401). (2b95dc3)
  • Moved the root element DOM attributes management from the UI to the engine. Made it possible to use 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)

Bug fixes

Other changes

  • Added support for handling data in multiple roots in DataController. Closes #1626. (0fb4295)
  • Change Conversion class API. Closes #1640. (e7d09cd)
  • Introduced editor.data#ready event. (46d9243)
  • Removed wrap() from public API. Closes #1616. (1c7ef68)
  • Swapped the order of parameters in Schema#findAllowedParent(). Now those parameters match to parameters in other methods of the Schema class. Closes #1636. (6515558)
  • Upcast element to attribute defaults to low priority instead of normal. Closes ckeditor/ckeditor5#1399. (c33c49c)
  • Expose conversion utilities. Closes #1556. (9306c22)

BREAKING CHANGES

  • Upgraded minimal versions of Node to 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>&nbsp;</p>).
  • The wrap() conversion helper was removed from public API.
  • The attachPlaceholder() has been renamed to enablePlaceholder().
  • enablePlaceholder() accepts a configuration object instead of separate parameters.
  • The detachPlaceholder() has been renamed to disablePlaceholder().
  • The 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.
  • The editor#dataReady event was removed. The editor.data#ready event has been introduced and should be used instead.
  • Swapped the order of parameters in Schema#findAllowedParent().
  • The second parameter (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.
  • The second parameter (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.
  • The 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.
  • The conversion.register() method now accepts single options object as a parameter.
  • The downcastElementToElement() helper was removed from public API. Use conversion.for( 'downcast' ).elementToElement() instead.
  • The `downcastAttributeToE...
Read more

v12.0.0

05 Dec 11:52
Compare
Choose a tag to compare

Features

  • Introduced createDocumentFragment(), createElement() and createText() methods in UpcastWriter. Additionally, the View#change() method now returns the return value of its callback. Closes #1549. (ec13c85)

  • The 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.

Bug fixes

  • Model#deleteContent() will properly merge elements inside a limit element. Closes ckeditor/ckeditor5#1265. (5d26bc3)
  • Added MoveOperation x SplitOperation transformation for a case when graveyard element is moved. Closes #1580. (f88c918)
  • Better handling for MoveOperation x SplitOperation transformation special case. Closes ckeditor/ckeditor5#1288. (b92a800)
  • Corrected transformations for pasting and undo scenarios. Closes ckeditor/ckeditor5#1287. (b1e8975)
  • Do not run attribute-to-attribute downcast conversion on text node attributes. Closes #1587. (6659582)
  • Firefox should visually move the caret to a new line after a soft break. Closes #1439. (80392ad)
  • Made markers created by Writer#insert() affect the data. Closes #1583. (72aaaf0)

Other changes

  • 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)
  • Moved 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)
  • Vairous fixes in the API docs. Thanks to @denisname!

BREAKING CHANGES

  • The model Position.createAt() method was removed from the public API. Use writer.createPositionAt() instead. This method is also available on the Model instance.
  • The 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()
  • The model Position.createBefore() method was removed from the public API. Use writer.createPositionBefore() instead. This method is also available on the Model instance.
  • The model Position.createFromPosition() method was removed. Use writer.createPositionAt( position ) to create a new position instance. This method is also available on the Model instance.
  • The model Position.createFromParentAndOffset() method was removed. Use writer.createPositionAt( parent, offset ) instead. This method is also available on the Model instance.
  • The model Range.createIn() method was removed from the public API. Use writer.createRangeIn() instead. This method is also available on the Model instance.
  • The model Range.createOn() method was removed from the public API. Use writer.createRangeOn() instead. This method is also available on the Model instance.
  • The model Range.createFromRange() method was removed from the public API.
  • The model Range.createFromParentsAndOffsets() method was removed from the public API.
  • The model Range.createFromPositionAndShift() method was removed from the public API.
  • The model Range.createCollapsedAt() method removed method was removed. Use writer.createRange( position ) to create collapsed range. This method is also available on the Model instance.
  • The model Position.createAfter() method was removed from the public API. Use writer.createPositionAfter() instead. This method is also available on the Model instance.
  • The view Position.createAt() method was removed from the public API. Use writer.createPositionAt() instead. This method is also available on the View instance.
  • The view Position.createAfter() method was removed from the public API. Use writer.createPositionAfter() instead. This method is also available on the View instance.
  • The view Position.createBefore() method was removed from the public API. Use writer.createPositionBefore() instead. This method is also available on the View instance.
  • The view Position.createFromPosition() method was removed. Use writer.createPositionAt( position ) to create a new position instance. This method is also available on the View instance.
  • The view Range.createIn() method was removed from the public API. Use writer.createRangeIn() instead. This method is also available on the View instance.
  • The view Range.createOn() method was removed from the public API. Use writer.createRangeOn() instead. This method is also available on the View instance.
  • The view Range.createFromRange() method was removed from the public API.
  • The view Range.createFromPositionAndShift() method was removed from the public API.
  • The view Range.createFromParentsAndOffsets() method was removed from the public API.
  • The view 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.
  • The model Range.createFromRanges() method was removed from the public API.

v11.0.0

09 Oct 10:20
Compare
Choose a tag to compare

Bug fixes

  • Range transformation by the split operation will expand it if insertionPosition is equal to the range end. Modified transformations to align with that change. Closes ckeditor/ckeditor5#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!

  • Marked reused element attributes to be rendered if the element being replaced was also marked. Closes #1560. Closes #1561. (6619a1f)

  • Remove clone groups in view.DowncastWriter manually. Closes #1571. (420166a)

  • Use numbers instead of booleans in Array.sort(). (00fbf7f)

Other changes

  • Removed the concept of deltas. Added new operations (replacing removed deltas). Rewritten OT algorithms. Simple. 10k LOC added, 12.5k LOC removed. Closes #1162. (a5cf8b1)

  • Added logging for new operations. Closes #1491. (5c0a34d)

  • Added new OT tests, reached 100% code coverage again, fixed multiple OT scenarios, removed unreachable code. Closes #1474. (6c2151a)

  • Allowed using Mapper outside the conversion scope. Closes #1415. (6de6a00)

    Huge thanks to Mate Bartus for this contribution!

  • Always update attributes of reused elements while rendering. Closes #1560. (9b95a8a)

  • Changed long name returned by Operation.className property to a short one. Closes #1513. (7765953)

  • Made the view's stringify() dev util output the content of the UIElement (see ckeditor/ckeditor5-media-embed#1). (49cd795)

  • Made 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.

  • Prevent rendering when in the model.change() or model.enqueueChange() block. Closes #1528. (2ef33b1)

  • Renamed view Writer to DowncastWriter. Closes #1515. (5fd1ea5)

  • Swapped parameters order in the DowncastWriter#rename() method. The DowncastWriter#remove() method now accepts range or item. Closes #1521. (d289b74)

  • The model.insertContent() accepts range and position. Closes ckeditor/ckeditor5#1243. (bcdaaa9)

  • View post-fixer should be called once while rendering model changes. Closes #1564. (2f5af98)

BREAKING CHANGES

  • View post-fixers are now called only a single once when rendering model changes.
  • Swapped parameters order in the DowncastWriter#rename() method. See #1521.
  • The 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.
  • The concept of deltas (sets of operations) was removed from the engine. They were replaced by opertations matching the types of removed deltas.
  • 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).

v10.2.0

18 Jul 10:22
Compare
Choose a tag to compare

Features

  • Introduced ViewDocument#layoutChanged event. Closes #1445. (dab70e6)

Bug fixes

  • Attributes were incorrectly set on an element's children during upcast. Closes #1443. (dfa0b39)

  • Element to attribute upcast should set an attribute on all the elements inside the converted element. See #1443. (26673a0)

  • Expand selection mechanism will work correctly with the inline elements. Closes ckeditor/ckeditor5#1064. (e23742c)

  • Improved selection post-fixing mechanism for selections which cross limit element boundaries. Closes #1436. (e0a5a0b)

    Feature: The schema.getLimitElement() method now accepts also Range and Position as a parameter.

v10.1.0

21 Jun 09:26
Compare
Choose a tag to compare

Features

Bug fixes

Other changes

  • Renderer now uses partial text replacing when updating text nodes instead of replacing entire nodes. Closes #403. (797cd97)

v10.0.0

25 Apr 12:25
Compare
Choose a tag to compare

Other changes

BREAKING CHANGES

  • The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See ckeditor/ckeditor5#991 for more information.

v1.0.0-beta.4

20 Apr 10:51
Compare
Choose a tag to compare

Bug fixes

v1.0.0-beta.2

10 Apr 09:21
Compare
Choose a tag to compare

Features

  • Introduced writer#updateMarker() method. Closes #1299. (bed647f)
  • Introduced #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)

Bug fixes

  • 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)

Other changes

  • Increased the specificity of CSS rules. Introduced the .ck class for editor UI components (see: ckeditor/ckeditor5#494). (6bf32c0)
  • Refactored how markers removal is converted from the model to the view. Closes #1226. (f6de5f5)
  • Removed the unnecesary model.Writer#setTextData() method. Closes #1363. (b484822)
  • Renamed plural method names to singular and singular attribute names to plural. See ckeditor/ckeditor5#742. (9465c82)
  • View selection is now split onto Selection and DocumentSelection. Closes #1304 . (b466e3f)

BREAKING CHANGES

  • The 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.
  • The options.usingOperation option in writer#setMarker() is now a required one.
  • The range parameter was removed. Use options.range instead.
  • Properties in MatcherPattern, view ElementDefinition and options for conversion utils have been renamed: class to classes, style to styles, attribute to attributes.
  • Introduced 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.

v1.0.0-beta.1

15 Mar 11:50
Compare
Choose a tag to compare

Major refactoring

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://docs.ckeditor.com/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 :).

Features

  • Add support for the 'word' unit in the modifySelection() helper. (f37a97a)

  • Allowed passing true as view.Matcher's attribute match to check if that attribute is set. Closes #1239. (bc1c3e5)

  • Consumable type name is now normalized inside conversion.ModelConsumable methods. Closes #1214. (131e9c8)

  • Convert view to model using position. Closes #1213. Closes #1250. (1961395)

    Feature: Schema#findAllowedParent() has been introduced.
    Feature: SchemaContext#concat() has been introduced.

  • Engine debug tools can be easily disabled using disableEngineDebug() function. Closes #1193. (0934496)

  • Introduced ViewElementDefinition and definition-based-converters module with a set of utils allowing to turn element definitions to converters. Closes #1198. (d2e9f06)

  • Introduced composition observer. Closes #1329. (a0ad8fe)

  • Introduced decorable DataController#init metohd. Closes ckeditor/ckeditor5-core#120. (d20d660)

  • Introduced two-step caret movement mechanism. Closes #1289. (88bb94c)

Bug fixes

  • [Firefox] Added fix for typing space on the edge of inline elements. Closes ckeditor/ckeditor5#692. (3ea70f3)
  • 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)
  • Added a 50ms timeout after 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)
  • Added missing parse context in DataController#set(). Closes #1278. (8c56dce)
  • Corrected how change items in model.Differ are dismissed if they are in inserted/removed parent. Closes ckeditor/ckeditor5#733. (e70ab96)
  • Corrected offsets transformation in model.Differ when multiple change items interfere with each other. Closes #1309. Closes ckeditor/ckeditor5#849. (30dcf6c)
  • Fixed a bug where Firefox would throw an NS_ERROR_FAILURE error when moving selection from a nested editable to the root editable. Closes ckeditor/ckeditor5#721. (4b7d435)
  • Fixed memory leak in DocumentSelection. Closes #903. (7e352e3)
  • Improved how model.Differ checks whether the operation should be buffered or not. Closes #1326. (3e9f81b)
  • It should not be possible to move a model.Node from a model.Document to a model.DocumentFragment. Closes #1337. (24b97f5)
  • Registered $marker element in Schema. Closes #1317. (2d1d62f)
  • The fake selection container will not leak into the viewport. Closes ckeditor/ckeditor5#752. (3f059a7)
  • View stringify utility now sorts CSS classes and values in style attribute. Closes #1179. (fc7da80)

Other changes

  • Cleaned up the model, document and controllers API. Closes #1208. (aea6119)
  • Conversion utilities refactor. Closes #1236. (fd128a1)
  • Fix render() and change() flow. Introduce postfixers in view. Closes #1312. (63b9d14)
  • Introduced several improvements to conversion helpers. Closes #1295. Closes #1293. Closes #1292. Closes #1291. Closes #1290. Closes #1305. (809ea24)
  • Keep the same marker instance when marker is updated. (8eba5e9)
  • Make Position and Range immutable in model and view. Closes #897. (836dfd8)
  • Manual test for #475 now works correctly. Closes #1271. (c2d4cec)
  • Methods which modify the model's and view's tree are now protected and shouldn't be used directly in the code. Iinstance of Writer should be used instead. Closes #738. (a4f3dad)
  • Migrated package styles to PostCSS. Moved visual styles to ckeditor5-theme-lark (see ckeditor/ckeditor5-ui#144). (5f65823)
  • Moved consumable parameter to conversionApi parameter in downcast. Closes #1294. Closes #1261. (731db37)
  • Moved Document#getNearesetSelectionRange to Schema. Closes [#1227](https://github.com/ckeditor/ckeditor5-engine/issues...
Read more

v1.0.0-alpha.2

14 Nov 11:55
Compare
Choose a tag to compare

Bug fixes

  • model.Range will now be extended if it was collapsed and it was transformed by insertion. Closes #1159. (5f020b0)
  • Prevent adding inline filler to non-editable content. Closes #1170. (07a01b1)
  • The deleteContent() algorithm will use merging to "remove" empty element which will ensure a better conflict resolution on collaborative editing. Closes #1161. (0dd29d4)

Other changes

  • Removed the renderer-skipped-selection-rendering warning since it doesn't bring any value. Closes #1158. (4a5a5d1)
  • The removeHighlight() function now accepts descriptor id instead of a HighlightDescriptor object. Closes #1164. (7bde6f7)