2021-02-07 22:55:50 +08:00
|
|
|
# CDN
|
2022-01-28 06:04:05 +08:00
|
|
|
|
2023-08-11 12:14:27 +08:00
|
|
|
For testing purposes or demos, use our [esm.sh](https://esm.sh.dev/) CDN builds. Here are the few lines of code you need to get started:
|
2021-02-07 22:55:50 +08:00
|
|
|
|
|
|
|
```html
|
2021-05-26 18:52:45 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2021-02-07 22:55:50 +08:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="element"></div>
|
|
|
|
<script type="module">
|
2023-07-07 21:35:07 +08:00
|
|
|
import { Editor } from 'https://esm.sh/@tiptap/core'
|
|
|
|
import StarterKit from 'https://esm.sh/@tiptap/starter-kit'
|
2021-02-07 22:55:50 +08:00
|
|
|
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>',
|
2021-02-07 22:55:50 +08:00
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
```
|
2021-04-09 04:42:18 +08:00
|
|
|
|
2023-07-07 21:35:07 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
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! :)
|
2023-07-07 21:35:07 +08:00
|
|
|
|