prosekit/extensions/mark-rule
Interfaces
Section titled “Interfaces”MarkRuleOptions
Section titled “MarkRuleOptions”The options for defineMarkRule.
Properties
Section titled “Properties”-
The regular expression to match against. It must has a
gflag to match all instances of the mark.
-
attrs?:Attrs| (match:RegExpMatchArray) =>Attrs|null|null -
Attributes to set on the mark. If a function is provided, it will be called with the matched result from the regular expression.
Default
Section titled “Default”null
Functions
Section titled “Functions”defineMarkRule()
Section titled “defineMarkRule()”-
function defineMarkRule(options:MarkRuleOptions):PlainExtension -
A mark rule is something that can automatically apply marks to text if it matches a certain pattern, and remove them if it doesn't match anymore.