ngrmm Posted October 13, 2019 Share Posted October 13, 2019 i'm using a pw-page to output a newsletter-email and send it via promailer. this page has a textarea-field (ckeditor). i searched a lot but was able to find out how to automatically add inline style to a-tags. like: <a href="#" style="color:red;">…</a> adding a class via mystyles.js or config.js will not work because it's a newsletter-email. mail-apps would override class-styles. it has to be inline Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted October 13, 2019 Share Posted October 13, 2019 One work-around is to use this package, which I've used with success:https://github.com/tijsverkoyen/CssToInlineStyles 2 Link to comment Share on other sites More sharing options...
ngrmm Posted October 13, 2019 Author Share Posted October 13, 2019 thx @Jonathan Lahijani, i'm not a pro and don't know how to do your workaround. but it tried it with simple str_replace() and it works ? $content = $page->body; echo str_replace("<a","<a style='color: red'",$content); Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 13, 2019 Share Posted October 13, 2019 Hey, @ngrmm! Check out this module by @Martijn Geerts. The description says it has css inliner built in. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now