Plugins
OverviewHTML editors
CKEditor 5 CKEditor 4 TinyMCE 6 and 7 TinyMCE 4 Froala Tiptap AngularCMS and LMS
WordPressMoodle Canvas, Blackboard and LTI Blogger
Other
Google Docs and Slides TiddlyWikiDevelopers
Writing your own
WordPress
The fxEditor plugin for WordPress 5.0 and later (tested up to 7.1) adds an fx button to the Classic Editor's toolbar. It opens the equation editor in a dialog and inserts the equation into your post as MathML or an SVG image. Double-click an equation to edit it again. This is the editor it adds, running here outside WordPress:
Preview. Version 4.1 is not yet listed in the WordPress plugin directory.
Take it from the download in Customise and download below: its
eqneditor folder is the plugin.
Installation
- Zip the
eqneditorfolder from the download below and upload it through Plugins → Add New → Upload Plugin, or copy the folder into/wp-content/plugins/. - Activate CodeCogs Equation Editor under Plugins.
- If your site uses the block editor, install and activate the official Classic Editor plugin, or add equations inside a Classic block. The fx button attaches to the Classic Editor's toolbar, which the block editor's own blocks do not have.
- Give the plugin your licence key, below. Then open a post: the fx button is on the toolbar.
Your licence key
The plugin has no settings page; it reads its configuration from JavaScript globals set in the
admin pages. The simplest place to set them is a small must-use plugin — a file in
/wp-content/mu-plugins/:
<?php
// wp-content/mu-plugins/eqneditor-config.php
add_action( 'admin_head', function () {
echo '<script>'
. 'window.eqneditorServer = "fxtex.codecogs.com";'
. 'window.eqneditorLicence = "fx_pk_your-key-here";'
. 'window.eqneditorDesign = { colour: "#0f7a4d" };' // optional
. '</script>';
} );
| eqneditorLicence | Your fxEditor licence key. Required. |
| eqneditorDesign | The editor's look: dialog width, height and scale, toolbar panels and size, colour, equation and markup sizes, undo/redo, how the dialog opens. Build one in Customise and download; see A design. |
| eqneditorServer | Host the equation editor is loaded from: 'fxtex.codecogs.com'. |
| eqneditorRenderUrl | The fxTeX Server that draws equations inserted as images: 'https://fxtex.codecogs.com', or your own. |
| eqneditorScriptUrl, eqneditorCssUrl, eqneditorMathmlCssUrl | Full URLs of the editor bundle and its stylesheets, when the defaults do not suit. |
Customise and download
Make the equation editor your own: choose what it shows, drag panels from
More panels into up to three toolbar rows, and pick a colour and sizes. The preview is
the real WordPress page, rebuilt as you go. Then add your licence key and download it: an
example.html with a page of equations to edit, loading everything it needs from
fxplugins.codecogs.com.
Your toolbar
More panels 0
Your design
The option that gives WordPress this design — it is already in the download. Leave it out and the editor uses the standard design.
Your key is in the licence manager on fxEditor — or get one. Without a key, the download still works: equations show why they cannot render until you add one.
Complete example
The whole of the page running above: a simple, complete HTML page that loads WordPress and the
plugin. Every file comes from fxplugins.codecogs.com, so it works as it is —
put in your own licence key. (Keys are shortened here.)
Equations in your posts
The author chooses MathML or an SVG image in the dialog. The plugin lets MathML through
WordPress's content filter, so Authors and Contributors can save it too — without that,
WordPress strips <math> from the posts of anyone who cannot post unfiltered
HTML.
For MathML to display at its best, your theme needs one stylesheet. Add it to the theme's
header, or with wp_enqueue_style:
add_action( 'wp_enqueue_scripts', function () {
wp_enqueue_style( 'fxtex', 'https://fxtex.codecogs.com/fxtex.css' );
} );
CodeCogs®