#Importing lexical editor

9 messages · Page 1 of 1 (latest)

still sky
#

Is there a way to import the lexical richText editor? I’m trying to create a custom feature that involves editing content in a custom form and I see that the richText field is exported from ‘@burnt temple/ui’ but it currently is just returning null so it seems like this is a placeholder. Is this something on the roadmap or should I be importing from somewhere else? Or is this just not possible/planned?

solid urchin
#

check the website template, it uses it

still sky
#

I see some functions for serializing the data and rendering the nodes on the frontend but I can't find where they use the editor itself do you have a link to that code?

solid urchin
#

just search for richtext, it for sure has it i use it

still sky
#

Can you share a code snippet or the import that you use? The only reference that I can find to richText in the website template is the richText serializer, I can't find where they use the editor

ocean sapphire
#

@still sky did you solve the issue? am currently working on that myself
@solid urchin are you referring to the RichText component? That just renders rich text, but is not an editor, as asked in the question. I assume he's referring to the editor that is used in the admin ui. am looking for a way as well to use the editor in my frontend. anyone got any ideas? or should I build a lexical editor myself?

timid iris
#

Our richtext editor is too deeply integrated with payload. It won't be easy to get it to work in your own frontend. We'll likely make this easier in the future

ocean sapphire
#

makes sense, after going through the codebase I suspected that after looking at the types. thanks for clarifying @timid iris ! would building my own lexical editor & saving the serialized lexical state in the database richText field make more sense and a approach I should look into?