zoukankan      html  css  js  c++  java
  • 无IDE时,使用支持HTML5的浏览器作编辑器的方法

    1、样例

    在任务栏中输入以下内容后将开启c/c++ 模式

    data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/c_cpp");</script>

    2、模式切换

    想要使用其它模式的话,将代码中的ace/mode/c_cpp,替换为如下一种模式即可

    Python -> ace/mode/python
    C/C++ -> ace/mode/c_cpp
    Java -> ace/mode/java

    其它还支持 javascript, scala, coffeescript, css, html, php, latex, tex, sh, sql, lua, clojure, dart, typescript, go, groovy, json, jsp, less, lisp, lucene, perl, powershell, scss, textile, xml, yaml, xquery, liquid, diff

    3、主题切换

    将代码中的ace/theme/monokai,替换为如下一种主题

    Eclipse -> ace/theme/eclipse
    TextMate -> ace/theme/textmate

    其它还支持github, ambiance, dawn, chaos, chrome, dreamweaver, xcode, vibrant_ink, solarized_dark, solarized_light, tomorrow, tomorrow_night, tomorrow_night_blue, twilight, tomorrow_night_eighties, pastel_on_dark

  • 相关阅读:
    Count Complete Tree Nodes***
    Kth Smallest Element in a BST
    Lowest Common Ancestor of a Binary Search Tree
    VPC实验案例
    BGP实验 (IBGP,EBGP) neighbor
    BGP基础实验 Cyrus
    H3c AC模式切换
    语音实验8 硬件电话通过DHCP方式连接到CME
    语音实验7 2台CME,3台软件电话
    语音实验6 1台CME,2台软件电话
  • 原文地址:https://www.cnblogs.com/aqing1987/p/4276362.html
Copyright © 2011-2022 走看看