Skip to main content

Editor42 as a jQuery plugin

When to use

When the page already runs on jQuery and you would rather keep talking to the field the way the rest of your code does.

How it works

One call — $('#editor').editor42({...}) — turns a textarea into an editor. The integration also patches .html(), .val(), .text(), .append() and friends, so they read from and write to the editor rather than the hidden textarea underneath it; the two buttons show exactly that.

How to start using

Install the integration with npm install @editor42/editor42-jquery, load it after jQuery, and call $(el).editor42(). It patches .html(), .val(), .text() and friends so they talk to the editor.

See the jQuery install page for self-hosting and the move from @tinymce/tinymce-jquery.