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

  • 相关阅读:
    java-String类
    多线程的细节
    java-多线程的练习----妖,等待唤醒,代码重构,lock到condition
    javascript函数的声明和调用
    表单
    java-多线程的入门_进阶总结
    uboot命令
    u-boot移植 III
    u-boot移植 II
    汇编词典
  • 原文地址:https://www.cnblogs.com/aqing1987/p/4276362.html
Copyright © 2011-2022 走看看