ueberdosis/tiptap

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

Aberta

#4.873 aberto em 10 de fev. de 2024

 (8 comentários) (5 reações) (0 responsável)TypeScript (1.979 forks)batch import
area: docscomplexity: easygood first issueimpact: medium

Métricas do repositório

Stars
 (23.454 estrelas)
Métricas de merge de PR
 (Mesclagem média 4d 13h) (46 fundiu PRs em 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>',
})

Guia do colaborador