Character Style "Include Classes in HTML" checkbox removes whole tag
The "Include Classes in HTML" checkbox doesn't work for Character Styles. Whereas paragraph styles and object style export without the class, character styles actually export without the tag at all—losing any formatting for that style. This is the case both in HTML and EPUB export.
I agree. I have found that the HTML exporting should be more specific, such as keep tags, but do not include classes.
Yes this was driving me crazy thinking I was doing something wrong. This a bug specific to CHARACTER styles as you said (the equivalent export settings for paragraph styles work properly).
Create new document
type some text
create a new character style, for example “Italics”
In the character style’s Export Tagging settings, choose:
> Tag: em
> UNCHECK “Include Classes in HTML”
Now apply that character style to any word in your text.
File >> Export >> HTML
[specific settings here don’t matter, just click ok]
What should happen:
HTML should export with your chosen word wrapped in a basic <em></em> tag, with no class
What actually happens:
HTML exports with NO tag wrapping the chosen word at all. The tag is completely ignored.
The only way to get the character style’s tag to successfully export is to check “include classes in HTML”. But this is not desirable when we do not want/need any classes, such as for simple <em> or <strong> tags.
Would appreciate if you could fix as this would really clean up our HTML markup.