Implementation:0xranx OpenContext Plate Toolbars
| Knowledge Sources | |
|---|---|
| Domains | Editor, React |
| Last Updated | 2026-10-24 00:00 GMT |
Overview
⚠ DEPRECATED: Floating and table toolbars for the legacy Plate editor, providing text formatting buttons, citation copying, and table manipulation actions. Only imported by the dead PlateMarkdown component. See Heuristic:0xranx_OpenContext_Warning_Deprecated_Plate_Editor.
Description
The Toolbars.jsx module in src/ui/src/editor/components/ exports ToolbarButton (shared formatting button), TableActionButton (table action button), FloatingToolbar (selection-based toolbar with bold/italic/strikethrough/code and citation copy), and TableFloatingToolbar (table-specific toolbar for row/column add/delete). Both toolbars use Slate/Plate selection state to determine visibility.
Usage
Import these components in PlateMarkdown.jsx to render floating format and table toolbars.
Code Reference
Source Location
- Repository: 0xranx_OpenContext
- File: src/ui/src/editor/components/Toolbars.jsx
- Lines: 1-369
Signature
export const ToolbarButton = memo(({ onClick, children, title, active }) => ...)
export const TableActionButton = memo(({ onClick, children, title, danger }) => ...)
export function FloatingToolbar({ editor, docMeta, onToast })
export function TableFloatingToolbar({ editor, insertTable, ... })
Import
import { FloatingToolbar, TableFloatingToolbar } from './editor/components/Toolbars';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| editor | PlateEditor | Yes | Plate/Slate editor instance |
| docMeta | object | No | Document metadata for citations |
| onToast | Function | No | Toast callback |
Usage Examples
Rendering Toolbars
import { FloatingToolbar, TableFloatingToolbar } from './editor/components/Toolbars';
<FloatingToolbar editor={editor} docMeta={doc} onToast={showToast} />
<TableFloatingToolbar editor={editor} />