Typix LogoTypix
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-keywords

Live demo

Config

OptionTypeDefaultDescription
keywordsstring[]requiredList 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";

On this page