ueberdosis/tiptap

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

Ouverte

#4 873 ouverte le 10 févr. 2024

 (8 commentaires) (5 réactions) (0 personne assignée)TypeScript (1 979 forks)batch import
area: docscomplexity: easygood first issueimpact: medium

Métriques du dépôt

Stars
 (23 454 étoiles)
Métriques de merge PR
 (Merge moyen 4j 13h) (46 PRs mergées en 30 j)

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>',
})

Guide contributeur