squad-editor
v0.0.3
Published
A Vue3 markdown editor component
Downloads
1
Maintainers
Readme
SquadEditor
📦 Install
Install with npm:
npm i squad-editor
Install with yarn:
yarn add squad-editor
SquadEditor requires
vue
>= v3
🦄 Usage
<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>
📄 License
MIT License © 2019-PRESENT Humandetail