diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 7236e74b2f6d68..a0316ee54337fa 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -329,7 +329,7 @@ export function RichTextWrapper( onChange, } ); - useMarkPersistent( { html: adjustedValue, value } ); + useMarkPersistent( value ); const keyboardShortcuts = useRef( new Set() ); const inputEvents = useRef( new Set() ); diff --git a/packages/block-editor/src/components/rich-text/use-mark-persistent.js b/packages/block-editor/src/components/rich-text/use-mark-persistent.js index 10e157452fbe22..e52df535a84161 100644 --- a/packages/block-editor/src/components/rich-text/use-mark-persistent.js +++ b/packages/block-editor/src/components/rich-text/use-mark-persistent.js @@ -9,7 +9,7 @@ import { useDispatch } from '@wordpress/data'; */ import { store as blockEditorStore } from '../../store'; -export function useMarkPersistent( { html, value } ) { +export function useMarkPersistent( value ) { const previousText = useRef(); const hasActiveFormats = !! value.activeFormats?.length; const { __unstableMarkLastChangeAsPersistent } = @@ -36,5 +36,5 @@ export function useMarkPersistent( { html, value } ) { } __unstableMarkLastChangeAsPersistent(); - }, [ html, hasActiveFormats ] ); + }, [ value.text, hasActiveFormats ] ); }