# extendify/3.0.4/src/Draft/components/Completion.jsx

Extendify, version 3.0.4. 23 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.0.4/code/src/Draft/components/Completion.jsx
- Raw: https://pluginprobe.com/plugins/extendify/3.0.4/raw/src/Draft/components/Completion.jsx
- Modified: 2026-02-18T22:27:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.0.4/code/src/Draft/components/Completion.jsx#L10-L20`.

```jsx
import { pasteHandler, serialize } from '@wordpress/blocks';
import { useRef } from '@wordpress/element';

export const Completion = ({ completion }) => {
	const blocks = pasteHandler({ plainText: completion });
	const ref = useRef();

	return (
		<div
			ref={ref}
			style={{ fontSize: 'clamp(1em 1em 1em)' }}
			className="completion relative max-h-60 overflow-y-auto break-words px-5 pt-4"
			data-test="completion-input"
		>
			{Array.isArray(blocks) ? (
				<div dangerouslySetInnerHTML={{ __html: serialize(blocks) }} />
			) : (
				<div dangerouslySetInnerHTML={{ __html: blocks }} />
			)}
		</div>
	);
};

```
