It is best practice to place styles inline and in the <head> for an HTML email to cover the most clients. As we add components to an email, how can we inject styles into the <head> of the email being developed. If we simply include the clientLibs we get a linked resources so that doesn't work. Someone mentioned inputStream. Is that the best way and if so, can someone point us to an example of this?
Solved! Go to Solution.
Views
Replies
Total Likes
Look at the code here:
This code shows you how to read the content of a clientlib, check this line: htmlLibrary.getInputStream()
This you can use to write some custom code around it.
Views
Replies
Total Likes
Most AEM developers use ClientLibs to handle CSS - as discussed in this official AEM documentation:
http://docs.adobe.com/docs/en/cq/current/developing/clientlibs.html
Why are you opposed to using Clientlibs in an AEM solution?
Views
Replies
Total Likes
We are using clientLibs extensively of course, but emails need "inline" styles in the element tags and in the head and not linked libs.
Views
Replies
Total Likes
Look at the code here:
This code shows you how to read the content of a clientlib, check this line: htmlLibrary.getInputStream()
This you can use to write some custom code around it.
Views
Replies
Total Likes
Views
Likes
Replies