Skip to content

Language

Language = object

Defined in: types.ts:51

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

Defined in: types.ts:67

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:53

Comment tokens used by the language.

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

Defined in: types.ts:75

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

InputSelection

string

PrismEditor

undefined | string

string which will get inserted behind the cursor.


optional getComments(editor, position, value): CommentTokens

Defined in: types.ts:61

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.