extension-text-highlight
package @remirror/extension-text-highlight
class TextHighlightExtension
Add a highlight color to the selected text (or text within a specified range).
Signature:
export declare class TextHighlightExtension extends MarkExtension<TextHighlightOptions>
Extends: MarkExtension<TextHighlightOptions>
(Some inherited members may not be shown because they are not represented in the documentation.)
property name
Signature:
get name(): "textHighlight";
method createMarkSpec
Signature:
createMarkSpec(extra: ApplySchemaAttributes, override: MarkSpecOverride): MarkExtensionSpec;
Parameters:
Parameter | Type | Description |
---|---|---|
extra | ApplySchemaAttributes | |
override | MarkSpecOverride |
Returns:
method createTags
Signature:
createTags(): ("formattingMark" | "fontStyle")[];
Returns:
("formattingMark" | "fontStyle")[]
method removeTextHighlight
Remove the highlight mark from the selection.
Signature:
removeTextHighlight(options?: HighlightCommandOptions): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
options | HighlightCommandOptions | (Optional) |
Returns:
CommandFunction
method setTextHighlight
Set the text highlight color value for the selected text.
Signature:
setTextHighlight(highlight: string, options?: HighlightCommandOptions): CommandFunction;
Parameters:
Parameter | Type | Description |
---|---|---|
highlight | string | |
options | HighlightCommandOptions | (Optional) |
Returns:
CommandFunction
interface TextHighlightAttributes
Signature:
export interface TextHighlightAttributes
property highlight
The highlight color.
Signature:
highlight?: string;
interface TextHighlightOptions
Signature:
export interface TextHighlightOptions
property defaultHighlight
The default highlight value.
Signature:
defaultHighlight?: Static<string>;
property palette
The color palette which is a function that returns a list of colors and labels for help with ui. It is completely optional and you are free to use use whatever colors you choose.
Signature:
palette?: Palette;