说明文档:https://ace.c9.io/#nav=howto&api=editor
源码下载:https://github.com/ajaxorg/ace-builds/
var editor = ace.edit("editor")
editor.setTheme("ace/theme/monokai")
editor.session.setMode("ace/mode/python")
设置根据字符自动换行:
editor.setOptions({
wrap:'free' //如果设置字符,则为字符数:比如 wrap:10
})
editor.$readOnly = true