Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

tagClasses don't set when updating selected text #1501

Open
waltsatan opened this issue Feb 1, 2025 · 1 comment
Open

tagClasses don't set when updating selected text #1501

waltsatan opened this issue Feb 1, 2025 · 1 comment

Comments

@waltsatan
Copy link

Hi,
I'm using the tagClasses option to add additional classes to my header tags (t-h1, t-h2, etc). It works as expected, but if I select some text already in my editor, change it to Header 1 or Header 2, the class isn't added if I immediately output the text via .trumbowyg('html'). If I set it again, the tag is there. Is there some sort of refresh not happening when the text's format is first changed?
Thanks for any insight.

@waltsatan
Copy link
Author

Fiddled around a bit and moved:

t.syncCode();
t.semanticCode(false, true);

on line 1527 to after the try block below that has:

$(listId).addClass(classes);

This fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant