jQuery, :
$("#yourid").val("hello");
, : http://jsfiddle.net/quQqH/
HTML- , (, div).
<div id="yourid"></div>
$("#yourid").html('<a href="#">My link</a>');
, Rich Text Editor (, Yahoo), HTML- - . , , . :
var myEditor = new YAHOO.widget.SimpleEditor('yourid', {
height: '200px',
width: '350px',
toolbar: 0
});
myEditor.render();
$("#yourid").val("Click for <a href='http://yahoo.com'>Yahoo</a>");
You can see how it works: http://jsfiddle.net/quQqH/1/ . In this case, I deleted the toolbar by setting it to 0, but it can be configured to display different buttons, etc. Just delete this line to display the default toolbar.
source
share