Skip to content

Latest commit

 

History

History
50 lines (41 loc) · 1.19 KB

README.md

File metadata and controls

50 lines (41 loc) · 1.19 KB

ace-editor-on-vue

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.