Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Redactor formatting buttons active state #246

Closed
yingban opened this issue Jul 22, 2020 · 1 comment
Closed

Redactor formatting buttons active state #246

yingban opened this issue Jul 22, 2020 · 1 comment

Comments

@yingban
Copy link

yingban commented Jul 22, 2020

Hi,

I would like to know how I can add an active state, with a class for example on formatting buttons?
Foe this I would need some kind of on select event, which add a class to a button, and remove it on blur.

For example, if a user selects "Heading 1" for some text, he should be able to know that "Heading 1" was selected.

Screenshot 2020-07-22 at 14 47 17

Thank you for your help.

@yingban yingban changed the title Redactor build-in formatting buttons active state Redactor formatting buttons active state Jul 23, 2020
@yingban yingban closed this as completed Jul 23, 2020
@yingban
Copy link
Author

yingban commented Jul 23, 2020

I found a solution by using "ondropdown" event, which check my current selection text tag and classes, then toggle a class on the corresponding button.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant