Skip to content

Commit

Permalink
Use new serializer options
Browse files Browse the repository at this point in the history
  • Loading branch information
stacimc committed Mar 17, 2022
1 parent 085000f commit ccba197
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function CopyMenuItem( { blocks, onCopy } ) {
const ref = useCopyToClipboard(
() =>
serialize( blocks, {
__experimentalSupports: { copy: false },
__experimentalExcludeAttributes: { copy: false },
} ),
onCopy
);
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/copy-handler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function useClipboardHandler() {
notifyCopy( event.type, selectedBlockClientIds );
const blocks = getBlocksByClientId( selectedBlockClientIds );
const serialized = serialize( blocks, {
__experimentalSupports: { copy: event.type !== 'copy' },
__experimentalExcludeAttributes: { copy: event.type !== 'copy' },
} );

event.clipboardData.setData( 'text/plain', serialized );
Expand Down

0 comments on commit ccba197

Please sign in to comment.