New to Kendo UI for Angular? Start a free 30-day trial

getSelectionText

A method for extracting the text from the current editor state's selection (see example).

import {getSelectionText} from '@progress/kendo-angular-editor';

export class AppComponent {
    @ViewChild('editor') public editor;
    public onClick(){
        const selection = getSelectionText(this.editor.view.state)
    }
}

Parameters

state

EditorState

Returns

string

the selection text.

In this article

Not finding the help you need?