News for hackers. Stuff that matters.
Re:Lexical – a web text editor framework that powers Facebook by pixel_tracing on Monday June 20, 2022 @03:50PM (#31814884)
Hey since you work at Meta can you find when code support / markdown will be added to text editing components?

It’s so frustrating posting code snippets to friends threads on FB

Re:Lexical – a web text editor framework that powers Facebook by trueadm on Monday June 20, 2022 @03:55PM (#31814969)
Lexical supports code support / markdown. We actually use it a lot for Workplace, which is a kind of Facebook-like website for companies. It's really down to the product surfaces what features from Lexical they choose to use.
Re:Lexical – a web text editor framework that powers Facebook by jacobsimon on Monday June 20, 2022 @04:08PM (#31815158)
Hey on my business’s website we currently use draft.js for our user discussion product and we convert the user input to markdown for storing in our db. How hard would it be to switch to Lexical and does it support rendering from markdown syntax? Do you recommend any other approaches for safe storage and rendering of rich text? Thanks!
Re:Lexical – a web text editor framework that powers Facebook by acywatson on Monday June 20, 2022 @04:13PM (#31815250)
I work at Meta on the Lexical team - yes, Lexical supports markdown and rendering from markdown syntax. Lexical isn't a drop-in replacement for Draft, but we're migrating all of our surfaces internally and it isn't particularly difficult, especially if you aren't storing in the DraftJS-specific format. As for alternatives, you can also consider storing it as JSON, which Lexical supports.
Re:Lexical – a web text editor framework that powers Facebook by trueadm on Monday June 20, 2022 @04:11PM (#31815222)
Lexical has markdown support via `@lexical/markdown`. See https://lexical.dev/docs/api/lexical-markdown.