Fix tiptap selection sync and toolbar event loop

This commit is contained in:
lix-2026
2026-04-19 21:03:25 +08:00
parent 111a87d4fd
commit 394e2a155c
87 changed files with 17415 additions and 527 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,20 @@
[package]
name = "mnote-leptos-tiptap-spike"
version = "0.1.0"
edition = "2021"
[workspace]
[dependencies]
console_error_panic_hook = "0.1.7"
leptos = { version = "0.8.19", features = ["csr"] }
leptos_dom = "0.8.8"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
wasm-bindgen = "0.2"
web-sys = { version = "0.3.77", features = ["DataTransfer", "Document", "DomRect", "DragEvent", "Element", "EventTarget", "HtmlElement", "MouseEvent", "Node", "Range", "Selection", "Storage", "Window"] }
[dependencies.leptos-tiptap]
path = "../../../design/blocknote/reference-code/leptos-tiptap"
default-features = false
features = ["component", "full"]
@@ -0,0 +1,7 @@
[build]
target = "index.html"
dist = "dist"
public_url = "/"
[watch]
ignore = ["dist"]
@@ -0,0 +1,44 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>mnote leptos-tiptap spike</title>
<style>
:root {
color-scheme: light;
--bg: #f4efe6;
--panel: rgba(255, 252, 246, 0.94);
--panel-strong: #fffdfa;
--ink: #1f2937;
--muted: #5b6473;
--line: rgba(100, 116, 139, 0.24);
--accent: #0f766e;
--accent-strong: #0b5f59;
--accent-soft: rgba(15, 118, 110, 0.12);
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
min-height: 100%;
background:
radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 26%),
linear-gradient(180deg, #fcf8f2 0%, var(--bg) 100%);
color: var(--ink);
font-family: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", sans-serif;
}
button,
input,
textarea {
font: inherit;
}
</style>
</head>
<body></body>
</html>
File diff suppressed because it is too large Load Diff