Skip to content

Katex

  • Katex Extension for Tiptap Editor.
  • This extension allows you to add Katex math equations to your editor.
  • Supports inline and block math equations.
  • This extension is based on katex.

Usage

tsx

import { Katex } from 'reactjs-tiptap-editor/katex'; 

import 'katex/dist/katex.min.css'; 

const extensions = [
  ...,
  // Import Extensions Here
   Katex, 
];

Configuration bubble menu

tsx
import { BubbleMenuKatex } from 'reactjs-tiptap-editor/bubble-extra'; 

const App = () => {

  return  <RichTextEditor
    bubbleMenu={{
      render({ extensionsNames, editor, disabled }, bubbleDefaultDom) {
        return <>
          {bubbleDefaultDom}

          {extensionsNames.includes('katex')  ? <BubbleMenuKatex disabled={disabled}
            editor={editor}
            key="katex"
          /> : null}
        </>
      },
    }}
  />
}

Source

SourceDocs

Contributors

Changelog

v0.0.54 on 10/23/2024
7a87f - feat: inline katex
v0.0.26 on 8/27/2024
16daf - fix: parse katex content

Made with ❤️