Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Re-write DraftEditorExample in the website using react hooks #2287

Closed
wants to merge 1 commit into from
Closed

Re-write DraftEditorExample in the website using react hooks #2287

wants to merge 1 commit into from

Conversation

mrkev
Copy link
Contributor

@mrkev mrkev commented Dec 18, 2019

Also took the oportunity to clean up the component- it had unused imports and _handleKeyCommand was returning a boolean instead of "handled" and "not-handled".

yarn && yarn start, used the editor.

Also took the oportunity to clean up the component- it had unused imports and `_handleKeyCommand` was returning a boolean instead of `"handled"` and `"not-handled"`.

`yarn && yarn start`, used the editor.
@claudiopro
Copy link
Contributor

Good job! What about integrating the repo with something like Zeit to deploy the PR for easier testing?

Hey @yangshun how did you do that for your Docusaurus 2 PR, did you deploy manually to now.sh?

@claudiopro claudiopro self-assigned this Dec 25, 2019
@claudiopro claudiopro added examples Issues related to examples website Issues related to Draft.js website labels Dec 25, 2019
Copy link
Contributor

@claudiopro claudiopro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a nit on the name of the focus function 😅

_toggleBlockType(blockType) {
this.onChange(RichUtils.toggleBlockType(this.state.editorState, blockType));
}
const focus = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can you rename to focusEditor? This is shadowing the window.focus() method

@yangshun
Copy link
Contributor

yangshun commented Dec 26, 2019

Hey @yangshun how did you do that for your Docusaurus 2 PR, did you deploy manually to now.sh?

@claudiopro We use Netlify previews. However, Netlify is recently tighten its free tier limits so it might not be that viable as an option. You could check out Netlify or Now.

@claudiopro
Copy link
Contributor

@mrkev I don't want to block on this, let's land as-is and fix forward

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiopro is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@claudiopro merged this pull request in 9b9376b.

mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
…ookarchive#2287)

Summary:
Also took the oportunity to clean up the component- it had unused imports and `_handleKeyCommand` was returning a boolean instead of `"handled"` and `"not-handled"`.

`yarn && yarn start`, used the editor.
Pull Request resolved: facebookarchive#2287

Differential Revision: D19598449

Pulled By: claudiopro

fbshipit-source-id: 275ef520c10f941236138211c8eb572c6df28f9d
vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
…ookarchive#2287)

Summary:
Also took the oportunity to clean up the component- it had unused imports and `_handleKeyCommand` was returning a boolean instead of `"handled"` and `"not-handled"`.

`yarn && yarn start`, used the editor.
Pull Request resolved: facebookarchive#2287

Differential Revision: D19598449

Pulled By: claudiopro

fbshipit-source-id: 275ef520c10f941236138211c8eb572c6df28f9d
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
Also took the oportunity to clean up the component- it had unused imports and `_handleKeyCommand` was returning a boolean instead of `"handled"` and `"not-handled"`.

`yarn && yarn start`, used the editor.
Pull Request resolved: facebookarchive/draft-js#2287

Differential Revision: D19598449

Pulled By: claudiopro

fbshipit-source-id: 275ef520c10f941236138211c8eb572c6df28f9d
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed examples Issues related to examples Merged website Issues related to Draft.js website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants