Jump to content

ConfigurableModule CKEditor field inline CSS


Recommended Posts

Not sure if I or someone asked this before…

I'm working on a module that implements Module, ConfigurableModule

On the config.php page, I define a field like so:

  'email_imprint' => array(
    'label' => 'Email Imprint',
    'type' => 'CKEditor',
    'value' => '',
    'useLanguages' => true
  ),

This works fine. My question is, how can I make this CKEditor field allow for inline markup? If I want to allow inline css in a CKEditor field I define in the GUI I can configure this in the field's settings, but here… ?

Link to comment
Share on other sites

OK here I am answering my own question, courtesies to chatGTP…

'extraAllowedContent' => '*(*){*}', // Allow any element, with any attribute, and any inline style

happy days! thoughts?

  • Like 1
Link to comment
Share on other sites

have to revisit this.

Inline CSS works but what about adding CSS classes? They always get stripped. Other tags (like <footer>) don't work either .

I tried:

'allowedContent' => true, // Disables ACF completely
'extraAllowedContent' => 'div[*]{*}; footer[*]{*}; p[*]{*}; img[*]{*}; a[*]{*}; span[*]{*};',

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...