Interface MathfieldInternal
interface Mathfield { applyStyle ( style : Style ,
options ?: ApplyStyleOptions ) : void ; blur ? ( ) : void ; executeCommand ( command : Selector | [ Selector , ... any [] ] ) : boolean ; focus ? ( ) : void ; getCaretPoint ? ( ) : null | { x : number ; y : number ; } ; getPrompts ( filter ?: { correctness ?: "undefined" | "correct" | "incorrect" ; id ?: string ; locked ?: boolean ; } ) : string [] ; getPromptValue ( placeholderId : string ,
format ?: OutputFormat ) : string ; getValue ( format ?: OutputFormat ) : string ; getValue ( start : number ,
end : number ,
format ?: OutputFormat ) : string ; getValue ( range : Selection | Range ,
format ?: OutputFormat ) : string ; getValue ( arg1 ?: | number | Selection | Range | OutputFormat ,
arg2 ?: number | OutputFormat ,
arg3 ?: OutputFormat ) : string ; hasFocus ( ) : boolean ; insert ( s : string ,
options ?: InsertOptions ) : boolean ; select ( ) : void ; setCaretPoint ( x : number ,
y : number ) : boolean ; setValue ( latex ?: string ,
options ?: InsertOptions ) : void ; } Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:116 Methodsapply Style apply Style ( style , options ? ) : void Returns void Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:204 Optional
blur blur ( ) : void Returns void Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:182 execute Command execute Command ( command ) : boolean Returns boolean Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:135 Optional
focus focus ( ) : void Returns void Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:181 Optional
get Caret Point get Caret Point ( ) : null | { x : number ; y : number ; } Returns null | { x : number ; y : number ; } Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:211 get Prompts get Prompts ( filter ? ) : string [] Parameters Optional
filter : { correctness ?: "undefined" | "correct" | "incorrect" ; id ?: string ; locked ?: boolean ; } Optional
correctness ?: "undefined" | "correct" | "incorrect" Optional
id ?: string Optional
locked ?: boolean Returns string [] Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:220 get Prompt Value get Prompt Value ( placeholderId , format ? ) : string Returns string Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:219 get Value get Value ( format ? ) : string Returns string Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:150 get Value ( start , end , format ? ) : string Returns string Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:152 get Value ( range , format ? ) : string Returns string Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:154 get Value ( arg1 ? , arg2 ? , arg3 ? ) : string Internal
Returns string Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:156 has Focus has Focus ( ) : boolean Returns boolean Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:180 insert insert ( s , options ? ) : boolean Returns boolean Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:174 select select ( ) : void Returns void Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:157 set Caret Point set Caret Point ( x , y ) : boolean Returns boolean Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:215 set Value set Value ( latex ? , options ? ) : void Returns void Defined in node_modules/.pnpm/mathlive@0.98.6/node_modules/mathlive/dist/types/mathfield.d.ts:163
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"
.