Deserialization Question #35
Replies: 4 comments
-
Hey, sure that would be possible! You have to consider two things:
Personally, for those reasons, I would recommend read-only mode instead of de-serialization only if you want the users to edit the displayed content as well - right on the site. That's why facebook for example, is using it in read-only mode, while most blogs using it for their content are probably much better off de-serializing it. But you're defnitely free doing it either way! One thing I'm not sure of, though: some nodes/plugins in this plugin depend on payload internals. E.g. the Upload/Image plugin requests the images from the payload upload collection, obviously. Or internal links. Not sure how that would play out in your front-end if it's decoupled from payload, you might have to modify those plugins/nodes. Test it out! |
Beta Was this translation helpful? Give feedback.
-
Cool! I'll see what I can come up with and I'll let you know if it's worth anything. I'll close this issue in the meantime so it doesn't clog your queue :) |
Beta Was this translation helpful? Give feedback.
-
Alright!! I'll actually move it into a discussion, as it fits more there ^^ |
Beta Was this translation helpful? Give feedback.
-
I'm interested in this because there is a noticeable performance hit when using lexical's read-only editor. Main interest area that appears to be missing from your example serialiser would be text alignment. I've noticed its not on your todo list, is it something you might consider? I've not had much luck extending your implementation so far without unintended side effects. The json structure is unhelpful for alignment, as you need to fetch the text alignment value from the parent and pass it into the child... |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I was able to get the plugin to work on the admin panel but, when it came to displaying the content I had a few questions.
The example referenced in the readme.md seems to indicate that we should be de-serializing the content manually but, Lexical has a build in read mode see: https://lexical.dev/docs/concepts/read-only
Do you think it's possible to generate a read-only lexical component based on the configuration provided to the admin panel and use that instead of de-serializing all the nodes?
I feel like this feature would add a huge advantage over the built in Slate system since de-serializing is hard and tedious.
thanks for your time and if you think it's a good idea please point me in the right direction and I can take a crack at it!
Beta Was this translation helpful? Give feedback.
All reactions