0.1.1 • Published 6 years ago

ace-editor-on-vue v0.1.1

Weekly downloads
11
License
MIT
Repository
github
Last release
6 years ago

ace-editor-on-vue


npm.io npm.io npm.io npm.io

A vuejs based component, based on bace, on Ace.

Usage

  • install
npm install ace-editor-on-vue
  • .vue demo
<template>
    <!-- support `%`, `px` and other CSS `width`/`height` units -->
    <editor v-model="content" :config="config" width="500px" height="200px"></editor>
</template>

<script>
import AceEditorOnVue from 'ace-editor-on-vue';
export default {
    components: {
        'ace-editor': AceEditorOnVue
    },
    data() {
        return {
            content: '',
            config: {
                lang: 'json', // default `json`
                theme: 'xcode', // default `xcode`
                options: { // options for Ace
                    useSoftTabs: true, // default 2 space characters for indent
                    tabSize: 2
                }
            }
        }
    }
}
</script>

More details see Ace Editor Wiki.

0.1.1

6 years ago

0.1.0

6 years ago