We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description When I typing Chinese,the placeholder dosen't immediately disappear.
Recording
Sandbox https://www.slatejs.org/examples/custom-placeholder
The text was updated successfully, but these errors were encountered:
My current solution like below:
const [isTyping, setIsTyping] = useState(false); const handleMouseDown = useCallback(event => { if (event.keyCode === 229) { setIsTyping(true); } ... }, []); const handleContentChange = (...props) => { setIsTyping(false); ... } <Slate editor={editor} value={content} onChange={handleContentChange}> <Editable ... onKeyDown={handleMouseDown} placeholder={isTyping ? '' : 'Type something'} /> </Slate>
Sorry, something went wrong.
Finnally, I use this:
<Editable placeholder={isComposing ? '' : 'Type something'} onCompositionStart={() => setIsComposing(true)} onCompositionEnd={() => setIsComposing(false)} />
No branches or pull requests
Description
When I typing Chinese,the placeholder dosen't immediately disappear.
Recording
![image](https://user-images.githubusercontent.com/11460856/120252041-f4fca800-c2b5-11eb-898b-447b2f336b01.png)
Sandbox
https://www.slatejs.org/examples/custom-placeholder
The text was updated successfully, but these errors were encountered: