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.
Parameters
Section titled “Parameters”editor
Section titled “editor”Editor to search in.
position?
Section titled “position?”number
Position to search in. Defaults to selectionStart.
Returns
Section titled “Returns”string