tiptap/docs/installation/cdn.md
Rico 853650885b
feat(docs): added cdn installation guide (#4045)
* Update cdn.md

Added 3 examples of CDN usage.

* Update installation.md

Uncommented CDN line

* Update cdn.md

removed Skypack -- not reliable in testing with Codepen.

* Update cdn.md

removed esm.run. I couldn't solve the issue.
2023-07-07 15:35:07 +02:00

765 B

CDN

It's also possible to run Tiptap directly on the browser by using CDNs like esm.sh. (Unfortunately Skypack has not been reliable in our testing).

ESM.SH

<!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>Hello World!</p>',
    })
  </script>
</body>
</html>

You should now see Tiptap in your browser. Time to give yourself a pat on the back! :)