Install Txt42 plugin for Editor42
Editor42 is our free MIT-licensed rich text editor, an auditable fork of TinyMCE 6.8.6 with the same API under the editor42 global. The Txt42 plugin for TinyMCE runs in it unchanged: the same plugin, the same API key.
Plugin
Download
Get the Txt42 plugin for the Editor42 you already run.
Download PluginUnpack
Unpack the archive into the Editor42 folder, the one that holds
plugins/. The plugin lands here:editor42/
plugins/
chat-gpt/
plugin.js
plugin.min.jsEnable
Enable the Txt42 add-on in the Editor42 config and put its
Txt42ChatandTxt42Commandsbuttons on the toolbar:editor42.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 Editor42 from our cloud with the Txt42 plugin enabled and preconfigured, always the latest version. Start the editor with
editor42.init()inwindow.onEditorLoaded, as below.<!-- 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(...) also works: the global is aliased for compatibility
editor42.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
editor42.init(). The CDN script expects it to be present at load time, passed in the URL.Ready to Use
Configuration
Configure your Txt42 Editor42 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