implement .clone, .slice, and yxml.get
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user