typist
typist copied to clipboard
Does not work with Next.js
"use client"
import { PlainTextKit } from "@doist/typist"
const TypistEditor = dynamic(() => import("@doist/typist").then((mod) => mod.TypistEditor), {
ssr: false,
})
// ...Later in render()
<TypistEditor placeholder="A full rich-text editor, be creative…" content={value} extensions={[PlainTextKit]} />
result in error:
Unhandled Runtime Error
TypeError: this.docView is null
Same for me.
Created a use client TypistEditor Component, try to use it in a page but get this error:
TypeError: Cannot read properties of null (reading 'updateOuterDeco')
Call Stack
EditorView.updateStateInner
node_modules/prosemirror-view/dist/index.js (5305:1)
EditorView.update
node_modules/prosemirror-view/dist/index.js (5234:1)
EditorView.setProps
node_modules/prosemirror-view/dist/index.js (5248:1)
Editor.createNodeViews
node_modules/@tiptap/core/dist/index.js (3894:1)
PureEditorContent.init
node_modules/@tiptap/react/dist/index.js (52:1)
PureEditorContent.componentDidMount
node_modules/@tiptap/react/dist/index.js (35:1)