Hi,
Using allowed content, if i try to allow strong with all class, set to:
config.allowedContent ='strong(*)';
It work i can add class to any strong, then i add it for em :
config.allowedContent ='strong(*) em(*)';
But then i can't use strong or em anymore .....
I test too :
config.allowedContent ='*(*)';
But same thing .... all is disallowed
What is want exactly is :
Allow specific tag with any class but no style + allow text-align on p only.
My complet config:
CKEDITOR.editorConfig = function( config ) { config.toolbar = [ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl' ] }, '/', { name: 'document', groups: [ 'mode' ], items: [ 'Source' ] }, { name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] }, { name: 'editing', groups: [ 'find', 'selection' ], items: [ 'Find', 'Replace', '-', 'SelectAll' ] }, '/', { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, { name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] }, ]; config.allowedContent ='*(*)'; };
You should use config
You should use config.extraAllowedContent which extends the default settings. Setting config.allowedContent overrides everything.
Read more in the Advanced Content Filer guide.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Hi,
Hi,
OK, i give it a try, but looking at http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules : it's seems to be OK with * ?
Both rules: 'strong em (*)'
Both rules: 'strong em (*)' and '*(*)' are ok.
'strong (*) em (*)' wasn't correct, because you need to separate groups with a semicolon like this: 'strong (*); em (*)'.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Hi,
Hi,
With *(*) : it's not OK ( provide 2 screenshot)
But :
work very good !
Great thanks !
Attachments: