You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking to leverage the "afterToggleAttributes" hook on commitStyle, but am running into some issues.
My need for this is that when applying class attribute using this function, it adds the appropriate class the the class list, instead of setting it as the only one. I am looking for a way to replace the class attribute on thee element i am running this method on with the appropriate class as shown below. I have also added the list of options for some insight into the possible key values in the exec property.
When I trigger that commitStyle function, an error is thrown that I need an event handler for the hook. Where do I go about defining one, in the hook object?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Running Jodit v4.0.6
I am looking to leverage the "afterToggleAttributes" hook on commitStyle, but am running into some issues.
My need for this is that when applying class attribute using this function, it adds the appropriate class the the class list, instead of setting it as the only one. I am looking for a way to replace the class attribute on thee element i am running this method on with the appropriate class as shown below. I have also added the list of options for some insight into the possible key values in the exec property.
When I trigger that commitStyle function, an error is thrown that I need an event handler for the hook. Where do I go about defining one, in the hook object?
the documentation is not very clear to me:
https://xdsoft.net/jodit/docs/interfaces/types.IStyleOptions.html#hooks
Beta Was this translation helpful? Give feedback.
All reactions