Anyone familiar with "FCKeditor" text editor?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Anyone familiar with "FCKeditor" text editor?

Post 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!!
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post 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'.
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Post 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.
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post by Ree »

You just add it inside your <form> element and when posted reference the data as $_POST['whateverNameYouHaveHere'].
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Post by mattcooper »

Nice one... have done that and it's working fine.

Great bit of OSS, recommended!

:D
User avatar
mattcooper
Forum Contributor
Posts: 210
Joined: Thu Mar 17, 2005 5:51 am
Location: London, UK

Anyone experienced problems with this software?

Post 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?
Post Reply