Files
aritmija/public/admin/js/tinymce-branding-override.js
2026-05-13 17:11:09 +02:00

32 lines
1.0 KiB
JavaScript

// TinyMCE Branding Override
// This script should be loaded after the main admin.js file
(function() {
// Wait for TinyMCE to be available
if (typeof tinymce !== 'undefined') {
// Override the default branding setting for all future editors
const originalInit = tinymce.init;
tinymce.init = function(config) {
// Add branding: false to disable the "Powered by Tiny" text
config.branding = false;
// Also disable promotion if it exists
if (typeof config.promotion === 'undefined') {
config.promotion = false;
}
return originalInit.call(this, config);
};
// If there are already initialized editors, update them
if (tinymce.editors && tinymce.editors.length > 0) {
tinymce.editors.forEach(function(editor) {
if (editor.settings) {
editor.settings.branding = false;
editor.settings.promotion = false;
}
});
}
}
})();