Editor ‹ Chocolat API


Class method that returns the current Editor.

Returns Editor – the active editor.


The document edited by this editor.

Returns Document – the document being edited.


The containing tab.

Returns Tab – The containing tab.


The containing window.

Returns MainWindow – The containing window.


Get or set the selected text in this editor.

Returns Range – the range of the selected text.


Get the range of text that is visible in this editor.

Returns Range – the range of visible text.


Get the context (list of scopes) at the editor's selection.

Returns Array – a list of scopes for the selection.


Insert a snippet where the cursor is located.

  • snippet String – a snippet.


Access the storage object of the Editor (see Storage class).

Returns Storage – the storage.