Feishu-style block document editor for Reflex (personal package by qicheng)
Project description
reflex-qicheng-docedit
飞书风块文档编辑器,自用 Reflex 组件包(作者:qicheng)。底层基于 TipTap 实现。
安装 / 运行 demo
pip install -e .
reflex run
使用
import reflex as rx
from reflex_qicheng_docedit import doc_edit
class State(rx.State):
content: str = "<p></p>"
revision: int = 0
@rx.event
def on_change(self, html: str):
self.content = html # 日常编辑不要改 revision
def index():
return doc_edit(
content=State.content,
revision=State.revision,
on_change=State.on_change,
height="70vh",
)
app = rx.App()
app.add_page(index)
仅在需要从 Python 强制重载编辑器内容时,才递增 revision。
包结构
reflex_qicheng_docedit/
editor.jsx # 编辑器入口
panels/
insertMenu.jsx # 「+」/「/」边栏
blockGutter.jsx # 块边栏(拖拽 / 高亮)
selectionToolbar.jsx # 选区浮动工具栏
basic.jsx # 基础插入
table.jsx # 表格
task.jsx # 任务
media.jsx # 图片 / 视频
imageExt.jsx # 图片节点扩展
highlightBlockExt.jsx # 高亮块
shared.jsx # 共用组件
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reflex_qicheng_docedit-0.1.0.tar.gz.
File metadata
- Download URL: reflex_qicheng_docedit-0.1.0.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb57f39063c189c3cd289f3a61b5cff6c09571e9524568b2b6ecb338e1396d8
|
|
| MD5 |
d8fc0d0ade34f592539bf6cc7e0f7be4
|
|
| BLAKE2b-256 |
30a642f3ce874771f1c1d22d5424870130545f3ef104161415f9402a8544bf94
|
File details
Details for the file reflex_qicheng_docedit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reflex_qicheng_docedit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3bff2c52df83cc43f4c3f2be8d926c125d2d8555061b032d78c5908aa76db21
|
|
| MD5 |
26aee6d1061fb48984f45cc2617d831f
|
|
| BLAKE2b-256 |
2c39259465f1e10216977267ba89f67a9c3a9f478552604010a18f8b7baff77c
|