Skip to content

Commit

Permalink
Merge Table on Paste only if the document contains a single element a…
Browse files Browse the repository at this point in the history
…nd it is a table #1968
  • Loading branch information
BryanValverdeU authored Jul 21, 2023
1 parent e0913b2 commit 1c66c7e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export default function paste(
model => {
mergeModel(model, pasteModel, getOnDeleteEntityCallback(editor), {
mergeFormat: applyCurrentFormat ? 'keepSourceEmphasisFormat' : 'none',
mergeTable:
pasteModel.blocks.length === 1 &&
pasteModel.blocks[0].blockType === 'Table',
});
return true;
},
Expand Down

0 comments on commit 1c66c7e

Please sign in to comment.