implement .clone, .slice, and yxml.get

This commit is contained in:
Kevin Jahns
2020-11-08 01:51:39 +01:00
parent 86f7631d1e
commit 53f2344017
10 changed files with 202 additions and 1 deletions

View File

@@ -762,6 +762,15 @@ export class YText extends AbstractType {
return new YText()
}
/**
* @return {YText}
*/
clone () {
const text = new YText()
text.applyDelta(this.toDelta())
return text
}
/**
* Creates YTextEvent and calls observers.
*