Live data from Hacker News

Lexical – a web text editor framework that powers Facebook

playground.lexical.dev

41–50 of 107 posts

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

#41

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...

Even FB engineers can learn a thing or two. ;)

Good tip.

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

#42
post #36

Earlier quoted context omitted.

Why the sarcasm?

I work at Notion and recently rebuilt much of the editor core, and I don’t think Slate is a good choice because it considers nice, simple code more important than CJK or Android support. Notion doesn’t use Slate or any other editor framework. I just study a lot of editor core code.

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!

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

#43
post #36

Earlier quoted context omitted.

Why the sarcasm?

I work at Notion and recently rebuilt much of the editor core, and I don’t think Slate is a good choice because it considers nice, simple code more important than CJK or Android support. Notion doesn’t use Slate or any other editor framework. I just study a lot of editor core code.

I don’t understand the Android argument - these are mainly meant for browsers right?

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

#44

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...

Even FB engineers can learn a thing or two. ;) Good tip.

Thanks! I guess the last 20 years of writing code were not a waste after all. Heh. =)

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

#46
post #21

Earlier quoted context omitted.

It's replacing any previous web text editor UX components that we had in the past (likely DraftJS). We're also building Lexical for iOS which is slowly rolling out across iOS devices too.

Well, I want the previous editor back. In fact, just give me a text area. The current editor breaks the selection and, in turn, the clipboard manager, it doesn't work well with Compose and dead keys, and it sometimes ties itself into a knot, and the text can't be edited anymore.

When pasting links stopped working for me is about when I stopped using Facebook.

It's 2022 and we're reinventing every wheel, but in the browser.

GitHub has a Markdown editor with a paste handler (converting tables and such). It once had a bug. I had to disable handlers in the browser to be able to paste.

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

#47
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.

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

#48
post #43
post #36

Earlier quoted context omitted.

I work at Notion and recently rebuilt much of the editor core, and I don’t think Slate is a good choice because it considers nice, simple code more important than CJK or Android support. Notion doesn’t use Slate or any other editor framework. I just study a lot of editor core code.

I don’t understand the Android argument - these are mainly meant for browsers right?

1. Android also has a browser. It is an important platform with many users.

2. Building an editor is so complicated that most organizations want to do it only once. They build a web editor, and wrap it in a native app. The shell like file browser, sharing screens, etc are “native” but the editor surface is a webview. This is how Quip, Dropbox Paper, Google Docs, Notion, etc work. Even iOS worked this way initially for all editable styled text (per https://twitter.com/kocienda/status/1400484473540513792?s=21...)

3. If you are going to bet the core competency of your business on a framework, it’s important to understand the motivations and limitations of said framework.

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

#49
post #36

Earlier quoted context omitted.

I work at Notion and recently rebuilt much of the editor core, and I don’t think Slate is a good choice because it considers nice, simple code more important than CJK or Android support. Notion doesn’t use Slate or any other editor framework. I just study a lot of editor core code.

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.

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

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

No post body was provided.
Post reply on HN