Live data from Hacker News

Facebook open sources Lexical, an extensible text editor library

lexical.dev

71–80 of 141 posts

Re: Facebook open sources Lexical, an extensible text editor library

#72
post #34

Earlier quoted context omitted.

Awesome! Thank you for this. Would you be able to upload a video or maybe add more context in a Github issue? It's really difficult getting Android right. The combination between browser + keyboard + OS version + keyboard language, it just makes it so much harder than it should be for Android. So any additional context you can provide will be a MASSIVE help. :)

What's your approach to Android support? Are you relying on mutation events, `beforeinput`, something else? I built a really solid android adapter (after spilling gallons of tears) for our Draft.JS fork, and might have a few tips if it's helpful.

We listen to a few typing related events and do some computation from here: keydown, input, beforeinput. Android, contrary to any other device, mostly relies on composition so Lexical makes sure to handle and flush these events accordingly.

If you're curious, this is where it all starts - https://github.com/facebook/lexical/blob/main/packages/lexic...

Re: Facebook open sources Lexical, an extensible text editor library

#73

How hard it’ll be to build a notion like UX using lexical ? Have been using editorjs for same

I'd like to hear anyone else's experience of building a Notion like editor (or any other block based/full page editor)

Something guides never cover and I am stuck on is how to let users drop "widgets" into these RTEs. Think photos and galleries, where what is displayed in the editor is not what is present in the output (the real output could be 1+ React tags with attributes set) ; tables where the edit view is a spreadsheet & so on.

When I try to build these I get stuck between the representation in the RTE, the final output, and the "edit mode" in the RTE which may be in its own window.

Re: Facebook open sources Lexical, an extensible text editor library

#77

Where might I find docs on the output document persisted to the db? Also, reading back this data back into the editor.

No docs yet - but this code pointer for physical files (plugin) may help https://github.com/facebook/lexical/blob/main/packages/lexic...

Re: Facebook open sources Lexical, an extensible text editor library

#78

This feels half baked and confusing. More than half docs page are blank: - https://lexical.dev/docs/concepts/commands - https://lexical.dev/docs/getting-started/quick-start - https://lexical.dev/docs/concepts/extending-nodes - https://lexical.dev/docs/concepts/editor-state - https://lexical.dev/docs/api/lexical - https://lexical.dev/docs/api/lexical-selection - https://lexical.dev/docs/api/lexical-text - https://lexi…

Always trips me out how even though a HN users know about software, they judge releases as though they are not software and that they are moment in time and wont get any better.

I'm all for criticism. It is great for everyone, but a library gets open sourced and you're complaining about empty docs? Seriously? Just hold off until it's more mature or open up a PR to add some stuff to the docs.

Re: Facebook open sources Lexical, an extensible text editor library

#80
post #13

Earlier quoted context omitted.

Yeah, we're still working on our docs. Watch this space! :)

It would seem the very first thing you would do is provide an example for vanilla JS so that everyone could get started. It is impossible to use this at all for the large proportion of the world that isn't using React as we can't even see a single example. If it's so complicated to use that it takes more than a minute of vanilla JS coding to initialize it, then I don't think I'm interested, thanks all the same.

They use it internally, why would they rebuild it in vanilla before they released it? Sounds like they are working on it even though it's of no use to them.
Post reply on HN