import React, { useMemo } from 'react' import { createEditor } from 'slate' import { Slate, Editable, withReact } from 'slate-react' const ReadOnlyExample = () => { const editor = useMemo(() => withReact(createEditor()), []) return ( ) } const initialValue = [ { type: 'paragraph', children: [ { text: 'This example shows what happens when the Editor is set to readOnly, it is not editable', }, ], }, ] export default ReadOnlyExample