Jump to content

ckeditor – adding lnline styles to a tags

Recommended Posts

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

Share this post

Link to post
Share on other sites

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);


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...