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

fix handleBeforeInput on v3 of draft plugins editor; #62

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

elbakerino
Copy link
Contributor

This fixed the setEditorState is not a function bug for my setup.

In the plugins editor the handleBeforeInput changed, eventTimeStamp was added.
https://github.com/draft-js-plugins/draft-js-plugins/blob/93f9d32b703cf8e65e3576a5803388b362d19ba5/draft-js-plugins-editor/src/index.d.ts#L65

Updated dependencies and especially the draft-js-plugins-editor and added the property eventTimeStamp in the index.js

Not really sure if this was everything.

Tested in an app with multiple editors on the same page and different draft js plugins.

Versions of the app tested:

  • react 16.10
  • draft-js 0.11.2
  • draft-js-plugins-editor 3.0.0

That's why the dependency version range is tightened, as e.g. draft-js-plugins-editor 3 needs React 16.3 as minimum.

As temporary fix I published the changes as draft-js-md-keyboard-plugin

Would be great if someone checks it also and I hope this help!

@jhackett1
Copy link

thanks! your fix worked for me too. so simple!

@ngs any chance of merging this?

@jakobo
Copy link

jakobo commented Feb 21, 2020

This fixes #61

@tmathew0309
Copy link

This worked for me. @ngs can we get this merged soon?

@alibosworth
Copy link

Fix works for me too. @ngs please merge otherwise we need to fork to our own version

alibosworth added a commit to flowapp/draft-js-markdown-shortcuts-plugin that referenced this pull request Mar 27, 2020
Found this here ngs#62

It is required to use with new draft
@ngs ngs changed the base branch from master to develop June 2, 2020 03:26
@ngs ngs merged commit 204acd1 into ngs:develop Jun 2, 2020
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

Successfully merging this pull request may close these issues.

None yet

6 participants