lexicaljs Questions
3
I want to find text* in Lexical JS and apply a highlight style to all matches.
import {useLexicalComposerContext} from "@lexical/react/LexicalComposerContext";
import {$createRangeSelecti...
3
I'm building a rich text editor for a question and answer site.
As far as I know Lexical lets us get output data to JSON, JSON string, HTML, Markdown and others.
Based on the recommended best pract...
Impanation asked 29/5, 2022 at 1:38
3
Solved
When I try to make a blog, I can't pass the editor in the form. I found this:
DraftJS React-Hook-Form - submitting Editor as input
but it seems that LexicalRichTextEditor does not have such a tag t...
Caernarvonshire asked 10/1, 2023 at 5:55
5
I´m trying to create a "one line" message component based on Lexical, but i´m unable to prevent the enter key to create a new paragraph.
Any ideas how to accomplish this?
I´ve added styli...
4
Solved
I'm new to lexical.js and don't fully understand how I can listen to different keystroke combinations. I want to listen to "Ctrl/Cmd+S" and then fire off a callback (to save data). How ca...
Hyades asked 3/2, 2023 at 16:17
3
I want to create a function that can determine if my editor has focus:
function hasFocus(editor: LexicalEditor) {
const hasFocus = editor.getEditorState().read(() => {
// return $...
})
re...
2
I am trying to export the content of my RTE developed with Lexical in HTML format. To do so, I have a button with an handleClick function which is supposed to console.log the content of the RTE in ...
3
With the Lexical text editor framework, what's the easiest way to initialize the editor in React with a default text string?
I could, for instance, create an instance, manually save the JSON state,...
Apyretic asked 23/4, 2022 at 3:46
2
Solved
I'm using draftjs so far and I like it but since draftjs is going to be retired I'm playing with lexical text editor.
But I could not figure out even very basic thing, insert text programmatically....
Samples asked 11/8, 2022 at 6:52
0
I am working on blog like web project using lexical editor in nextjs.
I am trying to implement image plugin in lexical editor. For now it coverts to base64 format which will be expensive for storin...
Schnur asked 13/8, 2022 at 5:36
1
What I need to get done
I want to make a simple controlled lexical plaintex editor - one which is controlled by a parent string field.
But I'm really struggling with getting my editor to simultaneo...
1
© 2022 - 2024 — McMap. All rights reserved.