Jump to content

$oFCKeditor = new FCKeditor('texte[]') ;


drisate

Recommended Posts

Hey guys i need to use the FCK WYSIWYG posted as an array because the description field is autogenerated (if needed) by the user a number infit of times. The forme works greate but because of the way FCK was build, i am having a hard time making it possible. Has anybody used it before?

 

FCK WYSIWYG

 

$oFCKeditor = new FCKeditor('texte[]') ;

 

Adding [] in teh name field causes a few problems in the way the HTML is generated.

 

WORKS: id="texte[]"

WORKS: name="texte[]"

FAIL: id="texte[]___Config"

FAIL: id="texte[]___Frame"

FAIL: src="editor/fckeditor.html?InstanceName=texte[]&Toolbar=Basic"

 

How can i work arround those fails?

I tryed posting this question on there board but no support.

Link to comment
https://forums.phpfreaks.com/topic/165799-ofckeditor-new-fckeditortexte/
Share on other sites

You cannot use arrays in a url

src="editor/fckeditor.html?InstanceName=texte[]&Toolbar=Basic"

 

Rather than an array why not use a counter to identify each instance

$numItems = 4;
// produce editors text1,text2,text3,text4
for($x = 1; $x <= $numItems; $x++) {
  $oFCKeditor = new FCKeditor('text'.$x) ;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.