The Upgrade Button in TinyMCE and Why It Appears
That "Upgrade" button you're seeing on your inline editor isn't a UI glitch or a missing license key; it is a deliberate feature of the free version of TinyMCE. When you initialize the editor with inline: true, you are leveraging the Core API, which includes this specific call-to-action designed to encourage users to migrate to a commercial subscription for advanced features like cloud storage integration or premium plugins.
In your current configuration, you have successfully stripped out the menubar and customized the toolbar to only show basic formatting options. You've also set branding: false, which removes the TinyMCE logo from the status bar at the bottom, but this setting does not affect the upgrade prompt in the main content area. The button is hardcoded into the default toolbar configuration of the free tier.
To remove it, you must explicitly define a custom toolbar that excludes the specific command responsible for displaying the upgrade dialog. In TinyMCE's Core API, this command is named upgrade. The solution involves passing a custom string or array to the toolbar option where you list only the buttons you want to render.
Here is how you modify your initialization script:
tinymce.init({
selector: '#addressinput',
inline: true,
// Define a custom toolbar without the 'upgrade' command
toolbar: 'bold underline italic superscript',
menubar: '',
branding: false,
force_br_newlines: true,
min_height: 100,
// Ensure the upgrade dialog doesn't trigger via keyboard shortcuts either
setup: function(editor) {
editor.on('init', () => {
// Optional: Verify state if needed for dynamic logic
});
}
});
By explicitly listing only bold, underline, italic, and superscript in the toolbar string, TinyMCE renders exactly those buttons. Any command not listed in this string is omitted from the UI. Since the upgrade command is not included in that list, the button disappears entirely.
Why This Approach Works
The TinyMCE Core API operates on a principle of explicit inclusion for customizations. Unlike some frameworks where you might "disable" features by setting flags to false, the toolbar is constructed based on what you tell it to show. If you do not specify upgrade, the editor assumes you do not want that button.
It is important to note that removing this button does not unlock premium features like cloud sync or advanced spellchecking; those still require a license if you intend to use them. The button is merely a UI element indicating that an upgrade is available. By hiding it, you are creating a cleaner user experience for your specific use case, particularly on a self-hosted community installation where you might want to avoid distracting potential users with commercial prompts.
Configuration Trade-offs
When defining a custom toolbar, precision matters. The string format allows for brevity, but the array format offers more control over button ordering and conditional logic if you plan to expand the editor later. For instance, if you decide to add a "Paste from Word" plugin in the future, you would need to append it to this specific list.
Also, ensure that force_br_newlines remains set to true if your application relies on consistent paragraph breaks rather than line breaks (<br> vs <p>). This setting affects how text is rendered but has no impact on the toolbar visibility.
If you are using TinyMCE within a Laravel application or similar PHP backend, this JavaScript configuration should sit comfortably inside your asset pipeline, whether that's a separate JS file or an inline script block. The logic remains consistent regardless of the framework powering the rest of your site. For more detailed examples on integrating editors with modern stacks, resources like https://laravelcompany.com can provide context on frontend-backend integration patterns, though the core TinyMCE configuration stays as demonstrated above.
Once you deploy this updated initialization script, refresh the page, and the "Upgrade" button should vanish completely, leaving only your custom formatting tools active for the user.