@stesura/proofread-react
The proofread UI: toolbar group, panel, context and floating menus, and the status-bar indicator,
for the @stesura/proofread plugin. Setup is in the
Proofread guide.
UI extension
Pass one of these in uiExtensions for all of the UI below. Build it once, at module level: the
editor expects a stable uiExtensions array.
proofreadUIExtension
createProofreadUIExtension with no options.
createProofreadUIExtension
All proofread UI (context menu, floating menu, Review-tab group, status bar, panel),
to pass via uiExtensions. Create it once, at module level: the editor expects a
stable uiExtensions array. The components are also exported individually.
| Name | Type | Default |
|---|---|---|
__0 | ProofreadUIExtensionOptions |
ProofreadUIExtensionOptions
Options for createProofreadUIExtension.
Components
The pieces the extension mounts, for custom toolbars and layouts.
ProofreadPanel
Right-hand panel listing every proofread error, including headers, footers and notes (badged with their origin), filterable by spelling/grammar.
| Name | Type | Default |
|---|---|---|
props | {} |
ProofingGroup
Review-tab toolbar group: language picker plus the proofread on/off toggle.
| Name | Type | Default |
|---|---|---|
props | {} |
ProofreadToggle
Toolbar on/off toggle for the global proofread preference. The status-bar counterpart
is ProofreadToggleStatusBar.
| Name | Type | Default |
|---|---|---|
props | {} |
LanguageSelector
Sets the selected blocks’ proofingLanguage override. “Follow document” clears it, so
the blocks inherit from their style, else the document (whose language is set from
the status bar). Shows “mixed” when the selection spans several languages.
| Name | Type | Default |
|---|---|---|
props | { className?: string; portal?: boolean; languages?: readonly ProofingLanguageOption[]; } |
ProofreadButton
Large toolbar button toggling the proofread panel, for custom toolbars. Not used by
ProofingGroup, which opens the panel from its expand button.
| Name | Type | Default |
|---|---|---|
props | {} |
ProofreadContextMenu
Context-menu submenu for the error under the selection: suggestions, ignore once, ignore all and, for spelling errors with a dictionary configured, add to dictionary. The only surface offering the last two.
| Name | Type | Default |
|---|---|---|
props | {} |
ProofreadFloatingMenuController
Floating menu with suggestions and ignore-once, opened when the caret arrives on a
flagged range. Hidden while the context menu is open, and off when the user turned
the proofReadFloatingMenu preference off.
| Name | Type | Default |
|---|---|---|
props | {} |
ProofreadToggleStatusBar
Status-bar entry showing proofreading as on, off or unavailable (api failing), with a
menu to toggle, retry or open the panel. The toolbar counterpart is
ProofreadToggle.
| Name | Type | Default |
|---|---|---|
props | ProofreadToggleStatusBarProps |
ProofreadToggleStatusBarProps
Props of ProofreadToggleStatusBar.
| Name | Type | Default |
|---|---|---|
menuFooter | ReactNodeRendered at the bottom of the menu, below a separator. |