implement Y.XmlFragment.length
This commit is contained in:
parent
fc4d6165b4
commit
13ad0c8464
@ -272,7 +272,7 @@ const formatText = (transaction, parent, left, right, currentAttributes, length,
|
||||
// iterate until first non-format or null is found
|
||||
// delete all formats with attributes[format.key] != null
|
||||
while (length > 0 && right !== null) {
|
||||
if (right.deleted === false) {
|
||||
if (!right.deleted) {
|
||||
switch (right.content.constructor) {
|
||||
case ContentFormat:
|
||||
const { key, value } = /** @type {ContentFormat} */ (right.content)
|
||||
|
@ -151,6 +151,10 @@ export class YXmlFragment extends AbstractType {
|
||||
return new YXmlFragment()
|
||||
}
|
||||
|
||||
get length () {
|
||||
return this._prelimContent === null ? this._length : this._prelimContent.length
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a subtree of childNodes.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user