-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Assuming your guest users aren't able to modify the document, the simplest solution would probably be to filter the Slate value you're sending to them from the server. You can use Plate's helper functions to do this on the server if you create a temporary editor instance, or you can treat the Slate value as a plain JS object and filter out the comments by hand. One alternative solution that would also work if guest users need to have edit access would be to disable the comment plugin on the client, so comments remain in the Slate value but are inert. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick response. |
Beta Was this translation helpful? Give feedback.
Setting
comment
to false would probably work, although removing them entirely would be more idiomatic.The
6tepFE6vsjravHEubkqa7
will be different for each comment, so you'll have to filterObject.keys
bystartsWith('comment')
to determine which properties to remove.