Some teams need an editor with no AI in it: a policy forbids it, a customer contract excludes it, or the feature simply is not wanted. Hiding the Ask AI toolbar button is not enough on its own, because the button is only one of the ways in. This page lists every way in, and the configuration that closes all of them.
What the editor does by default
The AI features live in one plugin, the AI Toolkit (aitoolkit.js), which is bundled inside all_plugins.js. The editor does not contact an AI service by itself. A request only leaves the browser if you set aiToolkitResolver to a function that calls your own endpoint or provider. With no resolver the plugin runs in a demo mode that answers locally, with no network call and no API key.
So if you never configured a resolver, no document text has been sent anywhere. The buttons are still there.
Where AI can be reached
- The Ask AI toolbar button. The stock
defaultandfulltoolbars include it. Thebasicandmobiletoolbars do not. - The right-click menu.Right-clicking selected text opens a short menu of AI actions (explain, rewrite, summarize, translate) in place of the browser’s own menu.
- The script API.
editor.aiToolkitexists whenever the plugin is loaded. Your users cannot reach it, but your own code can. - The slash menu, only if you opted in. AI actions appear there when
slashCommandIncludeAiis set. It is off unless you turned it on.
Turn AI off with configuration
This keeps your current script tags and removes every AI entry point a user can reach.
var config = {
toolbar: "default",
aiToolkitEnabled: false, // the plugin skips its own setup
aiToolkitAutoToolbarButtons: false, // and must not add its button to a toolbar
aiContextMenu: false // right-click shows the browser's menu again
};
// The stock "default" and "full" toolbars name the AI command. Take it out.
["toolbar_default", "toolbar_full"].forEach(function (name) {
config[name] = RTE_DefaultConfig[name]
.replace(/[#|]?\{aiassist\}/g, "")
.replace(/,?aiassist/g, "");
});
var editor = new RichTextEditor("#editor", config);All four parts matter. In version 2.6.19, aiToolkitEnabled: false on its own leaves the Ask AI button in the default and full toolbars and leaves the right-click menu active, because those toolbars name the command themselves. Use the whole snippet.
If you already pass your own toolbar string, you do not need the loop. Check that your string does not contain aiassist, and keep the three settings.
To apply this to every editor on a site, put the same values in the RTE_DefaultConfig block at the top of rte.js instead of repeating them in each page.
Remove the AI code altogether
With the configuration above, editor.aiToolkit still exists, because the plugin file is still loaded. If your policy is that the AI code must not ship at all, stop loading it:
- Replace
all_plugins.jswith the individual plugin files you use, and leave outplugins/aitoolkit.jsandplugins/aitoolkit.css. Loading only the plugins you use lists the files for common setups. - Keep the toolbar change from the snippet. Without it the stock toolbars still show an Ask AI button that no longer does anything.
After that, editor.aiToolkit is undefined and there is no AI code on the page.
How to check the result
- Load the page. The toolbar has no Ask AI button.
- Select a sentence and right-click it. You get the browser’s own menu, not a list of AI actions.
- In the browser console, run
typeof editor.aiToolkit. It prints"undefined"if you removed the plugin file, and"object"if you only changed the configuration. - Open the Network tab and edit for a minute. No request goes to an AI provider. None did before either, unless you had set a resolver.
Dictation is separate
Speech-to-text is a different plugin and is off by default. It only appears if you set dictationEnabled: true. Leave it off if audio must not leave the device: in some browsers, including Chrome, speech recognition runs on the browser vendor’s servers.
Related reading
Every AI setting is described in the AI Toolkit reference and the configuration reference. If you do use AI later, see streaming AI through your own server for keeping provider keys out of the browser.
RichTextEditor is a perpetual-licence JavaScript editor — one purchase, self-hosted, no metered editor loads. Download the evaluation or see how it compares.