c# - Unable to set NiceEditor content in Web Browser COntrol -
i using niceedtor on web browser control. on jquery ready() function trying set content of , in result following error:
object doesn't support property or method 'setcontent'
below given code:
$(function () { var nice = new niceditors.findeditor('__edit'); nice.setcontent("<b>hi</b>"); });
text area defined following:
<textarea name="question" rows="15" cols="130" id="__edit"></textarea>
you need instantiate textarea niceeditor control using niceditors.alltextareas();
or new niceditor().panelinstance('__edit');
.
$(function () { //niceditors.alltextareas(); // set globally textareas. new niceditor().panelinstance('__edit'); // redister textarea niceeditor ///... code var nice = new niceditors.findeditor('__edit'); nice.setcontent("<b>hi</b>"); });
Comments
Post a Comment