ueberdosis/tiptap

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

開放

#4,873 建立於 2024年2月10日

 (8 則留言) (5 個反應) (0 位負責人)TypeScript (1,979 個分叉)batch import
area: docscomplexity: easygood first issueimpact: medium

倉庫指標

星標
 (23,454 顆星)
PR 合併指標
 (平均合併 4天 13小時) (30 天內合併 46 個 PR)

描述

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

貢獻者指南