1.0.3 • Published 8 years ago
vue-ace-editor v1.0.3
vue-ace-editor
A packaging of ace
How to use
Install
npm install --save-dev vue-ace-editorRequire it in
componentsof Vue options{ data, methods, ... components: { editor:require('vue-ace-editor'), }, }Require the editor's mode/theme module in father's events
vue-ace-editor:initBecause if require the modules inside the component dynamically. The size of bundle.js will be very huge.
{ data, methods, components, events:{ 'vue-ace-editor:init':function () { require('vue-ace-editor/node_modules/brace/mode/html'); require('vue-ace-editor/node_modules/brace/mode/javascript'); require('vue-ace-editor/node_modules/brace/mode/less'); require('vue-ace-editor/node_modules/brace/theme/chrome'); } }, }Use the component in template
<editor :content.sync="html" lang="html" theme="chrome" width="300" height="300" ></editor>prop
contentis requiredprop
langandthemeis same as ace-editor's docprop
heightandwidthcould be one of these:200,200px,50%