Blazor Rich Text Editor Example - Format Painter
This demo showcases the Format Painter feature of the Rich Text Editor component, which allows users to copy formatting from one section of content and apply it to another.
Properties
Allowed Formats |
|
Denied Formats |
The Format Painter feature allows you to copy the formats and apply them to content without formatting thus saving time to reformat the content.
- Format painter can be accessed via the toolbar or the keyboard shortcuts.
- The sticky mode can be enabled by double-clicking the toolbar button, and it can be utilized to apply a format to multiple locations.
Keyboard Shortcut
- ALT + SHIFT + C - Copy the selection format or current range.
- ALT + SHIFT + V - Paint the copied format.
- ESC - Remove the previously copied format and disable the sticky mode.
The following settings are available to customize the format painter in the RichTextEditorFormatPainterSettings property.
Fill the
Allowed Formatsinput with selectors only whose format styles will be allowed. For example:span; strong; em;as the input allows only the span, strong, and em format styles to be copied.Fill the
Denied Formatsinput with selectors only whose format styles will be explicitly prohibited. For example:span(important)[title]{background-color,color}as the input will remove only theimportantclass,titleattribute,color,andbackground-colorof the span element. All other format styles will be copied.