Set value to nicedit - which uses textarea as an instance

chienvh picture chienvh · Mar 1, 2011 · Viewed 8.3k times · Source

Here is the link, your webbrowser will navigate to: http://thocong.net/dang-tin.html


I'm developing an app, which will auto post news. When setting value to controls on webpage, all controls are ok, but i cannot to set value to editor (NicEdit). This editor used TextArea tags as instance. I had set value to textarea, but when the news is posted I cannot find contents that set to this textarea. So, pls help me to solve this issue.

Below are codes i'm using to set value to controls on webpages (above link)

HtmlDocument document = webBrowser.Document;
HtmlElement description = document.GetElementById("content");//id of textarea
description .SetAttribute("value", info.Content);

->> Summary: Pls tell me How to set values to nice editor?

Answer

anubhava picture anubhava · Jun 7, 2012

I know this is a very old question but in case you haven't yet found the answer here it is:

nicEditors.findEditor( "your-textarea-id" ).setContent( 'some value' );