Hi,
I started to use feckeditor a few days ago. It works perfectly when you have to write a text but I have a problem when I try to edit an existing text.
<script type='text/javascript'>
var oFCKeditormod = new FCKeditor('contenido');
oFCKeditormod.BasePath = 'fckeditor/';
oFCKeditormod.Height = '500';
oFCKeditormod.Value = $contenido; <------- This line is the problem.
oFCKeditormod.Create();
</script>
oFCKeditormod.Value = <p style="text-align: center;"><a href="http://www.latamtrainingit.com/web/index.php" target="_blank"><span style="font-size: x-large;">ACCEDER A LA WEB</span></a></p>
<p style="text-align: center;"><a href="http://www.latamtrainingit.com/web/index.php"><img height="323" width="242" src="/portal/documentosimage/captura_web.jpg" alt="" /></a></p>;
When the page loads, the text editor don't load and the problem the debugger says is:
Error: missing ; before statement
<p style="text-align: center;"><a href="http://www.latamtrainingit.com/web/index.php"><img height="323" width="242" src="/portal/documentosimage/captura_web.jpg" alt="" /></a></p>;
I don't understand why this error appear. I have searched and tried many things but I haven't find a solution yet. I would apreciate if someone knows how to solve this problem. Thanks
Wed, 02/11/2009 - 13:04
#1
Re: Error loading contents
The assignment you have for oFCKeditormod.Value below the editor Create() call should work - if you add some quotes around the text - but it must be placed before the Create() if you want it to work. If you're using the PHP creation methods, someone else might be able to help you put everything in the right place - I use straight JavaScript to create the editor for my own use...
If you cannot assign the text until after the editor is created, then you must use the FCKeditor_OnComplete() method described in the API documentation in order to load your text, or create some kind of toolbar plugin load button that calls oFCKeditormod.SetHTML().
Re: Error loading contents
I tried it but it didn't work. It says the same error. I tried using insertHTML but it didn't work too.
Re: Error loading contents
I have problem to loading text to fckeditor when i want to edit saved script that created with fckeditor.
Of course i used it in asp page.if you know how can i load text in it please help me too.
thanks.
Re: Error loading contents