-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
Changed
|
☝️ - fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, good job. Just minor things to fix.
src/model/documentfragment.js
Outdated
@@ -25,6 +25,10 @@ export default class DocumentFragment { | |||
/** | |||
* Creates an empty `DocumentFragment`. | |||
* | |||
* **Note:** Constructor of this class shouldn't be used directly in the code. Instead of use the | |||
* {@link module:engine/model/writer~Writer#createDocumentFragment} method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the second sentence could be: "Use the {@link module:engine/model/writer~Writer#createDocumentFragment} method instead."
* @param {Number} index Index of the first node to remove. | ||
* @param {Number} [howMany=1] Number of nodes to remove. | ||
* @returns {Array.<module:engine/model/node~Node>} Array containing removed nodes. | ||
*/ | ||
removeChildren( index, howMany = 1 ) { | ||
const nodes = this._children.removeNodes( index, howMany ); | ||
_removeChildren( index, howMany = 1 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move toJSON
and fromJSON
methods above protected ones. Please check other files you modified for correct order as described here. We sometimes forget about that but let's fix that starting with files modified in this PR.
It would be great to have |
|
All |
Nodelist constructor should be protected. |
Please check all properties and add I found these properties with missing
But there might be more. |
@pjasiun and @szymonkups, fixes that you proposed and missing I will fix the rest packages. |
Suggested merge commit message (convention)
Other: Methods which modify the model's and view's tree are now protected and shouldn't be used directly in the code. Instead of an instance of
Writer
should be used. Closes ckeditor/ckeditor5#3923.Other repositories which should be merged along with this PR: