Hi,
I am using WebHtmlEditor (Netadvantage 7.2 web) for displaying existing content and for adding new content.I need to clear the existing content when I click on 'Add New' link from client side.How do I clear the content of the WebHtmlEditor through javascript.I have defined control like this.<ighedit:WebHtmlEditor ID="igHtmlEditor" runat="server">I was trying something like --- document.getElementById("<%=igHtmlEditor.ClientID%>").innerHTML = ' 'but the ClientID table id and I couldnt able to achieve this.What is the correct way to clear the content of webhtmleditor from client?
It's actually oEditor.setText("");
var oEditor = iged_getById(editorId);if(oEditor) oEditor.setText(""); //set it to nothing
The iged_getById function must be set by the WebHtmlEditor when it renders. I'm not sure on the details there but it seems to be global to the page. The editorId is looking for the ClientId which you might have to set in the codebehind (like you are doing above) since if you have this in a master page or some other naming container the ClientId will change and is kind of hard to guesstimate.
I wish Infragistics would update their client side documentation...
It is working fine. i just added cllientid to the above code as my page is extended from master pagevar oEditor =iged_getById('<%=editorId.ClientID%>');I am new to the infragistics.Thanks for your reply.
Cool! I'm new to it too - I've only been using it about 2 weeks. I just had to do what you needed to so I had an answer for you.
Take it easy,
Dirk