@hakulex/plugin-litexml-paste
v0.4.0
Published
LiteXML paste plugin for hakulex: pasted LiteXML text becomes the blocks it describes
Maintainers
Readme
@hakulex/plugin-litexml-paste
貼上 LiteXML 文字時變成對應的區塊,適合貼上 AI 產生的內容。
hakulex 的一部分:給 Vue 3 的富文本編輯器,建立在 Lexical 上。這個套件的說明和可以操作的範例在 hakulex.dev/plugins/litexml-paste。
安裝
pnpm add @hakulex/plugin-litexml-paste @hakulex/editor lexical vue使用
<script setup lang="ts">
import type { SerializedEditorState } from 'lexical'
import { RichEditor } from '@hakulex/editor'
import { LiteXmlPastePlugin } from '@hakulex/plugin-litexml-paste'
import { shallowRef } from 'vue'
const doc = shallowRef<SerializedEditorState | null>(null)
</script>
<template>
<RichEditor v-model="doc" placeholder="把 LiteXML 貼在這裡">
<LiteXmlPastePlugin />
</RichEditor>
</template>