Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

§Classes

InputRule

Input rules are regular expressions describing a piece of text that, when typed, causes something to happen. This might be changing two dashes into an emdash, wrapping a paragraph starting with "> " into a blockquote, or something entirely different.

§Variables

closeDoubleQuote

“Smart” closing double quotes.

closeSingleQuote

“Smart” closing single quotes.

ellipsis

Converts three dots to an ellipsis character.

emDash

Converts double dashes to an emdash.

openDoubleQuote

“Smart” opening double quotes.

openSingleQuote

“Smart” opening single quotes.

smartQuotes

Smart-quote related input rules.

undoInputRule

This is a command that will undo an input rule, if applying such a rule was the last thing that the user did.

§Functions

inputRules

Create an input rules plugin. When enabled, it will cause text input that matches any of the given rules to trigger the rule's action.

textblockTypeInputRule

Build an input rule that changes the type of a textblock when the matched text is typed into it. You'll usually want to start your regexp with ^ to that it is only matched at the start of a textblock. The optional getAttrs parameter can be used to compute the new node's attributes, and works the same as in the wrappingInputRule function.

wrappingInputRule

Build an input rule for automatically wrapping a textblock when a given string is typed. The regexp argument is directly passed through to the InputRule constructor. You'll probably want the regexp to start with ^, so that the pattern can only occur at the start of a textblock.