Skip to content

getLanguage

getLanguage(editor, position?): string

Defined in: utils/index.ts:93

Gets the current language at a position. Useful if you want to run different logic based on the language.

PrismEditor

Editor to search in.

number

Position to search in. Defaults to selectionStart.

string