Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why are there spaces in the code?
#1
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>
Reply
#2
It should validate just fine, newlines are irrelevant in html.

There are numerous threads posted about this. It is a setting in ckeditor.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Thank you,

Would you mind telling me which setting it is under ckeditor.
Reply
#4
(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 );
}

});
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply




Users browsing this thread: 1 Guest(s)