vue2.7-ace-editor
TypeScript icon, indicating that this package has built-in type declarations

2.2.7 • Public • Published

vue2.7-ace-editor

npm

A packaging of ace. fork from vue3-ace-editor

  • support vue 2.7
  • support vite

Install

pnpm add vue2.7-ace-editor ace-builds

Use alias

"dependencies": {
    "vue-ace-editor": "npm:vue2.7-ace-editor@2.2.5",
    "ace-builds": "latest"
}

Import

<template>
  <editor v-bind="$attrs" v-on="$listeners" :value="value" />
</template>

<script lang="ts">
/**
 * 封装ace-editor
 */
import { PropType, computed, defineComponent, reactive, ref, toRef, toRefs, watch } from 'vue'

import { VAceEditor } from 'vue-ace-editor'
import 'ace-builds/src-noconflict/mode-json'
import 'ace-builds/src-noconflict/mode-html'
import 'ace-builds/src-noconflict/mode-xml'
import 'ace-builds/src-noconflict/mode-javascript'
import 'ace-builds/src-noconflict/mode-python'
import 'ace-builds/src-noconflict/mode-less'
import 'ace-builds/src-noconflict/mode-groovy'
import 'ace-builds/src-noconflict/theme-chrome'

export default defineComponent({
  name: 'ace-editor',
  components: { editor: VAceEditor },
  props: {
    value: { default: '', type: String },
  }
})
</script>

LICENSE

MIT

/vue2.7-ace-editor/

    Package Sidebar

    Install

    npm i vue2.7-ace-editor

    Weekly Downloads

    27

    Version

    2.2.7

    License

    MIT

    Unpacked Size

    18.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • defghy