@multiplatform.one/rich-text
v6.4.3
Published
Cross-platform rich text editor with markdown support and syntax highlighting
Readme
@multiplatform.one/rich-text
Cross-platform rich text editor — Tiptap on web, 10Tap on native — with markdown support and a shared command/state API.
Install
pnpm add @multiplatform.one/rich-textRequires react and react-native (or react-native-web) as peers.
What it owns
RichEditor— the headless-ish editor surface (HTML/JSON content in, HTML + JSON out), one API across web and nativeRichTextEditor— the composed editor with toolbar chrome- Types:
RichEditorRef(imperative commands),RichEditorProps,EditorCommand,EditorState
What it must not do
- No markdown rendering — read-only markdown display lives in
@multiplatform.one/markdown - No form-field contract of its own — form integration wraps it from
@multiplatform.one/formsconventions
Usage
import { RichEditor } from "@multiplatform.one/rich-text";
export function NoteEditor() {
return (
<RichEditor
initialContent="<p>Hello <strong>world</strong></p>"
placeholder="Write something…"
autoFocus
onChange={(html, json) => {
console.log("content changed", html, json);
}}
/>
);
}Pass editable={false} for a read-only view; use onStateChange to drive a
custom toolbar (bold/italic/list active states).
Styling
Editor chrome resolves through the knobs system in @multiplatform.one/theme
(see agent-os/standards/frontend/knobs-system.md in the
multiplatform.one repo).
License
Apache-2.0
