Facebook open sources Lexical, an extensible text editor library
61–70 of 141 posts
Re: Facebook open sources Lexical, an extensible text editor library
#62Cool but I’ve found two bugs in the first few seconds of using it. Not ready for production IMO.
Re: Facebook open sources Lexical, an extensible text editor library
#63Cool but I’ve found two bugs in the first few seconds of using it. Not ready for production IMO.
https://github.com/facebook/lexical/issues/new?assignees=&la...
Re: Facebook open sources Lexical, an extensible text editor library
#64Hi Dominic, thanks for open sourcing the library. I have quite a few questions though: 1. Marijn has built an awesome open source richtext library ( https://prosemirror.net/ ) which has a huge plugin ecosystem and bindings with a bunch of front-end frameworks (including React). Is there any specific motivation behind building one from scratch? 2. How is this different from Facebook's own DraftJS lib? 3. What's the st…
Re: Facebook open sources Lexical, an extensible text editor library
#65Earlier quoted context omitted.
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 expand on this further, I'll pull this from another HN thread: Draft.js was built a long time ago when many of the concerns around making contentEditable work stemmed from patching browser-suppo…
I think it would be helpful to explicitly say that draft.js is deprecated here [1]. I was recently caught out by this, and started using draft.js without realising it’s been abandoned. 1. https://draftjs.org/
https://github.com/facebook/draft-js
Point taken about updating the site, though.
Re: Facebook open sources Lexical, an extensible text editor library
#66Earlier quoted context omitted.
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 our initial target with this library. That doesn't mean that we don't expect the community to push it that way in the future, we fully expect that. Let's see how things go, competition is…
My mistake... I thought the code editor was implemented using Lexical. The real demo is here: https://lexical-playground.vercel.app/ (Edit) I think you should put this demo on the front page and the code sample on some other page. I was expecting to see the demo on the home page.
yeah lol, i think everyone in this thread had the same experience
Re: Facebook open sources Lexical, an extensible text editor library
#67Now if I only knew what was meant by attach, content editable, and element. Then I suspect I don't know what is meant even by comprised or editor.
To me: A bit is a 0 or a 1. A byte is 8 bits in a sequence where by sequence we mean the order of the bits matters. Or in terms of pure math, a byte is not a set but is an 8-tuple.
A file is a sequence of bytes in a file system on a computer. A leading example of such a file system is Microsoft's NTFS -- New Technology File System.
Each byte can be regarded as a character in the Roman alphabet plus the digits 0-9, some punctuation symbols, and a little more, all as in the common, old definition called ASCII (American Standard Code for Information Interchange).
An editor is a computer program that reads a file, displays the bytes as in the ASCII definition, permits a user of the program to modify the bytes and then writes the sequence of bytes to a file again on the file system.
Uh, what is WCAG?
In what sense "minimal"?
For "rich-text features and markdown", by rich-text is meant Unicode, some technique in Microsoft's program Word, D. Knuth's word processing program TeX? For "markdown", I looked that up at Google and found
"Markdown is a text-to-HTML conversion tool for web writers."
So, in particular Markdown is a computer program. Okay.
Again, from Google, apparently React is a JavaScript library for building user interfaces.
I've been a heavy user of text editors for years. The editor Kedit is my most important tool. Macros? Sure, I've written about 300 of them.
Text? I've got good experience with Knuth's TeX: Wrote about 50 macros for TeX and have published applied math I wrote with TeX.
Uh, for a new Web site, I have written code, 100,000 lines of text in Microsoft's Visual Basic .NET using ASP.NET and ADO.NET and some for their "platform invoke". The 100,000 lines of code runs, apparently as intended. To type in the code, I just used Kedit -- worked great.
But I did nothing with React or JavaScript.
After reading the OP and more, I still have no idea what Lexical is, what it is for, what it can do as an editor, why anyone would use it, etc.
I write this post because in my work far and away the biggest obstacle is getting meaningful information from the available documentation. E.g., I spent all of yesterday on the question, what is a video adapter card? Such cards go for $15, $65, or $500, but what the cards are and the differences are not made at all clear. Before that, I wasted several days working with Microsoft's programs COMP and FC, intended to compare files. I gave up and wrote my own program to compare files. Before that I wasted 1+ weeks mud wrestling trying to get an HP laptop and Windows 10 to write some DVDs -- after wasting several supplies of DVDs, DVD-R, DVD+R, DVD+RW, I concluded that somehow HP or Microsoft just doesn't want people writing DVDs -- millions of bytes of documentation and several YouTube videos didn't contradict that conclusion.
Another problem, Microsoft's Outlook 2003, that I used successfully for years, now won't read my email from my ISP (Internet Service Provider). I wrestled with that problem for some days and finally decided to use Thunderbird. Reading email should not be difficult -- for some years I used my own email software I'd written just with the scripting language Rexx and its way to use TCP/IP.
I mention these problems because they are, in the world of computing, simple, trivial, old, etc., should be taken for granted but all of them remain.
The real, original, core creative work, with some pure and applied math, for my Web site has been fast, fun, and easy, but the real problem that has nearly ruined my effort is bad documentation of the tools I must use.
Now along comes Lexical where I can get no idea at all what the heck they are talking about -- to me that is an example of a big problem in computing.
Re: Facebook open sources Lexical, an extensible text editor library
#68Hi Dominic, thanks for open sourcing the library. I have quite a few questions though: 1. Marijn has built an awesome open source richtext library ( https://prosemirror.net/ ) which has a huge plugin ecosystem and bindings with a bunch of front-end frameworks (including React). Is there any specific motivation behind building one from scratch? 2. How is this different from Facebook's own DraftJS lib? 3. What's the st…
3. Lexical is not strictly tied to collaboration but its plugin system was built to be extensible enough to cater all developers needs. Collaboration is just another plugin (@lexical/yjs) and does listen and perform the conversion every time there's changes in the EditorState.
This model of independent plugins that can be plugged-and-played without further ado also simplifies devX as collaboration can be added later when the application is mature without the need to rethink any of the plugins that were originally created for non-collab plain/rich text.
4. Lexical Web is just the first of many. We want to port the API and fundamentals to various others platforms, including iOS for which we are already performing the initial set of testing. Cross-platform means the API, including Node's will look alike and EditorState and node's properties will be compatible even if behind the scenes the reconciler is constrained by the toolkit available on each platform (and doesn't render or behave 100% like Web's).
Re: Facebook open sources Lexical, an extensible text editor library
#69> Lexical is comprised of editor instances that each attach to a single content editable element. Now if I only knew what was meant by attach , content editable , and element . Then I suspect I don't know what is meant even by comprised or editor . To me: A bit is a 0 or a 1. A byte is 8 bits in a sequence where by sequence we mean the order of the bits matters. Or in terms of pure math, a byte is not a set but is an…
The computing domain is perhaps peculiar compared to other domains too, in that there is no "basic concepts" that one needs to master to understand everything else (like mathematics for example). One can live a good life as a web developer without knowing the innards of a database, and vice versa. It is not a big problem in computing, it's just the nature of the field.
Re: Facebook open sources Lexical, an extensible text editor library
#70How hard it’ll be to build a notion like UX using lexical ? Have been using editorjs for same
We already provide most common plugins out of the box (inc. lists and tables) but if you're planning to build a feature rich interface with many custom plugins it may take somewhat longer.