电脑螺旋丸html,code_editor.html

- 代码编辑器
基本编辑器

CodeMirror 是一个灵活的文本代码编辑器。它是专门用于编辑代码,并附带一些语言模块和插件,实现更先进的编辑功能。

// Code goes here

// For demo purpose - animation css script

function animationHover(element, animation) {

element = $(element);

element.hover(

function () {

element.addClass('animated ' + animation);

},

function () {

//wait for animation to finish before removing classes

window.setTimeout(function () {

element.removeClass('animated ' + animation);

}, 2000);

});

}

主题示例

CodeMirror提供丰富的API接口和CSS主题,详情请访问

http://codemirror.net/

var SpeechApp = angular.module('SpeechApp', []);

function VoiceCtrl($scope) {

$scope.said='...';

$scope.helloWorld = function() {

$scope.said = "Hello world!";

}

$scope.commands = {

'hello (world)': function() {

if (typeof console !== "undefined") console.log('hello world!')

$scope.$apply($scope.helloWorld);

},

'hey': function() {

if (typeof console !== "undefined") console.log('hey!')

$scope.$apply($scope.helloWorld);

}

};

annyang.debug();

annyang.init($scope.commands);

annyang.start();

}

$(document).ready(function () {

var editor_one = CodeMirror.fromTextArea(document.getElementById("code1"), {

lineNumbers: true,

matchBrackets: true,

styleActiveLine: true,

theme: "ambiance"

});

var editor_two = CodeMirror.fromTextArea(document.getElementById("code2"), {

lineNumbers: true,

matchBrackets: true,

styleActiveLine: true

});

});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值