Sets the value for nicedit - which uses textarea as an instance

Here is the link, your web browser will focus on: http://thocong.net/dang-tin.html


I am developing an application that will automatically publish news. When you set the value for the controls on the web page, all the controls are fine, but I cannot set the value for the editor (NicEdit). This editor used the TextArea tags as an instance. I set the value for textarea, but when the news is published, I can not find the content specified in this text box. So pls help me solve this problem.

Below are the codes that I use to set the value for controls on web pages (above links)

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 ​​in a good editor?

+4
source share
2 answers

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

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

I think you will find here what you need here: http://pastebin.com/sj8QA4xx - it shows how to use the nicEditor API to insert text at the current cursor location. I use it to programmatically alter nicEditor content. Good luck

0
source

Source: https://habr.com/ru/post/1341799/


All Articles