GetSimple Support Forum

Full Version: Why are there spaces in the code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm just getting started with get-simple and find that whenever I add content, be it with the WYSIWYG or directly through source it's added spaces after I save.

For example I would write:

<h2>My Title</h2>
<p>This is going to be my content.</p>

And when saved and previewed it would look like this:

<h2>
My Title</h2>
<p>
This is going to be my content.</p>



I also noticed that when adding the header it does the same thing, this won't validate!

<li class="current
index"><a href="#" title="Home">Home</a></li>
It should validate just fine, newlines are irrelevant in html.

There are numerous threads posted about this. It is a setting in ckeditor.
Thank you,

Would you mind telling me which setting it is under ckeditor.
(2012-11-21, 07:47:35)Graphicism Wrote: [ -> ]Thank you,

Would you mind telling me which setting it is under ckeditor.


a forum search should have helped you ;=)

1) this behaviour has nothing to do with valid code or not.
2) see here:
http://get-simple.info/wiki/how_to:edito...stom_files

it is done with a custom config. Check this part of the example-file:

Code:
var blockTags = ['div','h1','h2','h3','h4','h5','h6','p','pre','ul','li'];
var rules = {
indent : false,
breakBeforeOpen : false,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
};

for (var i=0; i<blockTags.length; i++) {
ev.editor.dataProcessor.writer.setRules( blockTags[i], rules );
}

});