typist icon indicating copy to clipboard operation
typist copied to clipboard

Does not work with Next.js

Open 18601673727 opened this issue 10 months ago • 1 comments

"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

18601673727 avatar Apr 14 '24 11:04 18601673727

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)

mwolf1989 avatar Apr 29 '24 08:04 mwolf1989