Not sure if I'm somehow doing something wrong, or why this issue is happening for me.
Problem:
Changing text to any of the heading elements in the editor don't do anything.
I tried with H1, H2, H3, etc. and in the editor, they render visually as the right headings. But when I catch the data in my frontend, I print the contents of all the text nodes from Lexical. And all I get is this:
So there's only formatting details (and this is another bug, multiple formats, see the other issue I opened), nothing that differentiates the type of heading or text to render.
Solution:
Change value of type from text to a heading level, or add that as another property returned here.
Edit: Looks like I was doing something wrong, sorry
Not sure if I'm somehow doing something wrong, or why this issue is happening for me.
Problem:
Changing text to any of the heading elements in the editor don't do anything.
I tried with
H1
,H2
,H3
, etc. and in the editor, they render visually as the right headings. But when I catch the data in my frontend, I print the contents of all the text nodes from Lexical. And all I get is this:{detail: 0, format: 0, mode: 'normal', style: '', text: "The text.."}
So there's only formatting details (and this is another bug, multiple formats, see the other issue I opened), nothing that differentiates the type of heading or text to render.
Solution:
Change value of
type
fromtext
to a heading level, or add that as another property returned here.Edit: Looks like I was doing something wrong, sorry