You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you do the addButton operation in a plugin the icon is not displayed. No errors are shown in the console.
tinymce.PluginManager.add('adbplugins', function(editor, url) {
editor.ui.registry.addButton('customButton', {
tooltip: 'A sample custom button',
icon: 'myCustomIcon',
onAction: function(buttonApi) { /* some code */}
});
I have only tested on 5.0.9.
The text was updated successfully, but these errors were encountered:
@ScottYeadon thanks for the report! I was able to verify the issue, however it's not the same as #4887. The problem appears to be that because we lowercase everything when adding it to the registry, the icon name in the button spec doesn't match so it fallsback to our "placeholder" icon. So it seems as though the issue is that when doing the name lookup for the button icon we aren't lowercasing the name. I'll log an internal task for us to fix that up.
Here's a working example from your snippets above, where all I did to get it working was to change myCustomIcon to mycustomicon: http://fiddle.tinymce.com/ILgaab
Icons display a bomb icon instead of loading the correct icon. See issue #4887 as it still seems to be a problem in 5.0.9
So I create the file:
/icons/custom/icons.js:tinymce.IconManager.add('custom', {
icons: {
'myCustomIcon': '...'
}
});
Init code:
tinymce.init({
...
icons: 'custom'
});
When you do the addButton operation in a plugin the icon is not displayed. No errors are shown in the console.
tinymce.PluginManager.add('adbplugins', function(editor, url) {
editor.ui.registry.addButton('customButton', {
tooltip: 'A sample custom button',
icon: 'myCustomIcon',
onAction: function(buttonApi) { /* some code */}
});
I have only tested on 5.0.9.
The text was updated successfully, but these errors were encountered: