Closed wharnisch closed 3 years ago
Hi,
actually these are (slightly) different commands, i just didn't have different icons for them.
If you take a look at the source code (AllCommandsEditorToolbar), the first icon each toggles text- / background color on / off, with the second one you can set the color:
addCommand(SwitchTextColorOnOffCommand())
addCommand(SetTextColorCommand())
addCommand(SwitchTextBackgroundColorOnOffCommand())
addCommand(SetTextBackgroundColorCommand())
The AllCommandsEditorToolbar is only meant as a show case, it's not meant for production use.
Sorry that I haven't investigated this better. Regards from Austria
Toggling text-/background color is exactly the functionality I was looking for. I didn't find it in GroupedCommandsEditToolbar.
So, if AllCommandsEditorToolbar is not meant for productive use, which toolbar class should be used for productive use? Or should I write my own toolbar class derived from EditorToolbar for productive use?
Yes, creating your own with exactly the commands you actually need is how it's meant to be. Simply take a look at GroupedCommandsEditToolbar or AllCommandsEditorToolbar how that's done (should actually be fairly easy).
If you like to, you can of course also use AllCommandsEditorToolbar. It's just not meant to be used that way :) (i think it's too overloaded and has a bad UX as you have to scroll to the right to see all commands).
There seems to be double occurence of some tools in AllCommandsEditorToolbar:
Regards from Austria