Permalink
Browse files

Extra settings for CKEditor to get rid of the extra whitespace within…

  • Loading branch information...
1 parent e7b4290 commit 8a11c94f04e81f9886730f21c74f4c5afc8d2ade @maartendraijer maartendraijer committed Oct 21, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 fiber/static/fiber/js/ckeditor-3.6.2/config.js
@@ -9,3 +9,20 @@ CKEDITOR.editorConfig = function( config )
// config.language = 'fr';
// config.uiColor = '#AADC6E';
};
+
+// Extra settings to get rid of the extra whitespace within tags
+// More info on this subject here: http://cksource.com/forums/viewtopic.php?f=6&t=14493
+CKEDITOR.on('instanceReady', function(ev)
+{
+ var tags = ['p', 'ol', 'ul', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
+
+ for (var key in tags) {
+ ev.editor.dataProcessor.writer.setRules(tags[key], {
+ indent : false,
+ breakBeforeOpen : true,
+ breakAfterOpen : false,
+ breakBeforeClose : false,
+ breakAfterClose : true
+ });
+ }
+});

0 comments on commit 8a11c94

Please sign in to comment.