Surely it won't be released like this, will it?
<p>some text</p><p>more text.</p>
<p><br> some text</p><br><p><br> more text.</p>
http://www.fckeditor.net/nightly/fckedi ... fault.html
http://ckeditor.com/ckeditor/3.0rc/_sam ... class.html
<p>some text</p><p>more text.</p>
<p><br> some text</p><br><p><br> more text.</p>
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
I have set the following setting in the /_source/core/config.js:
If you work with your own (filled) /config.js (like I do), then set it like this:
CKEDITOR.editorConfig = function( config ) { config.enterMode = 2; };This way I have no longer the spontaneous paragraph tag (<p></p>) anymore and the source it makes is better.
I'm testing CK V3 just shortly, so I don't know if CK V3 is messing up other tags as well. Just noticed this one quite rapidly.
Cheers,
Ries
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
How to stop it?
You'd think this would be a very common complaint on a RC. It's completely unusable as-is.
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
CKEDITOR.replace( 'editor1', { on : { instanceReady : function( ev ) { this.dataProcessor.writer.setRules( 'p', { indent : false, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : false, breakAfterClose : true }); } } });CKEDITOR.on( 'instanceReady', function( ev ) { ev.editor.dataProcessor.writer.setRules( 'p', { indent : false, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : false, breakAfterClose : true }); });Output Formatting
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
Why isn't the formatting done correctly in the first place, between block tags, not within tags? Within tags makes no sense at all.
What is the syntax to make it apply to all block tags?
Is there some change we can make to get it to indent between all block tags instead?
Thanks again! Other than this problem, v3 seems great.
Edit: for anyone wanting to prevent all breaks after the start of a tag, just search ckeditor.js and change breakAfterOpen to false. In my brief tests it seems to fix it. If there is a an easy one-liner to set this for all tags without touching core files, please add a comment.
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
CKEDITOR.on('instanceReady', function(ev) { var tags = ['p', 'ol', 'ul', 'li']; // etc. for (var key in tags) { ev.editor.dataProcessor.writer.setRules(tags[key], { indent : false, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : false, breakAfterClose : true }); } });Re: ckeditor 3 ruins block tag display, adds breaks and tabs
I just switched from 2.x to 3.x and this "feature" is really breaking everything.
Beside that, I cannot see the rational behind adding, by default, a breakline and a indent after each opening tag.
And pragmatically, do a Google search and you will find that everybody is complaining about that behaviour.
The solution offered (writer.setRules( 'p', 'h1', 'h2', etc.)) is really not up to the problem.
What we need is a way to change this behaviour for all tags once for all at runtime not touching the config.js file.
Thanks in advance and thanks for all your hard work improving CKeditor.
Re: ckeditor 3 ruins block tag display, adds breaks and tabs
By using your example in my custom config.js I only had to make one change and all instances of CKeditor were affected.
Thanks again for a simple but powerful solution.