Hello everyone,
New user. Chose FCKEditor 'cause the demos work so very well. It looks great.
But (there had to be a but), I'm having trouble integrating it. I want to use it to edit existing static html pages. To make things even easier, I've turned my htyml pages into shtml (Server Side Include) pages, extracting the textual content into separate files, leaving the framework markup in the original files with an include for teh new seprate content file.
So I figured integrating that into the Editor would be straight forward. I found the line in the samples that says:
oFCKeditor.Value = "content here";
and my plan is to use Perl on the server side to insert the contents. Works just fine for trivial content like "Document Title". But when the content is a multi-line file with multiple paragraphs, links, tables, etc., it just crashes on that line. I've come to realize that it's because something like
oFCKeditor.Value = "Content text content text
<p>
More text <a href="./page.htm">link</a>";
is not recognized by the javascript as a continuous input.
But, for the life of me, I can't find anything in teh documentation about rules for escaping my input. AND, I can't imagine having to take out all line-feeds to squash entire html files into one line. Ther emust be something I'm missing.
Can someone tell me what that is?
Thanks.
New user. Chose FCKEditor 'cause the demos work so very well. It looks great.
But (there had to be a but), I'm having trouble integrating it. I want to use it to edit existing static html pages. To make things even easier, I've turned my htyml pages into shtml (Server Side Include) pages, extracting the textual content into separate files, leaving the framework markup in the original files with an include for teh new seprate content file.
So I figured integrating that into the Editor would be straight forward. I found the line in the samples that says:
oFCKeditor.Value = "content here";
and my plan is to use Perl on the server side to insert the contents. Works just fine for trivial content like "Document Title". But when the content is a multi-line file with multiple paragraphs, links, tables, etc., it just crashes on that line. I've come to realize that it's because something like
oFCKeditor.Value = "Content text content text
<p>
More text <a href="./page.htm">link</a>";
is not recognized by the javascript as a continuous input.
But, for the life of me, I can't find anything in teh documentation about rules for escaping my input. AND, I can't imagine having to take out all line-feeds to squash entire html files into one line. Ther emust be something I'm missing.
Can someone tell me what that is?
Thanks.
Re: How to insert existing html content into Editor??
I'll have the Perl insert a concatenation for each line:
oFCKeditor.Value = "First line<br>";
oFCKeditor.Value = oFCKeditor.Value + "Second line";
Coud get messy - any better way?
Re: How to insert existing html content into Editor??
OK - I got it.
I took the sample01.cgi from the _samples/perl section, added my own routines to get the html from the includes files and assigned the content to a string variable, $html, then changed the line:
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.';
to
$Value = $html;
And bingo - works like a charm.