Jump to content

Rich text / textarea


nibbo

Recommended Posts

Hi all;

 

I have a form with a textarea in it and am trying to use a rich text editor.

I have tried with both openwysiwyg and whizzywig and both appear to work in that I can edit the text.

When I submit the for however the textarea is blank.

 

php code is:

 

echo "</td><td><textarea name='NewDescription' id='NewDescription' cols='40' rows='15' style='width:100%; height:50px'></textarea>\n";

echo "<script language='JavaScript' type='text/javascript'>generate_wysiwyg('NewDescription');</script></td></tr>\n";

 

If I try to display the values when the form is submitted document.getElementById('NewDescription').value / innerText & innerHTML are all null.

 

Any ideas?

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/92853-rich-text-textarea/
Share on other sites

I've never used either editor, but try taking out the first echo...

 

the second one, should have javascript create the textarea for you?

 

 

// echo "</td><td><textarea name='NewDescription' id='NewDescription' cols='40' rows='15' style='width:100%; height:50px'></textarea>\n";

echo "</td><td><script language='JavaScript' type='text/javascript'>generate_wysiwyg('NewDescription');</script></td></tr>\n";

Link to comment
https://forums.phpfreaks.com/topic/92853-rich-text-textarea/#findComment-476229
Share on other sites

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.