Baidu Editor Ueditor. NET development

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.