我正在使用IFTTT集成:
如果有新的RSS Feed项,请自行发送Gmail电子邮件
我在电子邮件正文中使用{{EntryContent}}
。
在我的具体情况中,{{EntryContent}}
包含<img>
个元素,其中包括我想要渲染无效的元素,即使它们不会显示在我的电子邮件正文中。
示例{{EntryContent}}
:
<p><a href="https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg"><img data-attachment-id="899263" data-permalink="https://stadt-bremerhaven.de/pokemon-go-ei-spektakel-bringt-besondere-pokemon-doppelten-sternenstaub-und-mehr/pogo_eggstravaganza/" data-orig-file="https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?fit=1024%2C512&ssl=1" data-orig-size="1024,512" data-comments-opened="1" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="pogo_eggstravaganza" data-image-description="" data-medium-file="https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?fit=720%2C360&ssl=1" data-large-file="https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?fit=720%2C360&ssl=1" src="https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?resize=720%2C360" alt="" width="720" height="360" class="aligncenter size-medium wp-image-899263" srcset="https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?resize=720%2C360&ssl=1 720w, https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?resize=768%2C384&ssl=1 768w, https://i0.wp.com/stadt-bremerhaven.de/wp-content/uploads/2018/03/pogo_eggstravaganza.jpg?w=1024&ssl=1 1024w" sizes="(max-width: 720px) 100vw, 720px" data-recalc-dims="1" /></a><br /> Gute Nachrichten für alle Pokémon GO-Trainer! Am 22. März startet um 21 Uhr das <a href="https://pokemongolive.com/post/eggstravaganza2018/">diesjährige Ei-Spektakel</a>. Das bringt gleich mehrere
仅使用HTML元素,有没有办法使这些内容无用,以便不显示图像,只显示纯文本?
我已经尝试<textarea>{{EntryContent}}</textarea>
,但它只适用于第一段。
答案 0 :(得分:1)
如果您能够将内容包装在文本区域中,我会假设您可以访问<style>
标记。在电子邮件正文中,您可以添加样式标记:
<style>
img[data-permalink] { display: none; }
</style>
添加您要隐藏的任何其他内容。