Jump to content

Can Fck Be Called Twice On A Page?


Guest Brivtech

Recommended Posts

Guest Brivtech

I'm trying to run 2 instances of FCK editor on an admin form page.

... but I'm getting a "Fatal error: Cannot redeclare class fckeditor".

Does anyone know a simple workaround?

Link to comment
Share on other sites

I'm trying to run 2 instances of FCK editor on an admin form page.

... but I'm getting a "Fatal error: Cannot redeclare class fckeditor".

Does anyone know a simple workaround?

you dont need to include the fck class more than once

you can do it this way:

require($glob['adminFolder']."/includes".CC_DS."rte".CC_DS."fckeditor.php");



$oFCKeditor = new FCKeditor('textarea1');

$oFCKeditor->Create();

...

$oFCKeditor = new FCKeditor('textarea2');

$oFCKeditor->Create();

the editors created will be called textarea1 and textarea2 respectively

Link to comment
Share on other sites

  • 1 month later...
Guest Brivtech

Following up from this, I got the editor to work just fine. However, when I display the data generated by the FCK editor back into the webpage, it's showing the HTML code as well, text code (like it's putting in <br />'s instead if making an actual linespace).

What could I be doing wrong?

Is the mySQLSafe doing this? i.e.

$check = $db->select("SELECT extraBox FROM ".$glob['dbprefix']."CubeCart_docs WHERE doc_id = ".$db->mySQLSafe($_GET['docId']));

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...