219 questions
0 votes
0 answers
219 views
How to export a Lexical editor with visual A4-style page breaks to PDF in Next.js using html2canvas and jsPDF?
I'm building a document editor using Lexical (React) and want to replicate Word-style visual pagination where content is split into A4-sized .page blocks based on height. ✅ What I have so far: The ...
0 votes
0 answers
285 views
Payload CMS: parse html with image/code blocks into lexical editor
In Payload CMS, is it possible to migrate html, containing images and code blocks, into lexical editor? I added a custom ImageNode into the headless editor's nodes: const headlessEditor = ...
0 votes
0 answers
52 views
Lexical editor - preloaded content editing error
I am developing an email template creator and editor app. I am using lexical for the text editor engine. Now I implemented to load the content from the database and the loading works fine but if I ...
0 votes
0 answers
113 views
Mentions Text area / Rich text area
I'm working on building a mentions component to use across my application. Here's the core functionality I need: Trigger Key: For example, {{, /, or @. Backspace Handling: Mentions should be properly ...
1 vote
1 answer
354 views
How to give a custom class name to the Lexical mark node?
I’m working with Lexical and using the $wrapSelectionInMarkNode() function to wrap the current selection in a markNode. However, I need to add a custom class name to the markNode in order to apply ...
0 votes
1 answer
59 views
Scala having issues with Lexical parsing ; or false
Hello I have a formula child(1);false and I am trying to parse it. I have tried several variations but somehow none of them are working "child" ~ "(" ~> numericLit <~ ");...
3 votes
0 answers
384 views
How to save Lexical Editor content from Yjs message in NestJS backend? [closed]
I'm working on a project using Lexical editor with Yjs for real-time collaboration, and my backend is built with NestJS. I’m trying to figure out how to get the content from the Lexical editor when ...
1 vote
0 answers
97 views
Error: Element type is invalid when extending DecoratorNode in Lexical
I'm trying to create a custom image plugin using Lexical's Rich Text editor. All my lexical packages are version 0.17.1. Here's my code: // ImageNode.jsx import { DecoratorNode } from 'lexical'; ...
1 vote
1 answer
1k views
How to set focus on a ShadCN Command component when rendered in Lexical Editor's TypeaheadMenuPlugin?
I’m working with a Command component from ShadCN within a LexicalTypeaheadMenuPlugin, and I want to set focus programmatically on the Command component as soon as it renders. I’m using useRef and ...
1 vote
0 answers
35 views
Is FloatingLinkEditorPlugin still available in @lexical/react?
I am tring to create a link button in my RCE I am making with Lexical. I am trying to import the FloatingLinkEditorPlugin, but its not included with the package. With everything I am reading it should ...
0 votes
1 answer
72 views
What forms a scope in javascript? [duplicate]
While reading about 'this' keyword and arrow function, I read: that arrow functions binds to whatever execution context the surrounding scope has. I have attached a simple code example below. When I ...
0 votes
1 answer
368 views
Not getting new line after pasting table from outside lexical rich text editor
i am using lexical rich text editor with table and i am facing issue while pasting table from outside. this issue is from library but still am not able to file way that how to achieve it for ref: new ...
0 votes
1 answer
425 views
Can I install Lexical editor in my existing React project which made in lower version (<=16)?
We built the React project in 16.4.0. When I try to install the lexical editor, I get the peer dependency error saying that the React version should be at least 17 or more than that. I tried to ...
0 votes
1 answer
2k views
Lexical, custom node and transform
I have custom TextNode but AutoLinkPlugin doesn't work with it. After a bit of debugging it looks like Transform doesn't respect nodes replacement. I managed to get it working by copying key of ...
2 votes
0 answers
1k views
Payload CMS + Lexical Editor: image block insertion into lexical editor
I have a quite complex task - I need to migrate content from another CMS into Payload 3.0. Content: posts, works, articles with rich texts, assets... packages: payloadcms: 3.0.0-beta.20 lexical: 0.14....