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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...