Skip to content

Language

Language = object

Defined in: types.ts:52

optional autoIndent: [(selection, value, editor) => boolean?, (selection, value, editor) => boolean?]

Defined in: types.ts:68

Callbacks controlling the automatic indentation on new lines. First function should return whether indentation should be increased. Second function should return whether to add an extra line after the cursor.


optional comments: CommentTokens

Defined in: types.ts:54

Comment tokens used by the language.

optional autoCloseTags(selection, value, editor): string | undefined

Defined in: types.ts:76

Function called when the user types >. Intended to auto close tags.

InputSelection

string

PrismEditor

string | undefined

string which will get inserted behind the cursor.


optional getComments(editor, position, value): CommentTokens

Defined in: types.ts:62

Method called when a user executes a comment toggling command.

PrismEditor

The editor the user is interacting with.

number

Where in the code the comment is being toggled.

string

Current code in the editor.

CommentTokens

The comment tokens that should be used for this command.