/** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; import { useContext } from '@wordpress/element'; import { __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components'; import { Stack } from '@wordpress/ui'; /** * Internal dependencies */ import { AdminContext } from '../../index'; import { useSearchVisibility } from '../index'; import ItemHelp from '../components/item-help'; export default function MultiCursorPaste() { const { editorOptions, setEditorOptions } = useContext( AdminContext ); const title = __( 'Behavior when pasting text with matching line and cursor counts', 'custom-html-block-extension' ); const isVisible = useSearchVisibility( title ); if ( ! isVisible ) { return null; } const items = [ { label: __( 'Spread', 'custom-html-block-extension' ), image: 'editor-options/multi-cursor-paste_1.gif', value: 'spread', }, { label: __( 'Full', 'custom-html-block-extension' ), image: 'editor-options/multi-cursor-paste_2.gif', value: 'full', isDefault: true, }, ]; const onChange = ( value: string | number | undefined ) => { setEditorOptions( { ...editorOptions, multiCursorPaste: value as typeof editorOptions.multiCursorPaste, } ); }; return ( { items.map( ( item ) => ( ) ) } ); }