Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
trueadm
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
trueadm
4y ago
Sure thing. I actually wrote up a really detailed response to this on ProseMirror's discussion board: https://discuss.prosemirror.net/t/differences-between-prosem... Ultimately though, there are many similarities
32.
▲
by
trueadm
4y ago
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
33.
▲
Lexical – a web text editor framework that powers Facebook
(playground.lexical.dev)
283 points
by
trueadm
4y ago
|
105 comments
34.
▲
by
trueadm
4y ago
I had to take a second pass on it. I thought I was maybe onto something when I wrote that originally. Is it a V8 perf hack? Nope, just my brain not functioning correctly at the time :P
35.
▲
by
trueadm
4y ago
Adam? You mean Dominic/trueadm? We have some ideas for supporting RN once we have iOS/Android versions of Lexical.
36.
▲
by
trueadm
4y ago
Yeah, I'd roll with Node/Deno and use Lexical that way. :)
37.
▲
by
trueadm
4y ago
Don't you need `slate-react`, `slate-history` and other plugins too?
38.
▲
by
trueadm
4y ago
Lexical's model might become a bottleneck at some point, but we haven't done any extensive testing on huge models (I mean really huge, we know large models are fine). There are so many things folks want to do with text editors – f
39.
▲
by
trueadm
4y ago
We'll look into fixing this problem. Sorry for the confusion!
40.
▲
by
trueadm
4y ago
The EditorState is fully JSON serializable. You can use JSON.stringify in the browser, or an alternative on other platforms. You can then pass the stringified values around and parse them using `editor.parseEditorState()`
41.
▲
by
trueadm
4y ago
I don't think ProseMirror has taken a bad approach. I think we've just taken a different approach when it comes to the design of things. In Lexical, you rarely concern yourself with the DOM – and typically you deal with Lexical&#x
42.
▲
by
trueadm
4y ago
Good to see you too! I moved from the React core team about 2 years ago, and since then, I was fortunate to be able to build a team around Lexical!
43.
▲
by
trueadm
4y ago
Yep, I’m the same person still :p
44.
▲
by
trueadm
4y ago
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
45.
▲
by
trueadm
4y ago
By the examples, do you mean the fact we are using Codesandbox embed to show code examples of the editor itself? Lexical definitely has the foundational requirements capable of building a CodeMirror or Monaco editor, but that wasn't ou
46.
▲
by
trueadm
4y ago
Yep, we have full support with Yjs. https://github.com/facebook/lexical/tree/main/packages/lexic...
47.
▲
by
trueadm
4y ago
I completely understand. I can't guarantee anything, no on can in software. However, we do have a dedicated full-time team working on Lexical. DraftJS never had that, it only had a few part-time maintainers at Facebook.
48.
▲
by
trueadm
4y ago
It is in production at Facebook. We're slowly rolling out to more surfaces, replacing our existing DraftJS implementations as we go. We've noticed a big improvement internally from doing so, both in terms of less bugs but also per
49.
▲
by
trueadm
4y ago
ProseMirror wasn't a good fit for us because it's integration (especially with React 18+) isn't quite there. Furthermore, we're also looking into building native ports of Lexical, and given's Lexical's API isn&
50.
▲
by
trueadm
4y ago
Yeah, you could easily do that. We do the exactly that right now for Workplace. You could also roll with a `<textarea>` but that can be limiting if you want additional functionality further on down the line – such as mentions or inlin
51.
▲
by
trueadm
4y ago
It's used on Facebook, Messenger, Workplace, Instagram and soon will be rolled out for WhatsApp web.
52.
▲
by
trueadm
4y ago
I've responded to the same question https://news.ycombinator.com/item?id=31022152 . :)
53.
▲
by
trueadm
4y ago
Internally, we've been replacing Draft.js with Lexical. To be clear though, they're different projects with little API compatibility. We hope to add some docs explaining how we've approached our upgrade path in the future. To
54.
▲
by
trueadm
4y ago
Yeah, we're still working on our docs. Watch this space! :)
55.
▲
by
trueadm
4y ago
You could definitely build a code editor with Lexical. There's already a lot of interest in the community to add plugins around Lexical to match that of ProseMirror. It might not be there right now, but the foundations that make it pos
56.
▲
by
trueadm
4y ago
You don't need React. Lexical has no dependencies, so you can build bindings for your framework/library of choice. There are folks working on a SolidJS implementation right now. You could also do it with VanillaJS if you wanted to
57.
▲
by
trueadm
4y ago
They are intentionally similar, ProseMirror has some great ideas. We tried to tackle those ideas from an extensible angle where nodes themselves, which form part of a tree, are the core to everything in Lexical. There are no "marks&quo
58.
▲
by
trueadm
4y ago
It does. If you get the chance to try Lexical out, please do let us know of any issues you face when using Android, as I'm sure there are some we've yet to find yet.
59.
▲
by
trueadm
4y ago
Draft.js was built a long time ago when many of the concerns around making contentEditable work stemmed from patching browser-support. Today, it's nowhere near as bad. We can leverage modern events and we can try and tackle things from
60.
▲
by
trueadm
4y ago
We don't have any examples right now, but you could easily do this with a DecoratorNode. See how we create the EquationNode on our Lexical Playground repository. We also have our own code block too, which, with a bit of TLC could be so
More ›