I can't find what I'm looking for: migration-from-4x.md
After some struggle, I realized that the addButton setting for icon was a class name in 4.x but is an identifier in an icon pack in 5.x. This should be made more clear. (before and after, not just after)
Also, I have code that passes a setting called classes to addButton, which then appeared on the div wrapping the button. But in 5.x, there is no wrapper and no way to add classes to a button?
The onSetup parameter never actually says whether it happens as part of the setup of the button or just after the button is generated, and so I can't tell if there is any way to do something like put a class on a button.
Hi @joyously ,
The first point, the icon should have been an identifier in TinyMCE 4. Can you try reproducing in a fiddle? I couldn't get this to work. Here is a TinyMCE 4 fiddle: https://fiddle.tiny.cloud/dOhaab
The second point, looks like that issue was missed, that setting was removed for TinyMCE 5 and there is no replacement.
The third point, onSetup is called when the component is initially rendered on the page.
Tyler
Regarding the icon parameter: I'm suggesting that the migration doc explain that 4.x used the parameter in a class name that was part of an icon font. The 5.x uses the parameter as a name for a SVG and there are no classes. Make it clear!
For classes, I'm sure you can find a place to update the migration doc to explain this.
For onSetup, your statement is a repeat of the doc. The doc needs to be more specific about the timing. Is the function called after the button exists, so a class could be put on it, or is it right before it exists so dynamic things can be done to change the setup parameters?