RichEditor is removing inline styles

I got html in database, for example:
<p style='margin: 0 0 35px 0; padding: 0; font-weight: 400; font-size: clamp(40px, 2vh, 54px);line-height: clamp(40px, 2vh, 54px);letter-spacing: -5%;color: #000E5F;'><span style='color: #25AAE9;'>Who</span> <strong>We</strong> Are?</p>
<p style='margin: 0 0 35px 0; padding: 0; font-weight: 400; font-size: clamp(40px, 2vh, 54px);line-height: clamp(40px, 2vh, 54px);letter-spacing: -5%;color: #000E5F;'><span style='color: #25AAE9;'>Who</span> <strong>We</strong> Are?</p>
After loading it into RichEditor, it removes inline styles, in this example, this is <trix-editor> output contents:
<p><!--block-->Who <strong>We</strong> Are?</p>
<p><!--block-->Who <strong>We</strong> Are?</p>
Is there a possibility to force RichEditor to not remove inline styles and render them correctly?
1 Reply
Michał Burdziak
Michał BurdziakOPthis hour
Temporarily I have installed Filament Plugin which uses TinyMCE, and it works well with inline styles, however, if someone will have informations about customizing RichEditor, let me know. https://filamentphp.com/plugins/mohamedsabil83-tinyeditor
Filament
TinyEditor by Mohamed Sabil - Filament
A form component for the Tinymce editor.

Did you find this page helpful?