tiptap/docs/installation/cdn.md

32 lines
911 B
Markdown
Raw Normal View History

# CDN
2022-01-28 06:04:05 +08:00
:::warning
Theres [an issue with skypack](https://github.com/skypackjs/skypack-cdn/issues/159), which causes trouble every now and then. We cant do much about that for now.
:::
For testing purposes or demos, use our [Skypack](https://www.skypack.dev/) CDN builds. Here are the few lines of code you need to get started:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div class="element"></div>
<script type="module">
import { Editor } from 'https://cdn.skypack.dev/@tiptap/core?min'
2021-05-07 00:41:22 +08:00
import StarterKit from 'https://cdn.skypack.dev/@tiptap/starter-kit?min'
const editor = new Editor({
element: document.querySelector('.element'),
2021-05-07 00:41:22 +08:00
extensions: [
StarterKit,
],
2021-04-03 23:30:56 +08:00
content: '<p>Hello World!</p>',
})
</script>
</body>
</html>
```
2021-10-20 04:30:45 +08:00
You should now see Tiptap in your browser. Time to give yourself a pat on the back! :)