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>


  • 2017年3月1日 星期三

    [筆記]移除Html5 Video Tag在Chome時的預設下載按鈕

    在Chrome 55版本,Html5 Video Tag 會預設出現下載按鈕,(或許之後會移除?)。

    image

    參考:
    http://stackoverflow.com/questions/41115801/in-chrome-55-prevent-showing-download-button-for-
    html-5-video

    可以透過CSS解決:
    video::-internal-media-controls-download-button {
        display:none;
    }
    
    video::-webkit-media-controls-enclosure {
        overflow:hidden;
    }
    
    video::-webkit-media-controls-panel {
        width: calc(100% + 30px); /* Adjust as needed */
    }
    在此做個筆記。