0 comment(s).

Chapter 7. Commands

Table of Contents

Command input
Command output
Discard
Replace selected text
Replace document
Insert as text
Insert as snippet
Show as HTML
Show as tooltip
Create new document
Server scripts

Commands are subroutines performing virtually anything beyond scope of snippets and text editor in general. They are the most powerful ways of extending editor capabilities, adding many useful functionality without interfering with the text-editing code. They take set of input parameters and returns an output. They are activated using key shortcut or tab trigger.

Command input

Commands can take two kinds of parameters depending on state of editing at the moment of activating. You can specify either no parameters, whole document or selected text. If no selection is made, you may optionally specify active character, word or line as an input parameters.