Live data from Hacker News

Lexical – a web text editor framework that powers Facebook

playground.lexical.dev

101–107 of 107 posts

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

#101
post #68

Earlier quoted context omitted.

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?

Sure - DraftJS, for instance, delegates DOM reconciliation to React. Lexical does not. The core library is framework-agnostic, with it's own diffing and reconciliation processes.

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

#102
post #97
post #77

There do not seem to be text direction controls. I see it does basic heuristic text direction guessing, apparently based on first strong LTR or RTL character in a paragraph, but this is often not adequate for determining text direction correctly, hence the need for explicit control, at least at the paragraph level, ideally also at subparagraph level. Any plans to add such controls? There are about a billion users of…

You can set the direction of the ElementNode explicitly to define LTR/RTL semantics. By default it’s automatically detected.

Thank you. I see. I guess I'm talking about the playground whereas I guess you're talking about Lexical itself and its API. It would be really nice to have a demo of this working with the API in the playground.

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

#103
I tried most of the existing editors and worked with some of them a lot. Lexical have a nice declarative API; so far, enjoying using it. Even without proper docs, I quickly got an idea of what it is and how to develop. React ecosystem lacked a proper text editor and lexical is really promising.

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

#104
post #72

This looks great! Curious whether the team is looking at improving the support of having images in tables cell? I played with the playground and it seems to work, but there seems to be some (relatively minor) glitches/bugs (e.g. difficult to place an image in a cell, moving images across cells seems difficult, and cannot Ctrl-x an image and Ctrl-v to paste it).

We definitely have plans to improve Tables drastically over time, but I'm not sure when we'll get to those particular issues. If you care to make an Issue for this on GitHub, that would be much appreciated :)

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

#105
post #90
post #81

Earlier quoted context omitted.

is there a list/writeup of these problems somewhere? is this only applicable if you want to do editable rich text? could you perhaps try to explain the high level problem? what's different on iOS? thanks!

Writing a ContentEditable editor means learning the internal state machines and undocumented behaviors of every browser you support. There are many articles online about ContentEditable / rich text editing. This one is a classic https://medium.engineering/why-contenteditable-is-terrible-1... The major issue for both Android and CJK input is dealing with “composition” of characters by an “input method editor”. https:/…

wow. at this point to me it seems the next step is to implement the keyboard in JS too, and/or organize a protest in Mountain View.

also, opting to use a big old plaintext textbox and something markdown-ish avoids these problems, right? (I'm trying to figure out why typing becomes slow on discord/slack in Firefox routinely. though I guess those are not real textboxes, but also contenteditable things :/)

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

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

Why not add a spell checker & word counter?

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

#107
post #82
post #75

Earlier quoted context omitted.

This is no different than choosing a volunteer-based OSS solution or rolling your own. If you need things that are specific to your use case, you'll always need to shoulder the cost. That is no different from something you do yourself, either. What you call "rug pull" is merely the point where the solution you got for free suddenly costs as much to maintain as your inhouse solution.

> This is no different than choosing a volunteer-based OSS solution the big difference with a true volunteer based OSS solution, like for example, linux, is that there's many individuals involved. The decision making in that project then won't turn into what spolsky said. I wouldn't imagine the linux maintainers "rug pull", but i can imagine facebook doing a rug pull.

Oh please. Any project that isn't under your direct control will at some point "rug pull", because they will make a decision that's different from what you'd have preferred.

Major controversies that come to mind around Linux pretty much immediately are systemd, Wayland, the sound server wars. I also vaguely recall major back and forth around memory management. That's normal and expected. That's why you make "buy vs build" decisions, and any third party package is susceptible to that.

And "many individuals involved" means absolutely nothing - do you honestly believe that somehow this editor is a lone work of genius? Or that companies somehow have a coherent vision for every single detail? Have you ever worked in a large company?

Post reply on HN