ueberdosis/tiptap

[Documentation]: Broken CDN import from https://esm.sh

Open

#4,873 opened on Feb 10, 2024

 (8 comments) (5 reactions) (0 assignees)TypeScript (1,979 forks)batch import
area: docscomplexity: easygood first issueimpact: medium

Repository metrics

Stars
 (23,454 stars)
PR merge metrics
 (Avg merge 4d 13h) (46 merged PRs in 30d)

Description

What’s the URL to the page you’re sending feedback for?

https://tiptap.dev/docs/editor/installation/cdn

What part of the documentation needs improvement?

Copy and pasting the example and trying to type a line break in the editor throws: "RangeError: Can not convert <> to a Fragment (looks like multiple versions of prosemirror-model were loaded)".

Indeed, both versions of 1.32.4 and 1.32.7 of prosemirror-view, and versions 1.19.3 and 1.19.4 of prosemirror-model are loaded for example.

Current version of @tiptap/core and @tiptap/starter-kit is 2.2.2. I get the same problem with 2.2.1 and 2.2.0.

The same code seems to work fine when imported from jsdeliver:

import { Editor } from 'https://cdn.jsdelivr.net/npm/@tiptap/core@2.2.2/+esm'
import { StarterKit} from 'https://cdn.jsdelivr.net/npm/@tiptap/starter-kit@2.2.2/+esm'
const editor = new Editor({
    element: document.querySelector('.element'),
    extensions: [
        StarterKit,
    ],
    content: '<p>Hello World!</p>',
})

Contributor guide