Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update vanilla js docs #4316

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions docs/installation/cdn.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# CDN
:::warning
There’s [an issue with skypack](https://github.com/skypackjs/skypack-cdn/issues/159), which causes trouble every now and then. We can’t 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:
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:

```html
<!DOCTYPE html>
Expand All @@ -14,8 +11,9 @@ For testing purposes or demos, use our [Skypack](https://www.skypack.dev/) CDN b
<body>
<div class="element"></div>
<script type="module">
import { Editor } from 'https://cdn.skypack.dev/@tiptap/core?min'
import StarterKit from 'https://cdn.skypack.dev/@tiptap/starter-kit?min'
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: [
Expand Down
3 changes: 3 additions & 0 deletions docs/installation/vanilla-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ tableOfContents: true

# Vanilla JavaScript

**Note**<br />
If you don't use a bundler like Webpack or Rollup, please read the [CDN](/docs/installation/cdn) guide instead. Since Tiptap is built in a modular way you will be required to use `<script type="module">` in your HTML to get our CDN imports working.

## Introduction
You are using plain JavaScript or a framework that is not listed here? No worries, we provide everything you need.

Expand Down