Hello I want to use the CKeditor but I have a problem:
I don't know how to take the value of the textarea and send it in the function.
Can you please help me??
my code:
I don't know how to take the value of the textarea and send it in the function.
Can you please help me??
my code:
<form ...no action...>
<span class="size">Name:</span> <input name="name" size='30' value="" /><p>
<span class="size">Body:</span> <p> <textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10"></textarea>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<p>
<input type='button' value="Send" onClick='sendForm(this.form)'>
</p>
</form>
<SCRIPT language="JavaScript">
function sendForm(formObj)
{
var nameAdd = formObj.name.value;
var bodyAdd = formObj.editor1.value; /*<----------------HERE---------------->*/
............
} 
Re: how to take the value of the textarea??
var bodyAdd = CKEDITOR.instances['editor1'].getData();
I'm no genius at this, but since barely anybody answers questions around this place I thought I may as well have a pop.....