InternalOptionaloptions: ApplyStyleOptionsOptionalblurExecute a [[Commands|command]] defined by a selector.
mfe.executeCommand('add-column-after');
mfe.executeCommand(['switch-mode', 'math']);
A selector, or an array whose first element is a selector, and whose subsequent elements are arguments to the selector.
Selectors can be passed either in camelCase or kebab-case.
// Both calls do the same thing
mfe.executeCommand('selectAll');
mfe.executeCommand('select-all');
OptionalfocusOptionalgetThe bottom location of the caret (insertion point) in viewport coordinates.
See also [[setCaretPoint]]
Return the content of the \placeholder{} command with the placeholderId
Optionalformat: OutputFormatReturn a textual representation of the content of the mathfield.
Optionalformat: OutputFormatThe format of the result. If using math-json
the Compute Engine library must be loaded, for example with:
import "https://unpkg.com/@cortex-js/compute-engine?module";
Default: "latex"
Return the value of the mathfield from start to end
Optionalformat: OutputFormatReturn the value of the mathfield in range
Optionalformat: OutputFormatInternalOptionalarg1: number | Selection | Range | OutputFormatOptionalarg2: number | OutputFormatOptionalarg3: OutputFormatReturn true if the mathfield is currently focused (responds to keyboard input).
Insert a block of text at the current insertion point.
This method can be called explicitly or invoked as a selector with
executeCommand("insert").
After the insertion, the selection will be set according to the
options.selectionMode.
Optionaloptions: InsertOptionsSet the content of the mathfield to the text interpreted as a LaTeX expression.
Optionallatex: stringOptionaloptions: InsertOptions
Update the style (color, bold, italic, etc...) of the selection or sets the style to be applied to future input.
If there is no selection and no range is specified, the style will apply to the next character typed.
If a range is specified, the style is applied to the range, otherwise, if there is a selection, the style is applied to the selection.
If the operation is
"toggle"and the range already has this style, remove it. If the range has the style partially applied (i.e. only some sections), remove it from those sections, and apply it to the entire range.If the operation is
"set", the style is applied to the range, whether it already has the style or not.The default operation is
"set".