Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple latex block #818

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
change import sort
  • Loading branch information
jkcs committed Jun 7, 2024
commit 0717c9a14124443be36863a4d480153ce293d203
4 changes: 2 additions & 2 deletions examples/05-custom-schema/05-latex-block/LaTex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import {
NodeViewWrapper,
ReactNodeViewRenderer,
} from "@tiptap/react";
import "./styles.css";
import { createStronglyTypedTiptapNode, createInternalBlockSpec } from "@blocknote/core";
import { mergeAttributes } from "@tiptap/core";
import { ChangeEvent, useEffect, useState, useRef } from "react";
import "./styles.css";

function loadKaTex(callback: () => void) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to just have this as a dependency of the package, that makes the code a lot cleaner imo

const Window = window as any;
Expand Down Expand Up @@ -156,7 +156,7 @@ function LaTexView() {
};

(ret as any).contentDOMElement = undefined;

const oldUpdated = ret.update!.bind(ret);
ret.update = (node, outerDeco, innerDeco) => {
const retAsAny = ret as any;
Expand Down
Loading