R
I

InputRuleSpec

tested

A pattern that transforms the current block or marks when typed (e.g. `'# '` → heading, `'**x**'` → bold). The matching engine lands in M2; the type is declared now so block/mark definitions can carry their rules as data.

Signature

ts
interface InputRuleSpec

Properties

PropertyTypeDescription
matchreadonlyRegExpPattern tested against the text ending at the caret.
type?readonlystring | undefinedTarget block/mark type to apply on match.
attrs?readonlyReadonly<Record<string, import("..").AttrValue>> | undefinedAttrs to apply with the transformation.