|
this.container.documentEditor.selection.text; |
Thanks!
this.container.documentEditor.selection.text It is about the selected text. But what about the clicked text?
|
var startOffset = containerInstance.documentEditor.selection.startOffset;
var endOffset = containerInstance.documentEditor.selection.endOffset;
container.documentEditor.selection.selectCurrentWord();
var text = this.container.documentEditor.selection.text; // you can customize based on your requirement.
// You can set cursor position to anywhere in the document via select API of selection module.
container.documentEditor.selection.select(startOffset, endOffset) ;
|