One, modify the configuration file Ueditor.config.js, configure the Ueditor path
/** * Editor resource file root path. It means: Instantiate the page as the current path with the editor, and point to the path to the editor resource file (that is, the dialog folder). * In view of the various path problems that many students have when they use the editor, it is strongly recommended to use the relative path relative to the root of the Web site to configure. * "Relative path relative to site root" is a path that starts with a slash, such as "/myproject/ueditor/". * If there are multiple pages in the site that are not at the same level that require an instantiation editor, and the same ueditor is referenced, the URLs here may not be available for each page's editor. * As a result, Ueditor provides a root path that can be individually configured for different pages of the editor, specifically, at the top of the page that needs to instantiate the editor to write the following code. Of course, you need to make the URL here equal to the corresponding configuration. * window. Ueditor_home_url = "/xxxx/xxxx/"; */ window. Ueditor_home_url ="/ueditor/"; varURL = window. Ueditor_home_url | | Getuebasepath (); //test if you do not know what the path is, you can test//alert ("url:" + URL) via alert; Alert ("window. Ueditor_home_url: "+ window. Ueditor_home_url); Alert ("Getuebasepath ():" + Getuebasepath ()); /** * Configuration item body. Note that all configuration involving paths here does not omit the URL variable.
Problem:
1. "String or binary data will be truncated. ”
Set the database field to text
2. Potentially dangerous Request.Form value detected from the client (editorvalue= "...")
This needs to be set in Web. config, there are two places, the first place to add requestValidationMode="2.0"
, the second place to add validateRequest="false"
, and the final result similar to the following code:
<? XML version = "1.0"? >
< Configuration >
< system.web >
< compilation Debug = "true" targetframework = "4.0" />
< HttpRuntime Requestvalidationmode = "2.0" />
< pages validaterequest = "false" />
</ system.web >
</ Configuration >
Add an identifier for [ValidateInput (false)] on the action header
ValidateInput (false)]
Public ActionResult Index (XDocument xml) {
}
Baidu Editor Ueditor. NET development