2017年3月12日 星期日

[筆記]ajaxtoolkit.htmleditor使用

  • Nuget:AjaxColntrolToolKit、AjaxControlToolKit.HtmlEditor.Santitizer、HtmlAgilityPack1.4.9.0
  • https://ajaxcontroltoolkit.devexpress.com/HtmlEditorExtender/HtmlEditorExtender.aspx
  • 安裝後web.config的設定(nuget自動設定)
  • <configuration>
      <configSections>
      <section name="ajaxControlToolkit" type="AjaxControlToolkit.AjaxControlToolkitConfigSection, AjaxControlToolkit" />

    </configSections>
    <system.web>
        <pages>
          <namespaces>
            <add namespace="System.Web.Helpers" />
            <add namespace="System.Web.Mvc" />
            <add namespace="System.Web.Mvc.Ajax" />
            <add namespace="System.Web.Mvc.Html" />
            <add namespace="System.Web.Optimization" />
            <add namespace="System.Web.Routing" />
            <add namespace="System.Web.WebPages" />
            <add namespace="Microsoft.AspNet.Identity" />
          </namespaces>
          <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
            <add tagPrefix="systemlead" namespace="SystemLead.Framework.Web.Controls" assembly="SystemLead.Framework.Web" />
          <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls>
        </pages>
          <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
              <dependentAssembly>
            <assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-16.1.1.0" newVersion="16.1.1.0" />
          </dependentAssembly>
     
          <dependentAssembly>
            <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
          </dependentAssembly>


        </assemblyBinding>
      </runtime>
    <ajaxControlToolkit htmlSanitizer="AjaxControlToolkit.HtmlEditor.Sanitizer.DefaultHtmlSanitizer, AjaxControlToolkit.HtmlEditor.Sanitizer" />
    </configuration>


  • 沒有留言:

    張貼留言