From 01df91a12efbfdbbde56fa75d5e1072e650c0a29 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Fri, 2 Aug 2024 18:04:31 +0300 Subject: [PATCH 1/5] Editor: Refactor PostTextEditor to use TextareaControl --- .../src/components/post-text-editor/index.js | 14 +++++--------- .../src/components/post-text-editor/style.scss | 4 +++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/editor/src/components/post-text-editor/index.js b/packages/editor/src/components/post-text-editor/index.js index c3dc61a0b4a2e..edc0a405396d3 100644 --- a/packages/editor/src/components/post-text-editor/index.js +++ b/packages/editor/src/components/post-text-editor/index.js @@ -1,8 +1,3 @@ -/** - * External dependencies - */ -import Textarea from 'react-autosize-textarea'; - /** * WordPress dependencies */ @@ -12,7 +7,7 @@ import { useMemo } from '@wordpress/element'; import { __unstableSerializeAndClean } from '@wordpress/blocks'; import { useDispatch, useSelect } from '@wordpress/data'; import { useInstanceId } from '@wordpress/compose'; -import { VisuallyHidden } from '@wordpress/components'; +import { TextareaControl, VisuallyHidden } from '@wordpress/components'; /** * Internal dependencies @@ -62,13 +57,13 @@ export default function PostTextEditor() { > { __( 'Type text or HTML' ) } -