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

Uncaught RangeError: Duplicate use of selection JSON ID cell #14

Open
tech-milky opened this issue May 17, 2022 · 1 comment
Open

Uncaught RangeError: Duplicate use of selection JSON ID cell #14

tech-milky opened this issue May 17, 2022 · 1 comment

Comments

@tech-milky
Copy link

I follow this example:

import ReactDom from 'react-dom';
import React from "react";
import {SmartBlock} from "smartblock";

let html = document.currentScript.getAttribute('data-html');
let element = document.currentScript.getAttribute('data-element');
const extensions = [
    new Heading1()
];

var app = document.getElementById("hello");

ReactDom.render(
    <SmartBlock
        extensions={extensions}
        html={`<ul>
      <li>list item 1</li>
      <li>list item 2</li>
    </ul>`}
        onChange={({ json, html }) => { console.log(json, html);}}
    />, app);

and I have this error

Uncaught RangeError: Duplicate use of selection JSON ID cell
    at Function.jsonID (editor.js:57012:34)
    at Object../node_modules/smartblock/node_modules/prosemirror-tables/dist/index.js (editor.js:112042:28)
    at __webpack_require__ (editor.js:145477:42)
    at Module../node_modules/smartblock/lib/extensions/table/index.js (editor.js:110215:76)
    at __webpack_require__ (editor.js:145477:42)
    at Module../node_modules/smartblock/lib/extensions/index.js (editor.js:108961:64)
    at __webpack_require__ (editor.js:145477:42)
    at Module../node_modules/smartblock/lib/components/smart-block.js (editor.js:106010:70)
    at __webpack_require__ (editor.js:145477:42)
    at Module../node_modules/smartblock/lib/index.js (editor.js:110802:81)

Package.json
"smartblock": "^1.0.8",

@uidev1116
Copy link
Contributor

@tech-milky

Thank you for reporting this issue. We have identified and fixed the problem. The code should now work correctly with the latest version of the smartblock package. Please update your package.json to use version 1.3.11 and try again. If you encounter any further issues, please let us know.

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

No branches or pull requests

2 participants