From fcb635d2ee59caac4fa3a250f7ab67771d8aa0ad Mon Sep 17 00:00:00 2001 From: Croc-ye <1402322262@qq.com> Date: Tue, 24 Dec 2024 21:06:28 +0800 Subject: [PATCH 1/2] fix: copying form mulitple cells does not retain font attributes --- packages/table/src/lib/withSetFragmentDataTable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ); From 6e81abeae84c3544ae76440b5808b9cf2fad4097 Mon Sep 17 00:00:00 2001 From: Ziad Beyens Date: Tue, 24 Dec 2024 16:54:19 +0100 Subject: [PATCH 2/2] Create twelve-shoes-exercise.md --- .changeset/twelve-shoes-exercise.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twelve-shoes-exercise.md 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