Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
74 views

I am trying to style a code block in Lexical Editor for which I cannot change the markup Basically, a code block is a flat sequence of span and br, like : <span class='inserted'>+</span>&...
Jerome WAGNER's user avatar
1 vote
0 answers
233 views

I'm running a React Vite project with a Lexical editor. I'm trying to extend the list node, to make it styleable (square, circle, roman numerals, etc.). Here is my extended node file: import { ...
Devvy McDevverson's user avatar
0 votes
0 answers
125 views

I am using ToolbarPlugin from Lexical and using the code from Lexical repo. My Sonarqube has flagged below code for test coverage and am not sure what test needs to be inlcuded: `const $updateToolbar =...
Wolvoine41's user avatar
0 votes
1 answer
63 views

I'm building a rich-text-editor component in vue using lexical and taking a lot of inspiration from the lexical-playground that is using the react plugins and trying to convert them where needed. I ...
Vatchi's user avatar
  • 13
0 votes
0 answers
380 views

I have no experience in web stack. I am trying to build a Lexical editor playground component (live at https://playground.lexical.dev/ and its source in https://github.com/facebook/lexical/tree/main/...
Vadim Kantorov's user avatar
1 vote
0 answers
206 views

I'm working on a React project that has a pair of Lexical rich text editors on the page. I'm trying to achieve the following: My cursor is somewhere within one of the editors, then I click a button ...
Devvy McDevverson's user avatar
0 votes
0 answers
138 views

I wrote a custom plugin that highlights incorrect words in the text by adding a specific class (case 1) or removes the class and merges the node with adjacent ones when the label is no longer needed (...
edemarue's user avatar
1 vote
1 answer
244 views

I am working with Lexical.js to implement a content editor. I want to trim the content of the current editor state if the rendered content's height exceeds a specified height (rootelement). Here’s the ...
Skull's user avatar
  • 11
0 votes
0 answers
201 views

I'm working on a project where I'm implementing Lexical as part of a text editor. However, Lexical is used for multiple cells at once. My TranslationEditor component looks like this: const ...
edemarue's user avatar
0 votes
0 answers
96 views

After updating Lexical to the latest stable version (0.23.0), I am encountering an error when typing more than one character in the editor. The problem appears when loading Lexical inside an iframe, ...
talaat medhat's user avatar
1 vote
1 answer
250 views

Need to create a custom node to create heading1, formatted and normal fonts on choosing each button and created a custom node for it. NewNode.js import { ElementNode } from 'lexical'; export class ...
quinala's user avatar
  • 13
2 votes
2 answers
376 views

I'm working on implementing a rich text editor using the Lexical library with vanilla JavaScript and TypeScript. My understanding is that the editor should be attached to a contenteditable div, and ...
Cristian David Rodríguez's user avatar
0 votes
1 answer
114 views

I have HTML that I need converting to Lexical JS. The html contains img tags with base64 encoded values. But when I run through this code the data for the img tag is none existent. useEffect(() =>...
wenbert's user avatar
  • 5,303
1 vote
0 answers
962 views

I have created a custom node in Lexical called StyledParagraphNode that extends the ParagraphNode. It works perfectly in development mode, but when I build the project and try to use the custom editor,...
sumit gangwar's user avatar
2 votes
0 answers
675 views

So, I'm using the lexical editor in my react project. My app get the text from a API that transcribe audio and then I need to put on the Lexical editor, but I'm having problem to manipulate the text, ...
Vicenzo Frusciante's user avatar
1 vote
0 answers
356 views

I'm working with Facebook's Lexical editor in Typescript and need to preserve class attributes on text nodes fx. on a h4 tag, when importing them to the editor through the $generateHtmlFromNodes ...
user26587660's user avatar
0 votes
1 answer
89 views

I have a SharePoint Framework project with several React webparts. This project is forced to use TypeScript v4.5.5 due to compatibility with SharePoint Framework. I would like to use an external ...
javierhersan's user avatar
1 vote
1 answer
910 views

I am using some Lexial plugin that enhances the copy/paste experience (CopyPasteEnhancementPlugin). When investigating how it works I found this helper function inside clipboard.ts. The function gets ...
nerdess's user avatar
  • 11k
3 votes
1 answer
3k views

I've searched the web for a way to use tables in the slateEditor from payload and came to the solution, that I'm not able to to this. Then I've checked if the lexical editor has tables integrated. The ...
Xandrios93's user avatar
  • 2,325
0 votes
0 answers
1k views

I am trying to download lexical editor contents in the form of a file. So i am trying to extract its equivalent markdown . import { createHeadlessEditor } from '@lexical/headless'; import { $...
Ankeeta Sahoo's user avatar
0 votes
1 answer
2k views

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 ...
Derag's user avatar
  • 136
0 votes
1 answer
473 views

In lexicaljs, I created a node from a TextNode that is basically a placeholder representation. User selects from a dropdown and I add this new PlaceholderNode into the editor, represented as "{...
Mike's user avatar
  • 1,346
1 vote
1 answer
422 views

I wrote a small example of the vanilla JavaScript plain-text editor, and I'm not able to place my cursor on the text area and insert text. My question was on what I might need to do to make this ...
DK2's user avatar
  • 13
1 vote
0 answers
329 views

I've built a minimal markdown editor using Lexical, Lexical-Solid, and the provided plugins and examples. I'd like to, in some cases, preserve the markdown syntax, but it looks like the existing ...
Shaun Fattig's user avatar
0 votes
2 answers
1k views

I am implementing a basic rich text editor. I am trying to implement bold, italic, underline and strikethrough. A few issues: Underline and strikethrough don't show up. Even when I inspect element. ...
Tyler Besnoff's user avatar
3 votes
0 answers
355 views

How do you handle decorator node output in vanilla js? It looks like the decorate method of thevDecoratorNode Class is for rendering React components. Is the decorate() method required to extend the ...
Johan Bosman's user avatar
0 votes
0 answers
202 views

I am wondering how to implement Lexical as an input for a chat app. The issue lies in rendering the message list. A naive approach would involve creating a common message editor component that wraps ...
Andrew Rusinas's user avatar
-1 votes
1 answer
328 views

I have an app that imports a private NPM package that contains a text editor component that is powered by LexicalComposer. Currently in my app, I am trying to upgrade to version 18 of React and I am ...
Con's user avatar
  • 1
2 votes
1 answer
1k views

I was following the https://lexical.dev/docs/getting-started/quick-start It seem straightforward. import { createEditor } from 'lexical'; @Component({ selector: 'app-root', standalone: true, ...
Wajahath's user avatar
  • 4,236
1 vote
1 answer
605 views

I am trying to create a spellchecker plugin. I already have a backend that can recieve words or sentences and returns a list of incorrect words [{"word":"sd","start":0,&...
peerfunk's user avatar
1 vote
1 answer
3k views

I'm experimenting with lexical, and I have a specific use case I can't implement. A user enters some text, the app sends it to a backend to check for mistakes. In response, the backend returns ...
Ivan Banha's user avatar
1 vote
0 answers
656 views

If I drag an image from my local disk into the Lexical editor, the onDrop function can't capture the dragged image node and data. Is is a bug? If the imaged was dragged into the editor and then you ...
Nicerday's user avatar
0 votes
1 answer
533 views

Does anyone have an example to reflect the updates in an editor instance to another instance? The docs for Lexical.js are very poor.
jerome courtois's user avatar
3 votes
0 answers
589 views

The problem occur when several react apps with lexical editors are used at the same page. The first app that is getting focus works as expected no matter which app it is, but as soon as another app is ...
Erik Nilsson's user avatar
1 vote
1 answer
2k views

I have Lexical editor and i wanted to pass a value when user click enter. I was able to pass the value of my Lexical editor on button click, however on enter key it returns empty string. my approach ...
LVC's user avatar
  • 137
1 vote
1 answer
1k views

Hi I'm new to Lexical and want to create a suggestions plugin similar to how Gmail handles suggestions and smart compose, see attached image. Are there examples of how to do this in Lexical or can ...
caweidmann's user avatar
0 votes
0 answers
1k views

Is there a way that I can save large content from my Lexical editor to my database? Let say the number of words is about 20k. I tried to serialize the editorState into JSON and JSON stringified string,...
thnero's user avatar
  • 1
0 votes
1 answer
2k views

I've created an editor using useEditor. I want to bind events to it, to get active state of a specific mark and getAttributes to get link hrefs to update urls of previously set links. I cannot bind ...
samadfullstack's user avatar
1 vote
1 answer
1k views

Until recently, i used react-scripts to run my react project based on lexical.But now i need to implement it as a module of my main project. To do this, i configured webpack to build it for a ...
bothoustra's user avatar
1 vote
0 answers
2k views

I have taken the lexical editor state and converted to an HTML string. I am then setting that string to my component state, then using it to set the editor state in a sample display editor. However, ...
Luke Sharon's user avatar
2 votes
1 answer
2k views

I'm working on a React project and using a Lexical Editor component from Facebook. I'm trying to customize its appearance by creating a separate CSS file. However, my styling changes don't seem to ...
Teriyaki229's user avatar
1 vote
2 answers
2k views

I wanted to build an autocorrect plugin. So, I started out building a simple node transform. So, I just setup a custom autocorrect node and hardcoded two values which if the editor encounters, it ...
Karthik Raju's user avatar
1 vote
1 answer
1k views

I'm trying to add a Node to Lexical that can display both an Image and some (static) text - it's not meant to be editable through the editor. From what I can tell a Decorator Node is the way to go to ...
Jonas's user avatar
  • 139
2 votes
0 answers
506 views

I'm using @lexical/react to make a markdown editor. If you type a link, like [Google](https://google.com) and then press backspace to change the link, the entire link block is removed, when you erase ...
U. Watt's user avatar
  • 894
0 votes
0 answers
1k views

Whenever im trying to copy-paste text from word doc or google doc to lexical editor, formatting is not preserved. Is there any api provided by lexical to preserve formatting. How to preserve ...
Naveen kumar Gopi's user avatar
1 vote
1 answer
1k views

I'm using Lexical for rich text here is my lexical code: <LexicalComposer initialConfig={{ namespace: 'lexical-editor', editorState: () => $...
Rahele Nazari's user avatar
1 vote
0 answers
826 views

we are migrating from draft-js to Lexical, I need to change fractions to single-character fractions(1/4 ==> ¼) and I use onChange for this purpose function onChange(editorState: EditorState, ...
Rahele Nazari's user avatar
1 vote
3 answers
2k views

I am using AutoLinkNode and LinkNode from '@lexical/link'. How can I set target="_blank" to be default on newly created links? Do I need to override the LinkNode class or is there an easier ...
nerdess's user avatar
  • 11k
0 votes
1 answer
2k views

How to add a default font to a lexical text editor. I have selection-based font family change working. I am trying to figure out how I cans set a default font family.
Anil Kumar's user avatar
  • 2,319
2 votes
1 answer
428 views

I'm using Lexical, and I'm trying to disable the bold and italic shortcuts .. and possibly all keyboard shortcuts. how can I do that? I don't want to disable they keyevents listeners from javascript. ...
Rami Shenouda's user avatar