extension-code
package @remirror/extension-code
class CodeExtension
Add a code
mark to the editor. This is used to mark inline text as a code snippet.
Signature:
export declare class CodeExtension extends MarkExtension
Extends: MarkExtension
(Some inherited members may not be shown because they are not represented in the documentation.)
property name
Signature:
get name(): "code";
method createInputRules
Signature:
createInputRules(): InputRule[];
Returns:
InputRule[]
method createKeymap
Signature:
createKeymap(): KeyBindings;
Returns:
method createMarkSpec
Signature:
createMarkSpec(extra: ApplySchemaAttributes, override: MarkSpecOverride): MarkExtensionSpec;
Parameters:
Parameter | Type | Description |
---|---|---|
extra | ApplySchemaAttributes | |
override | MarkSpecOverride |
Returns:
method createPasteRules
Signature:
createPasteRules(): MarkPasteRule[];
Returns:
method createTags
Signature:
createTags(): ("code" | "excludeFromInputRules")[];
Returns:
("code" | "excludeFromInputRules")[]
method keyboardShortcut
Signature:
keyboardShortcut(props: KeyBindingProps): boolean;
Parameters:
Parameter | Type | Description |
---|---|---|
props | KeyBindingProps |
Returns:
boolean
method toggleCode
Toggle the current selection as a code mark.
Signature:
toggleCode(): CommandFunction;
Returns:
CommandFunction