RayCraftDocs
v1.0.3 raycraft.dev
On this page

TextContextMenu

Free

The right-click menu of an editable text element: undo, redo, cut, copy, paste and select all, plus commands you add. The editors of RayCraft use it, and it is the way to give your own editor, such as a rich text editor, the same menu.

Example

TextContextMenu control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
ItemsProviderFunc<TextContextInfo, IReadOnlyList<MenuCommand>>Returns extra commands for the place that was clicked.
ReadOnlyboolDisables cut, paste, undo and redo.
ShowHistoryboolShows undo and redo (default on).
StylestringInline style added to the root element.
TargetFunc<ElementReference>Returns the element reference the menu belongs to; read again after every render.

Events

EventTypeDescription
OnOpeningEventCallback<TextContextInfo>Raised before the menu is built, with the position, selection and link address.

Package

TextContextMenu is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.