Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
555
Setting igHtmlEditor's Value does not work.
posted

Hi,

I'm using Infragistics 12.1 jQuery controls and cannot for the life of me set the value of a igHtmlEditor. The Infragistics documentation is poor at best as I've worked with 4 or 5 jQuery 12.1 controls and next to nothing works as expected (in terms of the API). For example, your samples/examples say to use $(element).igDatePicker("value") to get the value of a date picker when actually, you have to use $(element).igEditor("value"). What gives? I've had to hit up the forums or google to figure out how to use each one of those jQuery controls because the documentation is incorrect!

Now that I've vented a little, let me get to the problem at hand. I've tried setting the Value on the HtmlEditorModel which does not work. I tried setting the value in javascript using $(element).igHtmlEditor("setContent", "<p>this is my content</p>", "html"); which also does not work. Furthermore, when I use the latter method, the control fails to render. I can see that there is a new ig.loader script added to the page with my content specified, but the HtmlEditor is no where to be found.

How can I set the value? I would prefer to define it at the same I define the control (ASPX/MVC Helper Method). However, with the ASPX method for adding a control, I have to use Html.Infragistics().HtmlEditor("myID", myHtmlEditorModel) which doesn't allow you add Value() to the chain. Sigh.

Please help.

Parents
No Data
Reply
  • 15979
    posted

    Hello abromfield,

    You are correct, the “igHtmlEditor” was recently added to our toolset and that is why resources for it are not easy to find.

    Regarding your question - I can recommend you to use “setContent” method if you want to set some initial text or add text dynamically to the editor.

    Sample showing text insertion with “setContent” can be viewed and tested here - http://es.infragistics.com/products/jquery/sample/html-editor/manipulating-text

    If you need additional assistance let me know.

Children