1.4.4 • Published 2 months ago
ekt-editor v1.4.4
NPM
npm i ekt-editor
main.js
import { createApp } from 'vue'
import App from './App.vue'
import VueEditor from 'ekt-editor'
import 'ekt-editor/lib/index.css'
const app = createApp(App)
app.use(VueEditor).mount('#app')
component
import { Editor } from 'ekt-editor'
组件使用方法
<template>
<Editor v-model:content="content"></Editor>
</template>
<script lang="ts" setup>
import { Editor } from 'ekt-editor'
import { ref } from 'vue'
const content = ref('')
</script>
组件属性
属性 | 类型 | 是否必填 | 说明 |
---|---|---|---|
content | string | true | 编辑器内容 |
min-height | string | false | 编辑器最小高度 |
min-height | string | false | 编辑器最大高度 |
excludeEditorMenu | array | false | 不显示的菜单项,可选值: bold italic underline strikethrough heading textStyle highlight blockquote codeBlock image left center right header justify bulletList orderedList horizontalRule table print undo redo |
editorMenu | array | false | 自定义菜单选项,可选值:bold italic underline strikethrough heading textStyle highlight blockquote codeBlock image left center right header justify bulletList orderedList horizontalRule table print undo redo 注:当excludeEditorMenu和editorMenu同时存在时,excludeEditorMenu优先级更高 |
editorWords | boolean | false | 是否显示字数统计 |
editorImageUrl | string | false | 图片上传地址 |