(I don't blame the editor... I assume the problem is on my side)
I'm using the JavaScript version.
My code looks like this :
*************************
var oFCKeditor = new FCKeditor( 'Content' ) ;
oFCKeditor.BasePath = 'FCKeditor/' ;
oFCKeditor.Height = 400 ;
oFCKeditor.Value = 'foo
bar' ;
oFCKeditor.Create() ;
*************************
The editor doesn't appear, with that kind of value.
If I put 'foo bar' (without the linebreak) instead,
it would work just fine.
-> Is there a way to load multiple lines in the editor?
or :
-> Is there a way to prevent the editor from generating any \n linebreak (he does so, when adding indents, for instance...).
The value I want to display, comes from PHP.
I tried to use nl2br() on it, but FCKEditor still didn't want it.
Thanks for helping...
I'm using the JavaScript version.
My code looks like this :
*************************
var oFCKeditor = new FCKeditor( 'Content' ) ;
oFCKeditor.BasePath = 'FCKeditor/' ;
oFCKeditor.Height = 400 ;
oFCKeditor.Value = 'foo
bar' ;
oFCKeditor.Create() ;
*************************
The editor doesn't appear, with that kind of value.
If I put 'foo bar' (without the linebreak) instead,
it would work just fine.
-> Is there a way to load multiple lines in the editor?
or :
-> Is there a way to prevent the editor from generating any \n linebreak (he does so, when adding indents, for instance...).
The value I want to display, comes from PHP.
I tried to use nl2br() on it, but FCKEditor still didn't want it.
Thanks for helping...
RE: Editor can't load multiple lines
But I found out that removing all the occurences of "\n" and "\r" before submitting the value to the editor, seems to fix the problem.
Any idea where the "\r" come from?
RE: Editor can't load multiple lines
RE: Editor can't load multiple lines
Is this the same problem? multiple lines
<script type="text/javascript">
<!--
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('fck')) ;
var oFCKeditor = new FCKeditor( 'description' ) ;
oFCKeditor.BasePath = 'fck/' ;
oFCKeditor.Height = 400 ;
oFCKeditor.Width = 600 ;
oFCKeditor.Value = '<ul>
<li>Construction Bolt on</li>
<li>Body: Basswood</li>
<li>Neck: Rock Maple</li>
<li>Fingerboard: Rosewood</li>
<li>Fret: 22 Medium</li>
<li>Scale : 30&quot;</li>
<li>Inlay: Pearloid Daisey</li>
<li>Bridge: Vintage</li>
<li>Tuner: Deluxe</li>
<li>Hardware: Chrome</li>
<li>Pickups: Duncan Designed &quot;P&quot; Style</li>
<li>Electronics: Master Volume, Master Tone</li>
<li>Strings: D' Addario Custom EXL 220 Short-Scale</li>
<li>Finish: Pepper Mint, Awesome Blue</li>
<li>Comes with a Gig Bag Back Pack</li>
</ul>' ;
oFCKeditor.Create() ;
//-->
</script>
RE: Editor can't load multiple lines
In your code above instead of using a real line break in the value, use "\n" - for example:
oFCKeditor.Value = 'This\nis\nmultiline';
In the source code you should then see:
This
is
multiline
You also have to escape \ if that forms part of your content to "\\".
RE: Editor can't load multiple lines
1. I created a form that allows entry into the FCKeditor.
2. When the user hits submit, an entry is made into the database.
3. When I retrieve the record and assign it as the default value, the Editor will not load:
oFCKeditor.Value = '<p>testing</p>
<ol>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
</ol>'
I'm sure this has something to do with hard returns. Any idea as to how this should be handled?
thanks