The forum operates in read-only mode. Please head to StackOverflow for support.
How do I remove whitespace in CKeditor?
For example, change any spaces that are 2 or more into 1 space. Along with removing multiple breaks.
Thanks
Have you tried playing around with the HTMLWriter? There's various ways this can be done. I've seen some use this code to remove extra tags:
CKEDITOR.on('instanceReady', function( ev ) { var blockTags = ['div','h1','h2','h3','h4','h5','h6','p','pre','li','blockquote','ul','ol', 'table','thead','tbody','tfoot','td','th',]; for (var i = 0; i < blockTags.length; i++) { ev.editor.dataProcessor.writer.setRules( blockTags[i], { indent : false, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : false, breakAfterClose : true }); } });
Customer and Community Manager, CKSource Follow us on: Facebook, Twitter, LinkedIn If you think you found a bug in CKEditor, read this!
Have you tried playing around
Have you tried playing around with the HTMLWriter? There's various ways this can be done. I've seen some use this code to remove extra tags:
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!