Question: Does it really work without react?
See original GitHub issueHello there,
thanks for this nice editor-library. I came across some issues during implementing lexical with plain vanilla js app. The code can be found here: https://codesandbox.io/s/lexical-vanilla-js-i05utt
As you can see, the editor does not take the pressed key as an input. If you add:
editor.update(() => {
const root = $getRoot();
const paraNode = $createParagraphNode();
const textNode = $createTextNode('Hello World');
paraNode.append(textNode);
root.append(paraNode);
there will be text inside the editor, but its neither possible to use the backspace (no chars will be deleted) nor to use enter (to add a new paragraph).
Did i something wrong? Or is there a bug with using lexical in a vanilla js-environment?
Best regards
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Yes, React is taking over front-end development. The question ...
React does not assume anything about the other parts in any full solution. It focuses on just one thing, and on doing that...
Read more >Material-UI without React / just with vanilla HTML, CSS & JS ...
No, you cannot use Material-UI without React. Material-UI is a library of React components. There is not a way to use the CSS...
Read more >React Without ES6
React provides lifecycle methods that let you know when a component is about to be created or destroyed.
Read more >Thinking in React
React is, in our opinion, the premier way to build big, fast Web apps with JavaScript. It has scaled very well for us...
Read more >Introducing Hooks - React
Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class. ... This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@trueadm Thanks for your ultra quick response 😃
Could be maybe helpful for lexical newcomers who come across the same issue to have an example with vanilla js. If you don’t mind i would extend my sandbox and create a pull request which a link inside the readme to have an example in plain javascript?
This is simple example https://github.com/lyove/lexical-vanilla