diff --git a/.changeset/twelve-shoes-exercise.md b/.changeset/twelve-shoes-exercise.md new file mode 100644 index 0000000000..9da32a7cdd --- /dev/null +++ b/.changeset/twelve-shoes-exercise.md @@ -0,0 +1,5 @@ +--- +"@udecode/plate-table": patch +--- + +fix: copying form mulitple cells does not retain font attributes diff --git a/packages/table/src/lib/withSetFragmentDataTable.ts b/packages/table/src/lib/withSetFragmentDataTable.ts index 13834ab52c..7451fc6355 100644 --- a/packages/table/src/lib/withSetFragmentDataTable.ts +++ b/packages/table/src/lib/withSetFragmentDataTable.ts @@ -148,7 +148,7 @@ export const withSetFragmentDataTable: ExtendEditor = ({ data.setData('text/html', divElement.innerHTML); // set slate fragment - const selectedFragmentStr = JSON.stringify(tableNode); + const selectedFragmentStr = JSON.stringify([tableNode]); const encodedFragment = window.btoa( encodeURIComponent(selectedFragmentStr) );