zoukankan      html  css  js  c++  java
  • 为CommunityServer升级代码加亮功能!

    1、下载和引用新的组件:
            ActiproSoftware.CodeHighlighter.dll    v3.0.14.0
            ActiproSoftware.Shared.dll                  v1.0.73.0
    2、更新Languages和OutliningIndicators文件夹的内容。
    3、更新或添加以下文件:
             SemanticCSharpParser.cs
             SemanticCssParser.cs
             SemanticHtmlParser.cs
             SemanticJavaParser.cs
             SemanticJScriptParser.cs
             SemanticSqlParser.cs
             SemanticVBDotNetParser.cs
    4、更新InsertCode.aspx文件,添加是否折叠和是否显示行号的选项,更新其中的HighlightButton_Click事件为:
            Codehighlighter.LanguageKey = LanguageDropDownList.SelectedItem.Text; 
            Codehighlighter.OutliningEnabled = EnableCollapse.Checked; //是否开启折叠 
            Codehighlighter.LineNumberMarginVisible = EnableRowNumber.Checked; //是否显示行号 
            Codehighlighter.Text = CodeText.Text;
    5、编辑communityserver.config文件,为<img>标签添加onclick事件。如:
     <MarkUp>
     <globalAttributes>
      <class enable = "true" />
      <align enable = "true" />
      <id enable = "true" />
      <style enable = "true" />
     </globalAttributes>
     <html>
      ..............
      <img src = "true" alt = "true" title = "true" border = "true" width = "true" height = "true" onclick = "true" />
     ...................
      <xmp />
     </html>
    </MarkUp>

    源码下载:https://files.cnblogs.com/BillChen/代码加亮.rar
    解压密码:www.ruiya.com

  • 相关阅读:
    关于uoloadify不能显示效果原因(thinkphp5仿百度糯米)
    thinkphp3.2.3中$this->assign
    PDO
    类的声明 只能有属性和方法(属性没有括号,方法有括号)
    怎删改查
    JS鼠标事件大全
    建表以及 增。删。改。查
    建表、添加数据及数据查询
    html框架
    表的求和及计算
  • 原文地址:https://www.cnblogs.com/chenjunbiao/p/1760269.html
Copyright © 2011-2022 走看看