Install with npm:
npm i squad-editor
Install with yarn:
yarn add squad-editor
SquadEditor requires
vue
>= v3
<template>
<squad-editor
ref="squadEditorRef"
v-model:value="value"
:min-height="state.minHeight"
:max-height="state.maxHeight"
:tabKey="state.tabKey"
:uploader="state.uploader"
/>
</template>
<script setup>
import { ref, reactive } from 'vue'
import SquadEditor from 'squad-editor'
import 'squad-editor/styles/index.css'
const value = ref('')
const squadEditorRef = ref(null)
const uploader = (file) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ name: 'pictureName', url: 'picture.jpg' })
}, 3000)
})
}
const state = rective({
minHeight: '300px',
maxHeight: '800px',
tabKey: ' ',
uploader
})
</script>
MIT License © 2019-PRESENT Humandetail