This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
v12.0.0
Features
-
Introduced
createDocumentFragment()
,createElement()
andcreateText()
methods inUpcastWriter
. Additionally, theView#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 theoffset
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
xSplitOperation
transformation for a case when graveyard element is moved. Closes #1580. (f88c918) - Better handling for
MoveOperation
xSplitOperation
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
andSelection
static factories from those classes to the model/view writers andModel
/View
instances. Previously, those factories were available as static methods of thePosition
,Range
andSelection
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. Usewriter.createPositionAt()
instead. This method is also available on theModel
instance. - The
offset
parameter of the following methods does not default to0
and hence is no longer optional whenitemOrPosition
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. Usewriter.createPositionBefore()
instead. This method is also available on theModel
instance. - The model
Position.createFromPosition()
method was removed. Usewriter.createPositionAt( position )
to create a new position instance. This method is also available on theModel
instance. - The model
Position.createFromParentAndOffset()
method was removed. Usewriter.createPositionAt( parent, offset )
instead. This method is also available on theModel
instance. - The model
Range.createIn()
method was removed from the public API. Usewriter.createRangeIn()
instead. This method is also available on theModel
instance. - The model
Range.createOn()
method was removed from the public API. Usewriter.createRangeOn()
instead. This method is also available on theModel
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. Usewriter.createRange( position )
to create collapsed range. This method is also available on theModel
instance. - The model
Position.createAfter()
method was removed from the public API. Usewriter.createPositionAfter()
instead. This method is also available on theModel
instance. - The view
Position.createAt()
method was removed from the public API. Usewriter.createPositionAt()
instead. This method is also available on theView
instance. - The view
Position.createAfter()
method was removed from the public API. Usewriter.createPositionAfter()
instead. This method is also available on theView
instance. - The view
Position.createBefore()
method was removed from the public API. Usewriter.createPositionBefore()
instead. This method is also available on theView
instance. - The view
Position.createFromPosition()
method was removed. Usewriter.createPositionAt( position )
to create a new position instance. This method is also available on theView
instance. - The view
Range.createIn()
method was removed from the public API. Usewriter.createRangeIn()
instead. This method is also available on theView
instance. - The view
Range.createOn()
method was removed from the public API. Usewriter.createRangeOn()
instead. This method is also available on theView
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. Usewriter.createRange( position )
to create a collapsed range. This method is also available on theView
instance. - The model
Range.createFromRanges()
method was removed from the public API.