Extensions
Keywords
Highlight a configured list of words as styled keyword nodes
Wraps occurrences of a configured word list in keyword nodes. Useful for syntax-like highlighting (TODO, FIXME, brand names, glossary terms).
Install
pnpm add @typix-editor/extension-keywordsLive demo
Config
| Option | Type | Default | Description |
|---|---|---|---|
keywords | string[] | required | List of words to highlight as keyword nodes. |
Match all keywords helper
import { KEYWORDS_REGEX } from "@typix-editor/extension-keywords";The compiled regex used internally — handy if you need to mirror the matching logic elsewhere in your app.
Node helpers
import {
$createKeywordNode,
$isKeywordNode,
KeywordNode,
} from "@typix-editor/extension-keywords";