Open george-of-314 opened 1 year ago
Simple code to show HTML code of text inside Draft Editor
const [showCode, setShowCode] = useState(false); const SwitchHTML = () => ( <div style={{ textAlign: "right" }}> <a href="#switchHTML" onClick={(e) => toggleShowCode(e)}>Code {showCode ? "ausblenden" : "anzeigen"}</a> </div>); const toggleShowCode = (e) => { e.preventDefault() setShowCode(!showCode) }
When cursor is inside editor and I press "Code anzeigen" - action fires only after second click. When cursor is outside of Editor - all is fine But most strange is that all other links and switches are working fine...
Any ideas?
https://youtu.be/49j1LyP4QxE
Simple code to show HTML code of text inside Draft Editor
When cursor is inside editor and I press "Code anzeigen" - action fires only after second click. When cursor is outside of Editor - all is fine But most strange is that all other links and switches are working fine...
Any ideas?
https://youtu.be/49j1LyP4QxE