Update
This commit is contained in:
31
public/admin/js/tinymce-branding-override.js
Normal file
31
public/admin/js/tinymce-branding-override.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// 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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user