@maxoyed/ode-vue
v0.4.1
Published
公文编辑器 Vue 3 适配:<OfficialEditor v-model> 与 useOfficialEditor,开箱即公文版式。
Maintainers
Readme
@maxoyed/ode-vue
公文编辑器的 Vue 3 适配——开箱即用的 <OfficialEditor> 组件,默认排版即符合 GB/T 9704-2012,纯前端离线。
安装
pnpm add @maxoyed/ode-vue @maxoyed/ode-core vue用法
<script setup lang="ts">
import { ref } from "vue";
import { OfficialEditor } from "@maxoyed/ode-vue";
import "@maxoyed/ode-core/styles.css";
const doc = ref();
</script>
<template>
<OfficialEditor v-model="doc" :pagination="true" @ready="(e) => console.log(e)" />
</template>Props:v-model(Tiptap JSON)、pagination(内联分页)、editable。事件:update:modelValue、ready。
也提供 useOfficialEditor() 组合式用法。
