@fibery/custom-app-text-editor
Fibery's rich text editor as a single React component, connected to the Fibery workspace it runs in (e.g. inside a custom app).
Usage
import {TextEditor} from "@fibery/custom-app-text-editor";
import "@fibery/custom-app-text-editor/style.css";
<TextEditor defaultValue={doc} placeholder="Start typing…" onChange={(doc) => save(doc)} />;
Props
| Prop | Type | Description |
|---|---|---|
defaultValue | DocumentContentJson | string | Initial content as Fibery document JSON ({doc, comments}) or its string. Uncontrolled: read once on mount. |
readOnly | boolean | Render the document without editing. Default false. |
placeholder | string | Placeholder shown while the document is empty. |
onChange | (doc: DocumentContentJson) => void | Called on edits with the current document JSON; the initial load is excluded. |
Notes
- Entity and mention nodes in the document render as live chips. Their titles, icons, and links resolve automatically through the Fibery workspace the app runs in — do not fetch entity data yourself and do not build your own ProseMirror setup.
- Views and documents can be mentioned too: they are offered in the entity search and render as chips with the view's icon and name. A view chip opens the view only when the app runs inside Fibery; on public pages and standalone runs it is not clickable.
- Typing
@opens a user mention picker backed by the workspace's user list. - The workspace's custom emojis render as images and are offered when typing
:; all editors on the page share one emoji store — do not load or paint custom emojis yourself. - "Connected" means connected to the workspace for entity/mention data; the document itself is not live-synced or collaborative.
- Chips the current user has no access to render as a locked "No access" chip.
- File uploads use the connected workspace through the Fibery client.