Just a small one.
I am writing a plugin to insert external image URL's with custom css classes (I have my own image select). I'd like reuse the image icon from the image select, but I didnt find out how to reuse the svg icon without renaming my plugin like the icon 'insert_image', as I dont want to overwrite it.
As far as I understood the name of the icon originates from the name of the plugin.
Is there an easy option to use that icon or shall I make a PR with an option for defining the svg-icon?
In general I'd like to start contributing to OSS, but if there is a already way that'd be useless.
Hi!
Yep, you have the ico option: https://github.com/Alex-D/Trumbowyg/blob/develop/examples/plugins/base64.html#L61
You can use it on any button or sub-button :)
Ahh, I saw that line. It's the way it works for dropdowns.
The clue was to use the 'ico' key directly, when not using dropdowns:
const btnDef = {
ico: 'insertImage',
fn: function(cmd) {
// doStuff
}
};