v0.11.0
Bug fixes
-
[Firefox] Prevented setting incorrect initial selection when placeholder was clicked. See ckeditor/ckeditor5#469. (34498a8)
-
AttributeElement
s created by selection conversion were not merged withAttributeElement
s created by markers conversion. Closes #1117. (e6c5bcf) -
DataController#insertContent()
andDataController#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 aMarkerOperation
hadnull
as it'soldRange
ornewRange
. Closes #943. (d328811) -
model.Element#getNodeByPath()
andmodel.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 specificRemoveOperation
. 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
xRemoveDelta
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 concerningAttributeDelta
xSplitDelta
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 inSchema
in order to simplify the checks. -
model.LiveRange#event:change
got renamed tochange:range
. Introducedmodel.LiveRange#event:change:content
. Closes #1089. (ec22a29) -
model.LiveRange#event:change
now containsdata.batch
instance which changed the range. Closes #1076. (c6f5e9f) -
Enhanced
Selection#setTo()
, introducedSelection#setIn()
,Selection#setOn()
,Range.createCollapsedAt()
and renamed few existingSelection
methods for both model and view. Closes #1074. (070c313) -
Hide the caret when the editor is read-only.
EditingControler
is observable from now. Observable propertyisReadOnly
was added to theViewDocument
andEditingController
. 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()
andview.Node#getCommonAncestor()
. Closes #1033. (f913aee) -
Introduced
Position#getCommonAncestor( position )
andRange#getCommonAncestor()
methods for the view and model. Closes #1002. (0e29844) -
Introduced
Schema#getLimitElement()
. Closes #1042. (691e53e) -
Introduced
view.Document#keyup
event (fired by theKeyObserver
). 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 ofDataController.deleteContent()
toleaveUnmerged
. The default value stayedfalse
, 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
togetCommonAncestor()
. 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 toModelConverterBuilder#toElement()
. IntroducedModelConverterBuilder#toVirtualSelection()
which replaces current marker to element conversion.- The
DataController#deleteContent()
option was renamed frommerge
toleaveUnmerged
and the default behavior of the function was changed to merge blocks. - Removed
wrapRange()
andunwrapRange()
functions frommodel-to-view-converters.js
as they're no longer used. - Renamed marker stamps to marker elements in code and docs.
- Renamed
Selection#collapse()
toSelection#setCollapsedAt()
. - Renamed
Selection#setFocus()
toSelection#moveFocusTo()
. - The
includeNode
option ofNode#getAncestors()
methods (model and view) was renamed toincludeSelf
. See #1036. - Parameter change for
convertSelectionMarker()
function frommodel-selection-to-view-converters.js
. deltaTransform#transformDeltaSets()
is now an internal method. UseDocument#transformDeltas()
instead.- Removed
Renderer#getCorrespondingDom()
andRenderer#getCorrespondingView()
methods. - Renamed
Renderer#getCorrespondingDomText()
method toRenderer#findCorrespondingDomText()
andRenderer#getCorrespondingViewText()
toRenderer#findCorrespondingViewText()
. - Merged
Renderer#getCorrespondingDomElement()
andRenderer#getCorrespondingDomDocumentFragment()
into one methodRenderer#mapViewToDom()
. - Merged
Renderer#getCorrespondingViewElement()
andRenderer#getCorrespondingViewDocumentFragment()
intoRenderer#mapDomToView()
. History
API for deleting undone deltas has been removed.