react-tapable-editor icon indicating copy to clipboard operation
react-tapable-editor copied to clipboard

error block.getChildKeys is not a function

Open oudmane opened this issue 3 years ago • 1 comments

I tried to use this package in a project but I get this error: block.getChildKeys is not a function

I cloned this repository, and run storybook, it works, but When I used in a react project it gave Me this error. how can I use it ?

my code

import Editor from "react-tapable-editor";

export default function App() {
  return (
    <div className="App">
      <Editor />
    </div>
  );
}

you can reproduce the error here https://codesandbox.io/s/nifty-aryabhata-m19vy?file=/src/App.js

oudmane avatar Apr 21 '21 23:04 oudmane

I guess you are using create-react-app. Add this script under index.html

<script>
      window.__DRAFT_GKX = {
        'draft_tree_data_support': true,
      }
    </script>

pedrospecter avatar Jul 11 '21 09:07 pedrospecter