Skip to content

NoName4Me/ace-editor-on-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published