Ulrik Pedersen
Ulrik Pedersen

Reputation: 73

How to do inline styles with TYPO3 Directmail and CKEditor?

My Directmail template works like a charm when viewing it in frontend. All css classes loads and styles the content perfectly.

The problem occurs when opening the HTML emails in various web clients (Gmail etc.). Some of them removes the classes completely while other renames them.

Most of it I can solve by making the styling inline in the HTML template but content created with CKEditor in TYPO3 backend gets classes assigned to it like..

<p class="text-center">

I know I can create custom inline styles in CKEditor but I just want my editors to keep using the default ways of styling content in CKEditor.

Is there anyway to have Directmail or CKEditor to make all styling inline in TYPO3 >10.4.*?

Upvotes: 0

Views: 276

Answers (1)

Georg Ringer
Georg Ringer

Reputation: 7939

I would suggest using something like https://packagist.org/packages/tijsverkoyen/css-to-inline-styles and just inline the css before adding the template to directmail.

Haven't used directmail for ages but there might be a hook/event/signal or I just would xclass that into the extension.

Upvotes: 0

Related Questions