Example - HTML Rich Text Box - JavaScript / AJAX
This example demonstrates how simple it is to implement the HTML JavaScript richtextbox
control by simply adding the ext attribute to an
input element with the value "richtextbox".
The richbox box control can be formed from a div or more
a more useful input element. Using the input means that
you can typically manipulate the richtextbox control like you would a typical textbox control.
Code:
function init(){
//called onload e.g. <body onload="init()">
//get the current value of the richtextbox
//and display it in the source textarea control.
$g("txtExample1Source").value = $g("rtbExample1").value;
}
<input type="text" id="rtbExample1" ext="richtextbox" style="width:80%;height:200px;" onChange="txtExample1Source.value = this.value;" value="Hello World"/>
<textarea id="txtExample1Source" style="width:80%;height:100px;" onChange="$g('rtbExample1').value = this.value;"></textarea>