mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-12 07:47:50 +08:00
853650885b
* 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.
765 B
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! :)