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>"); });  

demo

documentation


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -