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 合并指标
 (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>',
})

贡献者指南