ckeditor+代码高亮(2)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-25 11:35 点击:次
title: 'cb',
elements: [{
type: 'select',
label: 'Language',
id: 'lang',
required: true,
'default': 'csharp',
items: [['ActionScript3', 'as3'], ['Bash/shell', 'bash'], ['C#', 'csharp'], ['C++', 'cpp'], ['CSS', 'css'], ['Delphi', 'delphi'], ['Diff', 'diff'], ['Groovy', 'groovy'], ['Html', 'xhtml'], ['JavaScript', 'js'], ['Java', 'java'], ['JavaFX', 'jfx'], ['Perl', 'perl'], ['PHP', 'php'], ['Plain Text', 'plain'], ['PowerShell', 'ps'], ['Python', 'py'], ['Ruby', 'rails'], ['Scala', 'scala'], ['SQL', 'sql'], ['Visual Basic', 'vb'], ['XML', 'xml']]
}, {
type: 'textarea',
style: 'width:700px;height:420px',
label: 'Code',
id: 'code',
rows: 31,
'default': ''
}]
}],
onOk: function () {
code = this.getValueOf('cb', 'code');
lang = this.getValueOf('cb', 'lang');
html = '' + escape(code) + '';
editor.insertHtml("<pre class=\"brush:" + lang + ";\">" + html + "</pre>");
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 进入详细评论页>>
今日头条
更多>>您可能感兴趣的文章
- asp.net DataTable和Dataset序列化成Json格式
- Web Service学习笔记(4)
- .NET简谈互操作(四:基础知识之Dispose非托管内存
- Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注
- .net架构的最后思考(箴言)
- MVC3+Entity Framework 实现投票系统(二)
- 使用ASP.NET MVC3+EF+Jquery制作文字直播系统(四
- JQuery+Asp.net MVC实现用户名重名查询
- 聊聊.net程序设计——浅谈使用VS2010建模拓展(下
- .NET设计模式:工厂方法模式(Factory Method)[1]



