Install Txt42 plugin for TinyMCE
Txt42 adds an AI assistant to your TinyMCE: chat with your document or run AI actions on a selection, and accept or reject every edit it proposes right in the content.
Plugin
Download
Get the Txt42 plugin for upgrading your existing installation of:
- Editor42, our free TinyMCE fork, with its own installation page
- TinyMCE 8, 7, 6 and 5
Unpack
Unpack the archive into the TinyMCE folder, the one that holds
plugins/. The plugin lands here:tinymce/
plugins/
chat-gpt/
plugin.js
plugin.min.jsEnable
Enable the Txt42 add-on in the TinyMCE config and put its
Txt42ChatandTxt42Commandsbuttons on the toolbar:tinymce.init({
selector: "#editor",
plugins: "chat-gpt",
toolbar: "undo redo | bold italic | Txt42Chat Txt42Commands",
// apiKey: "...",
// Get your own key in the Dashboard: https://txt42.ai/dashboard
});Ready to Use
CDN
Add the CDN Script
One script loads the editor with the Txt42 plugin enabled and preconfigured, always the latest version, cached on the CDN. The editor is Editor42, our free editor based on TinyMCE, so
tinymce.init()works unchanged. To keep TinyMCE itself, install Txt42 as a plugin (the first tab).<!-- This div will be replaced with the editor -->
<div id="editor"></div>
<!-- Place this before adding the script with Txt42
to correctly process the moment when it is loaded -->
<script type="text/javascript">
window.onEditorLoaded = function() {
tinymce.init({
selector: "#editor",
});
}
</script>
<!-- Load the script. The API key can be found in the Dashboard -->
<script type="text/javascript"
src="https://cloud.n1ed.com/v/latest/sdk/n1ed.js?apiKey=MYAPIKEY">
</script>Txt42 is part of the N1ED family — its scripts are served from N1ED's cloud,
cloud.n1ed.com, the one loader every product of the family shares.You can copy this snippet into any place of your
<body>tag, but the scripts must go below the editor placeholder and their order is important.Set API key
Get your own API key in the Dashboard and put it into the URL after
?apiKey=in place ofMYAPIKEY. The Dashboard is also where you configure the AI provider keys, the chat and the toolbar of that key.Please don't pass your API key as a parameter to
tinymce.init(). The CDN script expects it to be present at load time, passed in the URL.Ready to Use
Configuration
Configure your Txt42 TinyMCE installation in the Dashboard: the AI provider keys of the Enterprise plan, the chat and the toolbar buttons, all without touching the code. See Configuration.
Dashboard