mirror of
https://github.com/WenPai-org/wpmind.git
synced 2025-08-03 19:19:46 +08:00
foxed copy response
This commit is contained in:
parent
0670dcdb4f
commit
fdb66ffac4
1 changed files with 2 additions and 4 deletions
|
@ -6,6 +6,7 @@ import './style.scss';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { Button, Tooltip } from '@wordpress/components';
|
import { Button, Tooltip } from '@wordpress/components';
|
||||||
import { useSelect, useDispatch } from '@wordpress/data';
|
import { useSelect, useDispatch } from '@wordpress/data';
|
||||||
|
import { serialize } from '@wordpress/blocks';
|
||||||
|
|
||||||
import hasNonEmptySelectedBlocks from '../../../../utils/has-non-empty-selected-blocks';
|
import hasNonEmptySelectedBlocks from '../../../../utils/has-non-empty-selected-blocks';
|
||||||
import LoadingText from '../loading-text';
|
import LoadingText from '../loading-text';
|
||||||
|
@ -154,11 +155,8 @@ export default function Input(props) {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// Copy to clipboard.
|
// Copy to clipboard.
|
||||||
window.navigator.clipboard.writeText(
|
window.navigator.clipboard.writeText(
|
||||||
JSON.stringify(response)
|
serialize(response)
|
||||||
);
|
);
|
||||||
|
|
||||||
reset();
|
|
||||||
close();
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{__('Copy', 'mind')}
|
{__('Copy', 'mind')}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue