import IsolatedBlockEditor, { EditorLoaded, ToolbarSlot, } from '@automattic/isolated-block-editor'; import { Box, Flex, FormControl, FormLabel, Textarea } from '@chakra-ui/react'; // @ts-ignore import '@automattic/isolated-block-editor/build-browser/core.css'; import '@automattic/isolated-block-editor/build-browser/isolated-block-editor.css'; import { serialize } from '@wordpress/blocks'; import { Button } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { uploadMedia } from '@wordpress/media-utils'; import React from 'react'; import { useFormContext } from 'react-hook-form'; import { BiExitFullscreen, BiFullscreen } from 'react-icons/bi'; import localized from '../../../../../assets/js/back-end/utils/global'; import { addMediaUpload, addSupportedBlocks } from '../utils/blocks'; type Props = { fullscreenMode: boolean; setFullscreenMode: (value: boolean) => void; defaultValue?: string; actions?: { label: string; action: () => void; variant?: 'primary' | 'secondary' | 'tertiary' | 'link'; isLoading?: boolean; }[]; }; const BlockEditor: React.FC = (props) => { const { defaultValue, actions, fullscreenMode, setFullscreenMode } = props; const { register, setValue } = useFormContext(); return ( {__('Certificate Content', 'learning-management-system')}