I've problems in when I have to retrieve text from database or other text file where text is written in multiline.
I think that the problem is in multiline js structure, but...
With this oFCKeditor.Value I can display correctly the editor only in FireFox...
In an other way I could write like this:
In this case I can show the editor in all major browsers but i loose the compatibility with accordion-jquery.
Can you help me please?
Thanks,
Stefano.
I think that the problem is in multiline js structure, but...
<%
Dim source
If Left(FileToVar(Path_DirPublic & RSArticle("sourcefile"), 0), 4) <> "#nd#" Then
source = FileToVar(Path_DirPublic & RSArticle("sourcefile"), 0)
End If
%>
<script type="text/javascript">
var oFCKeditor = new FCKeditor('text');
oFCKeditor.BasePath = 'fckeditor/' ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.Value = ''+<r><![CDATA[<%=source%>]]></r>;
oFCKeditor.Create();
</script>With this oFCKeditor.Value I can display correctly the editor only in FireFox...
In an other way I could write like this:
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'text' ) ;
oFCKeditor.BasePath = "FCKeditor/" ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
........
<textarea id="text" name="text" cols="57" rows="25">
<%
If Left(FileToVar(Path_DirPublic & RSArticle("sourcefile"), 0), 4) <> "#nd#" Then
Response.Write FileToVar(Path_DirPublic & RSArticle("sourcefile"), 0)
End If
%>
</textarea>In this case I can show the editor in all major browsers but i loose the compatibility with accordion-jquery.
Can you help me please?
Thanks,
Stefano.

Re: Retrieve text (HTML) form database
Replace vbcrlf and chr(13) before putting text string in javascript code...
<% Dim source If Left(FileToVar(Path_DirPublic & RSArticle("textsource"), 0), 4) <> "#nd#" Then source = FileToVar(Path_DirPublic & RSArticle("textsource"), 0) source = Replace(source, " ", " ") source = Replace(source, vbcrlf, "\n\") source = Replace(source, chr(13), "\n\") End If %> <script type="text/javascript"> var oFCKeditor = new FCKeditor('textsource'); oFCKeditor.BasePath = 'fckeditor/' ; oFCKeditor.ToolbarSet = 'Default' ; oFCKeditor.Value = '<%=source%>'; oFCKeditor.Create(); </script>In this way fckeditor and accordion script can coexist.