From 4aef458896d3024fae36dbb25bae1ab45d14625f Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 29 Dec 2021 15:55:01 -0500 Subject: [PATCH] fix advanced editor in description --- ui/component/publishDescription/view.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/component/publishDescription/view.jsx b/ui/component/publishDescription/view.jsx index 193809273..ba80c93bb 100644 --- a/ui/component/publishDescription/view.jsx +++ b/ui/component/publishDescription/view.jsx @@ -18,11 +18,17 @@ function PublishDescription(props: Props) { setAdvancedEditor(!advancedEditor); } + function handleCommentChange(event) { + let descriptionValue = advancedEditor ? event : event.target.value; + + updatePublishForm({ description: descriptionValue }); + } + return ( updatePublishForm({ description: advancedEditor ? value : value.target.value })} + onChange={handleCommentChange} quickActionLabel={advancedEditor ? __('Simple Editor') : __('Advanced Editor')} quickActionHandler={toggleMarkdown} textAreaMaxLength={FF_MAX_CHARS_IN_DESCRIPTION} -- 2.45.3