Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set value to nicedit - which uses textarea as an instance

Tags:

jquery

nicedit

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?

like image 460
chienvh Avatar asked Mar 01 '11 11:03

chienvh


1 Answers

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' );
like image 174
anubhava Avatar answered Oct 09 '22 15:10

anubhava