News for hackers. Stuff that matters.
Re:Facebook open sources Lexical, an extensible text editor ... by slappy7 on Wednesday April 13, 2022 @05:30PM (#31020549)
Does it work on Android?
Re:Facebook open sources Lexical, an extensible text editor ... by trueadm on Wednesday April 13, 2022 @05:50PM (#31020734)
It does. If you get the chance to try Lexical out, please do let us know of any issues you face when using Android, as I'm sure there are some we've yet to find yet.
Re:Facebook open sources Lexical, an extensible text editor ... by hiimshort on Wednesday April 13, 2022 @10:07PM (#31022664)
One quirk for you: using my samsung keyboard with swipe typing, spaces aren't added between words. Not sure at all what causes it. The only other place I have seen this happen is url input in the browser (which I believe is intentional).
Re:Facebook open sources Lexical, an extensible text editor ... by trueadm on Wednesday April 13, 2022 @10:13PM (#31022706)
Awesome! Thank you for this. Would you be able to upload a video or maybe add more context in a Github issue? It's really difficult getting Android right.

The combination between browser + keyboard + OS version + keyboard language, it just makes it so much harder than it should be for Android. So any additional context you can provide will be a MASSIVE help. :)

Re:Facebook open sources Lexical, an extensible text editor ... by hiimshort on Wednesday April 13, 2022 @10:31PM (#31022837)
Added an issue here: https://github.com/facebook/lexical/issues/1699

And, as a side note, great work on this project. I had previously built a wysiwyg system from Slate and a custom plugin system; Lexical seems like a solid progression and has some interesting ideas like using React components the way it does to facilitate editor plugins. May have to try creating a Preact wrapper so I can use it in my projects.

Re:Facebook open sources Lexical, an extensible text editor ... by netghost on Thursday April 14, 2022 @12:52AM (#31023531)
What's your approach to Android support? Are you relying on mutation events, `beforeinput`, something else?

I built a really solid android adapter (after spilling gallons of tears) for our Draft.JS fork, and might have a few tips if it's helpful.

Re:Facebook open sources Lexical, an extensible text editor ... by zurfyx on Thursday April 14, 2022 @02:19AM (#31023914)
We listen to a few typing related events and do some computation from here: keydown, input, beforeinput. Android, contrary to any other device, mostly relies on composition so Lexical makes sure to handle and flush these events accordingly.

If you're curious, this is where it all starts - https://github.com/facebook/lexical/blob/main/packages/lexic...