Live data from Hacker News

Lexical – a web text editor framework that powers Facebook

playground.lexical.dev

11–20 of 107 posts

Re: Lexical – a web text editor framework that powers Facebook

#11
post #7

I'd love to use Lexical to replace what we're using today. I've been checking in on the repository every few weeks. However, there are many features that are still pending https://github.com/facebook/lexical/projects/1 . We need several of the features that are "V1.0" and we obviously need the stability of a 1.0 SemVer release :) Is there a general timeline goal for the V1.0 release?

What features in particular are you missing? We haven't really discussed a deadline for 1.0, as we've been trying to take our time making sure each release is impactful and correct.

Re: Lexical – a web text editor framework that powers Facebook

#12
post #4
post #3

Earlier quoted context omitted.

Thanks for the offer, let me take you up on this. Could you compare Lexical and Prosemirror from an architecture perspective? What motivated your decisions in that regard?

Sure thing. I actually wrote up a really detailed response to this on ProseMirror's discussion board: https://discuss.prosemirror.net/t/differences-between-prosem... Ultimately though, there are many similarities between the two – intentionally so. We were inspired by ProseMirror and some of its APIs and approaches. I think the biggest underlying differences are in how we tackle things from a DX perspective. We tried…

Interesting you say DX is a large aspect of what you are going for. ProseMirror is awesome but the API can be somewhat complex for simple things (but at the same time incredibly powerful when you get to understand it). I absolutely love TipTap[0] which is providing a much more user friendly API on top of ProseMirror, along with a clean Plugin system.

Going to have to have a play with Lexical, excited to see Yjs support!

[0]: http://tiptap.dev

Re: Lexical – a web text editor framework that powers Facebook

#16
post #2

I'm the author of Lexical and one of the many engineers working on Lexical full-time at Meta. If you'd like to know anything, or ask any questions, please do! For those of you looking for the sourcecode for the playground, you can find it here: https://github.com/facebook/lexical/tree/main/packages/lexic... We also have a Discord channel you can check out: https://discord.gg/KmG4wQnnD9

Hey since you work at Meta can you find when code support / markdown will be added to text editing components?

It’s so frustrating posting code snippets to friends threads on FB

Re: Lexical – a web text editor framework that powers Facebook

#17
post #9
post #6

Earlier quoted context omitted.

Android is indeed a headache to support. The biggest issue is how all keyboards force composition on all keystrokes, meaning you're constantly having to read the DOM input and work out what might have been entered. We don't use extra DOM nodes, but we do listen to `beforeinput`, `input` and use DOM MutationObserver to try and detect common Android patterns. I'd search this module for references to Android: https://gi…

> event.timeStamp I tried so hard to avoid adding timeouts/timestamp logic for Android because it feels like a nondeterministic hack. In the end I gave up and did something similar. I also found beforeInput doesn’t offer much solace on Android or with CJK language, because messing around with preventDefault or the DOM during composition disturbs the user. One weird thing I never figured out is that if the user puts t…

Yeah, I really wanted to avoid them too. There doesn't seem a good way. The issue you describe with selection jumping is a well known issue with GBoard. Here's the logic for the mutation handling:

https://github.com/facebook/lexical/blob/main/packages/lexic...

Re: Lexical – a web text editor framework that powers Facebook

#18
post #2

I'm the author of Lexical and one of the many engineers working on Lexical full-time at Meta. If you'd like to know anything, or ask any questions, please do! For those of you looking for the sourcecode for the playground, you can find it here: https://github.com/facebook/lexical/tree/main/packages/lexic... We also have a Discord channel you can check out: https://discord.gg/KmG4wQnnD9

Hey since you work at Meta can you find when code support / markdown will be added to text editing components? It’s so frustrating posting code snippets to friends threads on FB

Lexical supports code support / markdown. We actually use it a lot for Workplace, which is a kind of Facebook-like website for companies. It's really down to the product surfaces what features from Lexical they choose to use.
Post reply on HN