Convert HTML to blocks in product variation description (#36241)
* Convert HTML to blocks in product variation description * Add changelog entry
This commit is contained in:
parent
302dab0521
commit
421fc3e30b
|
@ -2,7 +2,7 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { BlockInstance, serialize, parse } from '@wordpress/blocks';
|
||||
import { BlockInstance, serialize, rawHandler } from '@wordpress/blocks';
|
||||
import {
|
||||
CheckboxControl,
|
||||
Card,
|
||||
|
@ -55,7 +55,7 @@ export const ProductVariationDetailsSection: React.FC = () => {
|
|||
|
||||
const [ descriptionBlocks, setDescriptionBlocks ] = useState<
|
||||
BlockInstance[]
|
||||
>( parse( values.description || '' ) );
|
||||
>( rawHandler( { HTML: values.description } ) );
|
||||
|
||||
const imageFieldProps = getInputProps( 'image' );
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
Convert HTML to blocks in product variation description
|
Loading…
Reference in New Issue