vue2-ace-editor-electron
v0.0.4
Published
Ace (brace) editor wrapper component for Vue2 based electron apps
Downloads
34
Maintainers
Readme
vue2-ace-editor-electron
A packaging of ace
Forked from: https://github.com/chairuosen/vue2-ace-editor - Which works with vue-electron, does not include emmet and uses standardjs coding style.
How to use
Install
npm install vue2-ace-editor-electron --save
Require it in
components
of Vue options{ components: { editor: require('vue2-ace-editor-electron'), }, }
Require the editor's mode/theme module in custom methods
{ methods: { editorInit: function () { require('brace/mode/html') require('brace/mode/javascript') require('brace/mode/less') require('brace/theme/chrome') } }, }
Use the component in template
<editor v-model="content" @init="editorInit" lang="html" theme="chrome" width="500" height="calc(100vh)"></editor>
prop
v-model
is requiredprop
lang
andtheme
is same as ace-editor's docprop
height
andwidth
could be one of these:200
,200px
,50%
,calc(100vh)