Live data from Hacker News

Lexical – a web text editor framework that powers Facebook

playground.lexical.dev

61–70 of 107 posts

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

#61
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

Does wordperfect 5.1 say anything to you :) ? You just remade it and I love you for that.

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

#62
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

A really nice project.

A recruiter called me from your company recently, and I kind of cringed hearing him talk about the meta verse.

I realize now they probably would be much more effective with engineers if they skipped that part and just focused on all the cool work that’s being done.

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

#63
post #60

Earlier quoted context omitted.

What does “web text editor framework that powers Facebook” actually mean? I don’t use Facebook, but AFAIK, there are no “blog features” in the platform, are there? Other than a WYSIWYG editor [1], what other use cases do you intend this project for? [1] https://en.wikipedia.org/wiki/WYSIWYG

see https://news.ycombinator.com/item?id=14838232 > The competition has no choice but to spend all their time porting and keeping up, time that they can’t spend writing new features. Look closely at the software landscape. The companies that do well are the ones who rely least on big companies and don’t have to spend all their cycles catching up and reimplementing and fixing bugs that crop up [only on Windows XP.] so…

See also “nerd sniping”: https://xkcd.com/356/

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

#64
post #60

Earlier quoted context omitted.

What does “web text editor framework that powers Facebook” actually mean? I don’t use Facebook, but AFAIK, there are no “blog features” in the platform, are there? Other than a WYSIWYG editor [1], what other use cases do you intend this project for? [1] https://en.wikipedia.org/wiki/WYSIWYG

see https://news.ycombinator.com/item?id=14838232 > The competition has no choice but to spend all their time porting and keeping up, time that they can’t spend writing new features. Look closely at the software landscape. The companies that do well are the ones who rely least on big companies and don’t have to spend all their cycles catching up and reimplementing and fixing bugs that crop up [only on Windows XP.] so…

Joel Spolsky wasn't particularly right in 2002, and he hasn't gotten more relevant with age.

As for this particular article, what is your criticism? That FB makes a rich text editor available as open source (under the MIT license)? How on earth does that mean "companies have to spend all their cycles catching up and reimplementing and fixing bugs"?

You can always roll your own, or use one of the many others available if this one doesn't taste right? (Also: Who on earth gains a competitive advantage from having a text editor, in 2022?)

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

#65

We're trying to choose between Lexical and Slate at work. Do you have any code examples that would be similar to this? Example: https://www.slatejs.org/examples/richtext Code: https://github.com/ianstormtaylor/slate/blob/main/site/examp...

I've given Slate and Draft.JS a go in the past and they both aren't great from a developer experience perspective and are generally buggy. Slate also had issues where it would throw a type error and break the page, Draft.JS struggles with cursor placement issues.

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

#66
post #64
post #60

Earlier quoted context omitted.

see https://news.ycombinator.com/item?id=14838232 > The competition has no choice but to spend all their time porting and keeping up, time that they can’t spend writing new features. Look closely at the software landscape. The companies that do well are the ones who rely least on big companies and don’t have to spend all their cycles catching up and reimplementing and fixing bugs that crop up [only on Windows XP.] so…

Joel Spolsky wasn't particularly right in 2002, and he hasn't gotten more relevant with age. As for this particular article, what is your criticism? That FB makes a rich text editor available as open source (under the MIT license)? How on earth does that mean "companies have to spend all their cycles catching up and reimplementing and fixing bugs"? You can always roll your own, or use one of the many others available…

> How on earth does that mean "companies have to spend all their cycles catching up and reimplementing and fixing bugs"?

The fact that there's draft.js, and a myriad of other existing editor libraries out there already, all of which could've been contributed to instead.

If a startup chose to base their technology on a library that is released by a major corporation, they face the risk of getting "rug pulled" (or the library updates incompatibly and now you're locked in either to using the old version, or painful upgrade to the new version).

Of course, they don't have to choose to use such a library, but if they don't then there's a community of people who then questions them on why they are spending time replicating a technology.

The point is, if a startup chose to use this library, they face the risk of having to expend time keeping up in pace (and associated cost of doing so) with facebook.

This equivalent scenario exists in someone writing against libraries released by microsoft on windows, and that's what spolsky is complaining about.

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

#67
post #49

Earlier quoted context omitted.

Thanks, I see. I'm using Slate for TigYog.app, and fairly happy with it, but neither CJK nor Android are important there. Btw I'd love to see any public posts about the architecture of the Notion editor!

Slate has a nice, approachable API from a React perspective. I think depending on your project it could be an okay trade off. I co-wrote a post about our editor internals after finishing up the recent re-work but we decided not to publish it to conserve our Competitive Advantage.

Dang. Makes sense, since it's such a defining characteristic. But dang, I would love to read that :D

Guess I'll just have to get a job at Notion some day and dig it up...

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

#68

I realize this isn't probably your product surface but do you have any idea why FB messenger still has issues with double texting using the text box? Also, how do you guys design to reduce latency in Lexical? Esp considering the fluidity of modern chat clients ex. Telegram which are much more performant.

You mean typing latency, right? The most important thing we do there is handling reconciliation ourselves rather than delegating to a framework (e.g., React). If you have full control over the reconciliation process, it's just a matter of continuous incremental optimization.

Could you explain this comment a little more?

What does "handling reconciliation rather than delegating" mean here?

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

#69
post #59
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

Does it have vim keybindings? And does it need react or is there a standalone way to embed it?

People have contributed bindings for Vue, Svelte, and Solid so far. I’m not sure what state they are in though. React is definitely the most mature binding.

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

#70

It is interesting (and cool) that this uses Typescript over Flow. It seems like Flow is still being developed too. Just looking at the top level package.json [1], I wonder at which point you abstract all those copy/pasted targets into a script that takes an argument. [1] https://github.com/facebook/lexical/blob/main/package.json#L...

When they first launched a few months ago it was all Flow, and then it was quickly converted to Typescript. I think they still ship the Flow types too.
Post reply on HN