The Math plugin provides a way for users to insert complex formulas.
To set up the Math plugin user interface in the editor:
-
add
mathto the plugins option in the editor configuration;
For example:
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'math',
toolbar: 'math',
});To work with math elements, follow these steps:
-
Enable Math Plugin
-
Open the {productname} editor with the Math plugin enabled.
-
-
Insert or Edit Math Elements
-
Click the Math plugin icon in the toolbar.
-
This opens the Math dialog.
-
Select preferred language
-
Enter Math formula in the textarea.
-
Choose preferred text wrap
-
-
Preview and Save
-
Check Math formula output in preview.
-
Review the final Math equation in the preview section.
-
Click the save button in the Math dialog.
-
The Math equation is inserted into the editor, wrapped accordingly based on the chosen text wrap.
-
Formula Tag Wrapping
-
The Math dialog wraps the inserted formula with a specific tag.
-
The choice of tag depends on the selected text wrap option in the dialog:
-
For block (Text above and below) text wrap, the tag used is
<tiny-math-block>. -
For inline (Inline with text) text wrap, the tag used is
<tiny-math-inline>.
-
|
Note
|
Visit https://katex.org/docs/supported for a comprehensive list of supported symbols and functions when inserting mathematical equations after selecting "Language (LaTeX)". |
The Math plugin provides the following {productname} commands.