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

slate-react assumes PlaceholderPlugin exists #3061

Closed
marianoguerra opened this issue Oct 11, 2019 · 2 comments
Closed

slate-react assumes PlaceholderPlugin exists #3061

marianoguerra opened this issue Oct 11, 2019 · 2 comments

Comments

@marianoguerra
Copy link

Do you want to request a feature or report a bug?

bug

What's the current behavior?

slate-react 0.22.9 fails to load because it assumes PlaceholderPlugin is loaded

https://github.com/ianstormtaylor/slate/blob/master/packages/slate-react/src/plugins/react/index.js#L4

Reproduction: https://marianoguerra.github.io/bugs/slate-placeholder-plugin/index.html

Following instructions from https://github.com/ianstormtaylor/slate/blob/1aa1783c9c4f7d56a4836c3060194df9e6ac895f/docs/walkthroughs/using-the-bundled-source.md

Trying to load slate-react-placeholder fails too because in the compiled version it exports SlateReactPlaceholder and not PlaceholderPlugin: https://unpkg.com/[email protected]/dist/slate-react-placeholder.js

Fails on Chrome 77.0.3865.120 on Linux and Firefox Nightly on Linux but it's not a browser issue.

Versions:

  • slate 0.47.8
  • slate-react 0.22.9

What's the expected behavior?

The example loads and renders the editor, instead if fails with an error "TypeError: PlaceholderPlugin is not a function"

@marianoguerra
Copy link
Author

Forgot to mention, the example works if slate-react is 0.22.8 instead of 0.22.9

here's the same example that loads with 0.22.8: https://marianoguerra.github.io/bugs/slate-placeholder-plugin/works.html

@ianstormtaylor ianstormtaylor mentioned this issue Nov 6, 2019
@ianstormtaylor
Copy link
Owner

Fixed by #3093.

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 a pull request may close this issue.

2 participants