Fix freezing when typing big docs

This commit is contained in:
Sinclair Chen 2022-10-07 18:14:07 -07:00
parent f0b35993c9
commit b81c0b5e0e

View File

@ -83,11 +83,11 @@ export function useTextEditor(props: {
!simple && 'min-h-[6em]', !simple && 'min-h-[6em]',
'outline-none pt-2 px-4', 'outline-none pt-2 px-4',
'prose-img:select-auto', 'prose-img:select-auto',
'[&_.ProseMirror-selectednode]:outline-dotted [&_*]:outline-indigo-300' // selected img, emebeds '[&_.ProseMirror-selectednode]:outline-dotted [&_*]:outline-indigo-300' // selected img, embeds
) )
const editor = useEditor({ const editor = useEditor({
editorProps: { attributes: { class: editorClass } }, editorProps: { attributes: { class: editorClass, spellcheck: 'false' } },
extensions: [ extensions: [
StarterKit.configure({ StarterKit.configure({
heading: simple ? false : { levels: [1, 2, 3] }, heading: simple ? false : { levels: [1, 2, 3] },