diff --git a/packages/playground/admin/lib/components/richt-text-editor/plate-editor.tsx b/packages/playground/admin/lib/components/richt-text-editor/plate-editor.tsx index 4ec569743..a3768c44a 100644 --- a/packages/playground/admin/lib/components/richt-text-editor/plate-editor.tsx +++ b/packages/playground/admin/lib/components/richt-text-editor/plate-editor.tsx @@ -42,7 +42,7 @@ export const PlateEditor = Component( onChange={handleEditorOnChange} normalizeInitialValue > - +
{ - const field = useField('data') - const fieldAccessor = field.getAccessor - const fieldValue = field.value +interface PlateContentSyncProps { + field: string | SugarableRelativeSingleField +} + +const PlateContentSync = ({ field }: PlateContentSyncProps) => { + const contentField = useField(field) + const fieldAccessor = contentField.getAccessor + const fieldValue = contentField.value const editor = useEditorRef() useEffect(() => {