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

Usage with TipTap: Error: inner view should not exist! #43

Open
coderinblack08 opened this issue Jul 22, 2022 · 2 comments
Open

Usage with TipTap: Error: inner view should not exist! #43

coderinblack08 opened this issue Jul 22, 2022 · 2 comments

Comments

@coderinblack08
Copy link

I've been trying to integrate TipTap with prosemirror-math. However, whenever I enter "editing mode" via mouse-click or arrow-keys, Error: inner view should not exist! popups. Here's the custom node I'm using (derived from #27):

/* eslint-disable */
import { Node, mergeAttributes } from "@tiptap/core";

import { inputRules } from "prosemirror-inputrules";

import {
  makeInlineMathInputRule,
  REGEX_INLINE_MATH_DOLLARS,
  mathSelectPlugin,
  mathPlugin,
} from "@benrbray/prosemirror-math";

export const Math = Node.create({
  name: "math_inline",
  group: "inline math",
  content: "text*", // important!
  inline: true, // important!
  atom: true, // important!
  code: true,

  parseHTML() {
    return [
      {
        tag: "math-inline", // important!
      },
    ];
  },

  renderHTML({ HTMLAttributes }) {
    return [
      "math-inline",
      mergeAttributes({ class: "math-node" }, HTMLAttributes),
      0,
    ];
  },

  addProseMirrorPlugins() {
    const inputRulePlugin = inputRules({
      rules: [makeInlineMathInputRule(REGEX_INLINE_MATH_DOLLARS, this.type)],
    });

    return [mathPlugin, inputRulePlugin, mathSelectPlugin];
  },
});

Expected Behavior

The extension to work :)

{
  "@tiptap/react": "^2.0.0-beta.114", 
  "@benrbray/prosemirror-math": "^0.2.2",
}

Current Behavior

Screen.Recording.2022-07-22.at.2.36.03.PM.mov
coderinblack08 added a commit to coderinblack08/presage that referenced this issue Jul 22, 2022
@lilingxi01
Copy link

I have encountered the same issue with the same version (for both tiptap and prosemirror-math). I will leave a comment here if I could find a solution.

@jibin2706
Copy link

@coderinblack08 @lilingxi01 did you folks find any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants