Is there by any chance a class or an id that can be used to omit specific content in an HTML card from showing up in an email?
For example, say I’ve inserted a custom-created Twitter “embed” in an HTML card (that is, custom HTML, no actual iframe), replete with an SVG for the Twitter logo. But I don’t want the SVG (nor the user avatar) to show up in emails. Is there a way I can do so?
There’s no Ghost-specific feature for that. You could research HTML features are not support in email and try wrapping what you want to hide in that.
It would be an interesting and not-to-hard-to-implement feature for Ghost to support a class name that caused the element to disappear in email, but I’m not aware that such a thing exists now.
1 Like
Ha, I inadvertently figured it out, without the need for an unnecessary Ghost feature.
Add inline styling of display: none
to the portions of the HTML card that one doesn’t want to appear in emails/newsletters, then in one’s theme (or code injection) “restore” those portions to posts viewed in a browser by giving them a display
value of block
or inline
(or what have you) while making sure to add !important
to them.
If anybody’s interested I’ll share a repo of what I’ve got in a few weeks so anybody can replicate these manual custom-tweet-embeds on their site.