Reputation: 1750
I'm making use of TinyMCE's template plugin, but I'd like to customize the text that it displays in the menu bar. Currently it defaults to an icon:
What is the correct way of replacing this icon with some text that just says "Use Template"? Approaches I've considered:
Unfortunately, hiding templates within the insert menu or using the icon are not an option. Apologies if there's something that I've missed in the docs.
Upvotes: 1
Views: 314
Reputation: 1750
I ended up solving this by going through the plugin's source code, and modifying the following line:
editor.addButton('template', {
title: 'Insert template',
text: 'Use Template', // Added this attribute
onclick: createTemplateList(showDialog)
});
To avoid setting up the build process for TinyMCE, I just searched for Insert template
in the compiled/minified plugin and then added my text
attribute.
Upvotes: 0