email style tags

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #259857

Hi,

I have created order_status_notification.confirmed.html.php file and added style attributes like this:

<style type="text/css"> 
     .newclasss { color:#c9c9c9; } 
</style>

I use tinymce editor and when i try to send email from back-end, in preview, i see this tags are removed.
Is there a solution for this? I have tried a lot of things like "Extended Valid Elements" in the plugin settings but everything has failed...

The only thing did help was to use acymailing editor but with this editor i couldn't save product description when editing/creating product. After saving description gets removed...

Thanks

Last edit: 7 years 2 months ago by kyratn.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
7 years 2 months ago #259859

Hi,

It's normal that the style tags are removed. When HikaShop process the email, it takes the CSS code that you have in them, apply it to the elements in the email and remove the tags so that you get inline CSS in the emails so that the CSS code is properly used by all the email client software.
So you just need to use that class in the element where you want that CSS code to apply and you should see that CSS inlined in the element in the preview and in the email sent.

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
7 years 2 months ago #259893

Hi,

The problem is that i need to use media queries to make it responsive. As style tags are removed they are not used too.



Thanks

Last edit: 7 years 2 months ago by kyratn.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
7 years 2 months ago #259901

Hi,

Regarding that, it's the WYSIWYG editor which removes the tag.
Change the editor setting of the HikaShop configuration to none for example and you should keep your style tags when you send the email.
So either the editor has a setting to keep the style, or you have to live with that or use another text editor which can keep your style tags.

The following user(s) said Thank You: kyratn

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum