0.0.7 • Published 2 years ago

vue2-ace-bind v0.0.7

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

vue2-ace-bind

A Vue2 component for binding the ace editor

Install

NPM

npm install vue2-ace-bind --save-dev

YARN

yarn add vue2-ace-bind -D

How to use

Import the component firstly

import aceEditor from "vue2-ace-bind";

Then import the language mode and theme which you want to use

import javascript from "brace/mode/javascript"
import sh from "brace/mode/sh"
import xcode from "brace/theme/xcode"
import terminal from "brace/theme/terminal"

The default config mode is bash and theme is terminal

Ace-editor's mode and theme list is here:

Register the component.

components: {
  editor
}

Use the component in template

<editor :content="variable"></editor>

The content is required,other props have the following defaults:

lang: sh
theme: terminal
height: 100%
width: 100%
options: {}

if you want to configure the ace-editor,just define options in data.

<editor :content="variable" :options="options" ></editor>
option: {
    showLineNumbers: false,
    showFoldWidgets: true,
    showGutter: false,
    displayIndentGuides: false,
    showPrintMargin: false
    ....
}

The official doc is here: Configuring ACE.

0.0.7

2 years ago

0.0.6

3 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago