Skip to content
Discussion options

You must be logged in to vote

This happens because Plate/Slate's clipboard payload is a serialized fragment, not a document-aware copy operation. Plate stores a comment reference on text leaves as comment_<id> (source); the generic application/x-slate-fragment path copies those properties unchanged. It has no source/destination document identity and does not carry your TDiscussion store, so it cannot safely decide whether to preserve or remap the ID.

For independent documents, the safest default is to strip the source references before insertion. Plate v53 exposes a parser.transformFragment hook after the Slate fragment is decoded and before insertFragment (pipeline):

import {
  createSlatePlugin,
  TextApi,
  type De…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sammaiah-Jai
Comment options

Answer selected by Sammaiah-Jai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants