EditorId | string | $"fx-editor-{Guid.NewGuid():N}" | DOM id of the editable element. The script finds the editor by this id, so it must be unique on the page; an empty value throws ArgumentException. |
Blocks | IReadOnlyList<EditorBlock> | Array.Empty<EditorBlock>() | Starting content. Written into the editor after the first render, and again whenever a different list arrives while AutoPush is on; handing back the list OnBlocksChanged delivered does not rewrite it. An empty list gives one empty paragraph. |
AutoPush | bool | true | When false, a new Blocks list is not written in; call PushAsync instead. |
Paginate | bool | false | Lays the text out as fixed-size page cards (fx-paged on the editor, a div.fx-page per card) that the script measures and fills, splitting long paragraphs between words; a blank card and a New page button follow the last one. The script re-paginates while the user types and when the caret moves to another page after an edit. Switching the parameter keeps the current text. |
PagedCssClass | string? | null | Extra class on the editor in paged mode. Set --fx-page-w, --fx-page-h, --fx-page-pad and --fx-page-bg under it to size the cards; without them a card is 5.5in by 8.5in. |
PageWidth | EditorPageWidth | EditorPageWidth.Normal | Maximum width of the text: Narrow 640px, Normal 820px and Wide 1040px, centered; Full has no limit. Rendered as the class fx-pw-narrow, fx-pw-normal and so on. |
FontFamily | string | "Merriweather" | Base font, written as font-family: 'FontFamily', Georgia, serif, so give one family name. The control loads no web fonts. |
FontSizePx | int | 18 | Base font size in pixels. |
LineHeight | double | 1.7 | Base line height, unitless. |
CssClass | string? | null | Added to the editable element. |
ReadOnly | bool | false | Renders contenteditable="false" and aria-readonly="true" and blocks input; the formatting, undo, redo and replace methods then do nothing. |
SpellCheck | bool | true | Sets spellcheck on the editable element. |
AriaLabel | string | "Document editor" | Accessible name of the editable element, which has role="textbox". |
ShowToolbar | bool | false | Draws the control's own ToolbarControl above the text: Undo, Redo, Bold, Italic, Underline, Align left, Align center and Find / replace. Undo and Redo stay disabled unless EnableHistory is on. |
EnableHistory | bool | false | Turns on the control's undo and redo: a snapshot after each change, with typing of one kind in one place within 750 ms merged into one step; Ctrl+Z, Ctrl+Y and Ctrl+Shift+Z (or ⌘); UndoAsync and RedoAsync. Leave it off when the host keeps its own history. |
HistoryLimit | int | 100 | Most undo steps, and most redo steps, kept. Below 1 throws ArgumentOutOfRangeException. |
HistoryChanged | EventCallback<EditorHistoryState> | — | Raised when CanUndo, CanRedo, UndoCount or RedoCount changes, including the reset after PushAsync. |
OnBlocksChanged | EventCallback<IReadOnlyList<EditorBlock>> | — | Raised after each change in the editor (typing, a formatting command that changed the blocks, undo, redo, replace) with the whole document read back as blocks. On Blazor Server the document arrives as one SignalR message, so under the default 32 KB limit a long document stops syncing with no error on the page (only the browser console shows the dropped connection); raise HubOptions.MaximumReceiveMessageSize for long documents. |
OnSelectionChanged | EventCallback<EditorSelectionInfo?> | — | Raised 10 ms after a mouse-up inside the editor with the selected text, its block id and its position relative to the editor's nearest positioned ancestor, or null when nothing is selected. Selecting with the keyboard does not raise it. |