探索 Tiptap V3 的最新功能

CDN

为了测试或演示,可以使用我们的 esm.sh CDN 构建。以下是您入门所需的几行代码。

<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
  </head>
  <body>
    <div class="element"></div>
    <script type="module">
      import { Editor } from 'https://esm.sh/@tiptap/core'
      import StarterKit from 'https://esm.sh/@tiptap/starter-kit'
      const editor = new Editor({
        element: document.querySelector('.element'),
        extensions: [StarterKit],
        content: '<p>你好,世界!</p>',
      })
    </script>
  </body>
</html>

Tiptap 现在应该在您的浏览器中可见。该给自己点个赞了!:)