Skip to content
Discussion options

You must be logged in to vote

Putting a button inside the brush dropdown means overriding the color-picker control, which is fiddly — but if you just want a one-click "transparent background", a separate toolbar button is easy. It runs the same command the brush uses:

editor.execCommand('background', false, 'transparent');

Register it through controls / extraButtons with that exec, and it'll apply to the current selection. Want the full button snippet?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xdan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants