Hi,
Can we append inline styles directly instead of custom classes in RTE
Example : when custom style is selected in RTE it is appending as
<span class="text-blue"><span> instead of that can we append inline styles
like <span style="font-size: 23px;
color: #FFF;"></span>
Please provide suggestions!
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Satish2info ,
Yes, you can do that using the RTE source edit plugin. But if it is removing your style attributes after submitting dialog then you need to enable those attributes from xssprotection.xml file. Check out this blog for more details.
Hi @Satish2info ,
If you have enabled source code plugin, IMHO It's absolutely OK to have inline styles with RTE. I have used many times in my past specially in Email Campaign.
However, It is best practice to add styles through dialog
Hope that helps!
Regards,
Santosh
Hi @SantoshSai
Thank you for your reply,
Yes, we can able to achieve with RTE but my question is when we using the RTE when we select the particular style it will append corresponding style class instead of that i have to append direct style in RTE. Can we able to do this?
like :
RTE works like : <span class="text-blue"><span> instead of that can we append inline styles
but i have to append directly inline styles <span style="font-size: 23px; color: #FFF;"></span>
Regards,
Satish.
Hi @SantoshSai ,
As you mentioned you have used many times in the Email Campaign ,
We have used RTE in Email Campaign, when we use this it is appending classes directly instead of inline styles we are facing the issues with Gmail client bcz Gmail only supports inline styles so we are trying to achieve this through RTE. Could you please explain more about how you have achieved this in the email Campaign or you have used any alternative without using RTE.
Thank you,
Regards,
Satish.
@Satish2info You can implement JavaScript to fetch style and append it.
Hi,
For the email templates, you can use internal css styling and still live with class name instead of inline styling.
Hi @Satish2info ,
Yes, you can do that using the RTE source edit plugin. But if it is removing your style attributes after submitting dialog then you need to enable those attributes from xssprotection.xml file. Check out this blog for more details.
@MayurSatav , great blog, thank you for creating it
Thanks @kautuk_sahni
Views
Like
Replies
Views
Likes
Replies