Use inline WYSIWYG markdown editor for long text messages

Desktop: replace the Write/Preview tab toggle in the compose card with
MDXEditor, an inline WYSIWYG that renders markdown as you type (Obsidian/
Notion feel) and round-trips plain markdown, matching how particle content
is stored. Immersive mode is unchanged — short, plain notes still get the
centered large-type textarea, and ⌘+M still drops into the rich editor.
Shortcut handling moves to the capture phase so ⌘+Enter / Esc win over the
editor's own key handling.

Mobile: render markdown on the display side via react-native-marked's
useMarkdown hook (no FlatList, so it nests cleanly in the existing
ScrollView). Mirrors desktop's immersive-vs-card logic: short plain notes
stay centered; anything with markdown renders formatted instead of showing
raw syntax. Composer stays plain text.

https://claude.ai/code/session_019DU6V5z6Nr4Vu7b1fBDnq4
This commit is contained in:
Claude
2026-05-28 23:32:57 +00:00
parent 3bfc15945d
commit 47c173f472
8 changed files with 1413 additions and 146 deletions
@@ -0,0 +1,33 @@
/* Blend MDXEditor into the compose glass card.
We lean on MDXEditor's bundled `dark-theme` for typography (heading sizes,
list markers, code styling) and only override the chrome: transparent
background, no border, and padding/colors tuned to the surrounding card. */
.llink-mdxeditor {
--baseBg: transparent;
--basePageBg: transparent;
background: transparent;
height: 100%;
}
.llink-mdxeditor [class*="_editorRoot_"] {
background: transparent;
height: 100%;
}
.llink-mdx-content {
padding: 0 !important;
outline: none;
height: 100%;
color: rgb(255 255 255 / 0.92);
font-size: 0.95rem;
line-height: 1.7;
}
.llink-mdx-content :where(h1, h2, h3, h4, h5, h6) {
color: #fff;
}
.llink-mdx-content a {
color: #60a5fa;
}