Skip to content
Discussion options

You must be logged in to vote

Below is our KaTex plugin implementation
If think the discussion should rather be how can the community publish and share MDX-editor plugins in the best way

import { CodeBlockEditorDescriptor, useCodeBlockEditorContext, usePublisher, insertCodeBlock$, ButtonWithTooltip } from '@mdxeditor/editor'


import katex from 'katex'

import { useCellValues } from '@mdxeditor/gurx'

import { HoverEditMenuContainer} from "./EditContainers"

export const KaTeXPreview: React.FC<{ code: string }> = ({ code }) => {
    const ref = React.useRef<HTMLDivElement>(null)

    React.useEffect(() => {
        if (ref.current) {
            if (code != null && code.trim() != "") {
                const html = kat…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@muslimmuda15
Comment options

Answer selected by muslimmuda15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #846 on September 11, 2025 08:15.