extension-whitespace
package @remirror/extension-whitespace
class WhitespaceExtension
Manage whitespace characters within your editor.
This adds decorators to the editor to represent the whitespace characters and can be useful for increasing the accessibility of your editor.
Signature:
export declare class WhitespaceExtension extends PlainExtension<WhitespaceOptions>
Extends: PlainExtension<WhitespaceOptions>
(Some inherited members may not be shown because they are not represented in the documentation.)
property name
Signature:
get name(): "whitespace";
method createDecorations
Signature:
createDecorations(): DecorationSet;
Returns:
DecorationSet
method hideWhitespace
Force the white space characters to be shown.
Signature:
hideWhitespace(): CommandFunction;
Returns:
CommandFunction
method isWhitespaceVisible
Determine if whitespace characters are currently shown.
Signature:
isWhitespaceVisible(): Helper<boolean>;
Returns:
Helper<boolean>
method onApplyState
Update the whitespace decorations for each state update.
Signature:
onApplyState(props: ApplyStateLifecycleProps): void;
Parameters:
Parameter | Type | Description |
---|---|---|
props | ApplyStateLifecycleProps |
Returns:
void
method onCreate
Signature:
onCreate(): void;
Returns:
void
method onInitState
Create the initial decoration state.
Signature:
onInitState(state: EditorState): void;
Parameters:
Parameter | Type | Description |
---|---|---|
state | EditorState |
Returns:
void
method onSetOptions
When the decorators are updated we should update trigger an update to the editor state.
Signature:
protected onSetOptions(props: OnSetOptionsProps<WhitespaceOptions>): void;
Parameters:
Parameter | Type | Description |
---|---|---|
props | OnSetOptionsProps<WhitespaceOptions> |
Returns:
void
method showWhitespace
Force the white space characters to be shown.
Signature:
showWhitespace(): CommandFunction;
Returns:
CommandFunction
method toggleWhitespace
Toggle the visibility of whitespace characters.
Signature:
toggleWhitespace(): CommandFunction;
Returns:
CommandFunction