0.0.6 • Published 7 years ago
vuace v0.0.6
vuace
Introduction
A packaging of ace for Vue.js based on vue2-ace-editor.
How to use
Install
npm install --save vuaceUse it with
Vue.useimport VuacePlugin from `vuace` Vue.use(VuacePlugin)Require the editor's mode/theme module in custom methods that is bind to
@init{ data, methods: { editorInit: function () { require('brace/ext/language_tools') //language extension prerequsite... require('brace/mode/html') require('brace/mode/javascript') //language require('brace/mode/less') require('brace/theme/chrome') require('brace/snippets/javascript') //snippet } }, }Use the component in template
<ace-editor v-model="content" @init="editorInit" lang="html" theme="chrome" width="500" height="100"></ace-editor>
- prop
v-modelis required - prop
langandthemeis same as ace-editor's doc - prop
heightandwidthcould be one of these:200,200px,50%