Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

PASTE: Trying to Paste a Clause raises errors, does nothing #251

Closed
jeromesimeon opened this issue Dec 11, 2019 · 3 comments
Closed

PASTE: Trying to Paste a Clause raises errors, does nothing #251

jeromesimeon opened this issue Dec 11, 2019 · 3 comments

Comments

@jeromesimeon
Copy link
Member

When trying to copy/paste a clause within the UI raises some error:

react-dom.development.js:475 Uncaught TypeError: editor.props.clausePluginProps.pasteToContract is not a function
    at eval (ClausePlugin.js:181)
    at Block.withMutations (immutable.es.js:2284)
    at eval (ClausePlugin.js:174)
    at eval (immutable.es.js:3241)
    at List.withMutations (immutable.es.js:2284)
    at List.map (immutable.es.js:3239)
    at onPaste (ClausePlugin.js:172)
    at next (slate.es.js:11382)
    at onPaste (slate-react.es.js:5216)
    at next (slate.es.js:11382)
@jeromesimeon jeromesimeon added the Type: Bug 🐛 Something isn't working label Dec 11, 2019
@jolanglinais
Copy link
Member

The demo for this repo has no pasteToContract in it currently, which is likely causing the issue. The function is required in the README.

@nik72619c
Copy link
Contributor

@irmerk what can be the possible resolution for this? I needed some more context on it.

@jolanglinais
Copy link
Member

@nik72619c I suspect this will eventually be solved by our aim to have a more robust demo via Storybook, the issue tracking that is here. Still unsure how that will pan out, but I imagine one of the examples having a pasteToContract which handles replicating the clause template object in slate?

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

No branches or pull requests

3 participants