0
votes

I'm loading some HTML content in a CKEditor instance which, among other elements, has a table. Some cells of the table have the tag td contenteditable='true' and others contenteditable='false'

When I load it in CKEditor this tag is removed by ACF.

I've added extraContentAllowed and it worked fine for the all other tags and elements but can't find the way to make it allow contenteditable.

echo "CKEDITOR.config.extraAllowedContent = 'p div td table tr td th(*)[*]{*}; table[contenteditable]';";

Any ideas? Thank you!

1

1 Answers

0
votes

Since you are allowing all attributes [*], there is no need to extra allow contenteditable attribute - table[contenteditable]. It is enough if you enter ACF configuration as shown below:

// Directly on HTML page
var editor = CKEDITOR.replace( 'editor1', {
    extraAllowedContent:'p div td table tr td th(*)[*]{*}'
});

or

// Inside config.js
config.extraAllowedContent = 'p div td table tr td th(*)[*]{*}';

enter image description here