getSelectionText
Function
Definition
Package:@progress/kendo-angular-editor
Syntax:
ts
import { getSelectionText } from '@progress/kendo-angular-editor';
export class AppComponent {
@ViewChild('editor') public editor;
public onClick() {
const selection = getSelectionText(this.editor.view.state);
}
}
Extracts the text from the current editor state's selection (see example).
Parameters:stateEditorState
The current EditorState.
string
The selected text.