Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

DraftJS v0.11.0 breaks plugin #181

@d3jawu

Description

@d3jawu

When pairing the plugin with DraftJS v0.11.0, the console will give the error setEditorState is not a function anytime a Markdown shortcut is used.

Looks like there was an API change that may have affected this - I'm not familiar enough yet with DraftJS to know.

Using DraftJS v0.10.4 allows the plugin to work properly.

Activity

elbakerino

elbakerino commented on Nov 6, 2019

@elbakerino

Just as an information, saw this issue during debugging.

I got the base repo runnning with 0.11 and opened a PR there. Maybe the change helps in this fork also.

Arthur944

Arthur944 commented on Dec 12, 2019

@Arthur944

I have the same issue too

ghost

ghost commented on Jan 30, 2020

@ghost

I have the same issue too

thecodedrift

thecodedrift commented on Feb 5, 2020

@thecodedrift

EDIT PR available at #186

There should probably be a peerDependency on DraftJS at ^0.10.5 similar to how we specify the plugin editor versions that are supported. However, fixing this (and supporting the new parameter in handleBeforeInput) will cause us to rev our peerDependency list; that'd be a bump to major and require folks to upgrade both DraftJS and the Plugin Wapper.

If you're blocked by this, make sure you're using draft-js @ ^0.10.5 and draft-js-plugins-editor @ ^2.1.1.

I'm all for 4.x of this plugin, but it's a small change with some pretty major implications. In the meanwhile, I'll put together a PR here on this fork that includes @elbakerino's changes + updates the peerDependencies. It will push us to 4.0.0 since these changes will be backwards incompatible with draft 0.10 and the 2.x branch of the plugins editor.

@mxstbr could you weigh on on this?

linked a pull request that will close this issue on Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @thecodedrift@d3jawu@elbakerino@Arthur944

      Issue actions

        DraftJS v0.11.0 breaks plugin · Issue #181 · withspectrum/draft-js-markdown-plugin