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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

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.