<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..600;1,9..144,400..600&family=Imperial+Script&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" />

Search the Qalma docs

Type at least two characters to get started.

Docs

Find & Replace

FindReplacePlugin owns search state, match decorations, navigation, and replacement. Your Angular template owns the search bar.

const editor = createQalmaEditor({
  plugins: [
    FindReplacePlugin.configure({
      caseSensitive: false,
      wholeWord: false,
      className: 'my-find-match',
      activeClassName: 'my-find-active',
    }),
  ],
});

editor.execute('setFindQuery', {
  query: 'Angular',
  wholeWord: true,
});
editor.execute('findNext');
editor.execute('replaceCurrent', 'Qalma');
editor.execute('replaceAll', { replacement: 'editor' });
editor.execute('clearFind');

Read query<FindReplaceState>('findReplace') for total, activeMatch (one-based), and the current { from, to } range. Search works across adjacent text nodes split by marks. Navigation wraps at the first and last result.

Style .qalma-find-match and .qalma-find-match-active, or configure your own single class names. Add an aria-live result count and keep inputs/buttons in your component so focus policy remains yours.