importReact,{useMemo,useCallback}from'react'import{Editor,BaseEditor}from"slate";import{Slate,Editable,withReact,ReactEditor}from"slate-react";constinitialValue: Descendant[]=[{type:"paragraph",children:[{text:"With Slate you can build complex block types that have their own embedded content and behaviors, like rendering checkboxes inside check list items!",},],},];exportconstApp=({p}:any)=>{consteditor: ReactEditor=useMemo(()=>withHistory(withReact(createEditor())),[]);return(<Slateeditor={editor}value={initialValue}><Editableplaceholder="Get to work…"/></Slate>);};