Hi all, I have created a plug-in that seems to be having a problem with my class being stripped out of the page by ACF, this is the allowedContent bit from within my plugin.js that doesn't work
var createCommand = editor.addCommand( 'createfield', new CKEDITOR.dialogCommand( 'createfield', { allowedContent: 'span[!title](' + editor.config.fieldMarkerClassName + ')' } ) );
But if I use extraAllowedContent, as below, it works fine.
config.extraAllowedContent = 'span[title](' + config.fieldMarkerClassName + ')';
Any ideas what I'm doing wrong?
BTW the varable used is defined as follows:
config.fieldMarkerClassName = 'cke-meta-field';
I have also tried hard coding the variable as I thought it may have been a timing issue, but it still didn't work, i.e. I have it like this:
var createCommand = editor.addCommand( 'createfield', new CKEDITOR.dialogCommand( 'createfield', { allowedContent: 'span[!title](cke-meta-field)' } ) );
Thanks in advance
Mark
Editor enables ACF rules
Editor enables ACF rules automatically only for buttons that are present in toolbar. For every other feature which does not have its own button the plugin has to enable the feature in ACF. Read how to do that in the Plugins integration with ACF guide - the part that interests you is in "What is an Editor Feature?" section.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
I am adding a button to the
I am adding a button to the toolbar, but looking at the link you provided, if I add the following it now works, still not sure why though.
Mark