Page 1 of 1

Anyone familiar with "FCKeditor" text editor?

Posted: Thu Mar 16, 2006 9:24 am
by mattcooper
Is anyone familiar with the open-source "FCKeditor"? If so, do you know if it is possible to adapt it so that generated code can be submitted to a database? The form used to generate the code does not appear to use a named textarea...

I am also interested to know whether anyone has actually successfully implemented this code on their website and, if so, to view the page.

Ta!!

Posted: Thu Mar 16, 2006 9:29 am
by Ree
Yes, I have used it before and it's very well done IMO. No problems at all. Regarding putting it on the form, here's a copy-paste from my code:

Code: Select all

$oFCKeditor = new FCKeditor('fck');
$oFCKeditor->BasePath = '../FCKeditor/';
$oFCKeditor->Width  = '550';
$oFCKeditor->Height = '320';
$oFCKeditor->Value = $fck;
$oFCKeditor->Create();
Then you can reference the submitted data as $_POST['fck'] (in this case). I guess everything else above is self-explanatory, you can imagine the snippet as one <input> field named 'fck'.

Posted: Thu Mar 16, 2006 9:36 am
by mattcooper
Thanks for the swift reply...

I am using this very useful software as an html generator in a CMS...

To a point, I do understand the code you have supplied - however, I am not sure exactly where to paste it. I assume, also, that the destination of the posted data can be changed to a page that I will code to insert the HTML into my database?

Do you have a URL I can take a look at?

Thanks once again.

Posted: Thu Mar 16, 2006 10:56 am
by Ree
You just add it inside your <form> element and when posted reference the data as $_POST['whateverNameYouHaveHere'].

Posted: Thu Mar 16, 2006 11:24 am
by mattcooper
Nice one... have done that and it's working fine.

Great bit of OSS, recommended!

:D

Anyone experienced problems with this software?

Posted: Fri Mar 17, 2006 11:35 am
by mattcooper
Further to my earlier posts on this topic... and regarding the use of the HTML (JS) version::

Has anyone experienced errors caused by editing the sample pages supplied with this editor? I am getting some very strange errors when I try to add HTML to the pages - and I'm not editing any of the JavaScript at all.

If I add something, then remove it again (thereby restoring the code to its original form), I get JS errors in the browser. If I overwrite the code with an original (unedited) copy, it works again.

I am flummoxed by this, and cannot figure out why it is happening.

Any ideas, anyone?