Live data from Hacker News

Lexical – a web text editor framework that powers Facebook

playground.lexical.dev

91–100 of 107 posts

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

#91
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…

What are you on about

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

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

A textarea would not work

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

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

What are your thoughts on TipTap?

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

#94

I put Lexical through Hog Bay's Moby Dick test [0] (paste the entirety of Moby Dick, scroll to the middle, and try editing). It didn't pass. AFAIK, only ProseMirror passes, albeit with some lag. [0] https://www.hogbaysoftware.com/posts/moby-dick-workout/

We have some important changes landing soon that will make insertions O(1) rather than the current O(n) - so this will greatly improve performance.

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

#95

Hmm, just tried the playground in Firefox on Linux, it’s about as buggy as fancy things like this tend to be. • Inserting emoji with my Compose key: some (e.g. U+1F641) get turned into image-backed emoji and then duplicated unless preceded by another image-backed emoji; some (e.g. U+1F928) get ignored and left as normal text. • If I type an emoji that gets duplicated while inside a link (but not inside bold/italic),…

Thank for the detailed input. Would it be possible for you to create a GitHub issue around these (or many issues?) so that the team can track them and fix them. Thanks again!

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

#96
post #95

Hmm, just tried the playground in Firefox on Linux, it’s about as buggy as fancy things like this tend to be. • Inserting emoji with my Compose key: some (e.g. U+1F641) get turned into image-backed emoji and then duplicated unless preceded by another image-backed emoji; some (e.g. U+1F928) get ignored and left as normal text. • If I type an emoji that gets duplicated while inside a link (but not inside bold/italic),…

Thank for the detailed input. Would it be possible for you to create a GitHub issue around these (or many issues?) so that the team can track them and fix them. Thanks again!

Sorry, I’m just passing by and don’t want to interact further (I have no vested interest in the space at this time); up to you what you do with it.

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

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

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

#98
post #93
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.

What are your thoughts on TipTap?

Since it doesn’t implement editing itself I haven’t studied its source. Under the hood it’s ProseMirror so it should be okay, although I’d be uneasy about stacking abstractions too high: Your code —> TipTap React —> TipTap Extension —> ProseMirror Plugin —> ProseMirror Core —> DOM feels like there’s a lot of incidental complexity to learn all of the APIs across these layers. Right now the docs site is returning HTTP 502 to me ¯\_(ツ)_/¯.

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

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

Thanks for your work in developing this! Does Lexical have a feature to set arbitrary CSS on a particular selection range? I've been looking for a solution to do this since the WebKit's -[WebView applyStyle:] is deprecated as part of WebView Legacy. It isn't clear to me from glancing at the docs if RangeSelection.formatText() or other methods can handle anything or just a subset of styling code. Thanks!

Yes, we have something like this in @lexical/selection: https://github.com/facebook/lexical/blob/af099ffd9f464b523d6...

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

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

Very interested to know if there are any plans to support React Native? I’ve been struggling to find a good library that doesn’t require a web view.

It's under consideration, but as of now we need native support for iOS and Android first. React Native doesn't currently support contentEditable.
Post reply on HN