Skip to content

Commit 1685007

Browse files
committed
docs: update docs
1 parent 5733036 commit 1685007

File tree

2 files changed

+72
-28
lines changed

2 files changed

+72
-28
lines changed

docs/content/guide/index.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# Introduction
22

3-
## What is Quill
3+
<div class="replaceable-area">
44

5-
**Quill** is a modern rich text editor built for compatibility and extensibility. It was created by Jason Chen and Byron Milligan and actively maintained by [Slab](https://slab.com/).
5+
::: warning
6+
🚀 **VueQuill** is in **@alpha** version! Currently the focus is on making VueQuill stable and feature complete first. It is not recommended to use this for anything serious yet. Some of its features are not "finalized" and will have breaking changes over time as we discover better solutions.
7+
:::
68

7-
You can learn more about the rationale behind the project in the [Why Quill](https://quilljs.com/guides/why-quill/) guides.
9+
</div>
810

911
## What is VueQuill
1012

1113
**VueQuill** is a **Vue Component** for building rich text editors, this package is a thin wrapper around Quill to make it easier to use in a Vue 3 application.
1214

15+
## What is Quill
16+
17+
**Quill** is a modern rich text editor built for compatibility and extensibility. It was created by Jason Chen and Byron Milligan and actively maintained by [Slab](https://slab.com/).
18+
19+
You can learn more about the rationale behind the project in the [Why Quill](https://quilljs.com/guides/why-quill/) guides.
20+
1321
## Browser Support
1422

1523
Cross-platform support is important to many Javascript libraries, but the criteria for what this means often differ. For Quill, the bar is not just that it runs or works, it has to run or work the same way. Not only is functionality a cross-platform consideration, but the user and developer experience are as well. If some content produces a particular markup in Chrome on OSX, it will produce the same markup on IE. If hitting enter preserves bold format state in Firefox on Windows, it will be preserved on mobile Safari.
@@ -19,3 +27,23 @@ Quill supports all modern browsers on desktops, tablets, and phones. Experience
1927
## Community
2028

2129
If you have questions or need help, reach out to the community at [GitHub Discussions](https://github.com/vueup/vue-quill/discussions).
30+
31+
<!-- TextReplacer used to replace text after component mounted -->
32+
<ClientOnly>
33+
<TextReplacer
34+
container=".replaceable-area"
35+
pattern="@alpha"
36+
:replacement="latestRelease"
37+
></TextReplacer>
38+
</ClientOnly>
39+
40+
<script setup>
41+
import { onMounted, ref } from 'vue'
42+
import TextReplacer from '../../components/TextReplacer.vue'
43+
import { getLatestRelease } from '../../utils/github-api.ts'
44+
45+
const latestRelease = ref('')
46+
onMounted(async () => {
47+
latestRelease.value = await getLatestRelease('vueup', 'vue-quill').then(data => data)
48+
})
49+
</script>

docs/content/guide/installation.md

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,64 @@ This guide assumes intermediate-level knowledge of Vue 3. If you are totally new
88

99
VueQuill ships as a UMD module that is accessible in the browser. When loaded in the browser, you can access the component through the `VueQuill.QuillEditor` global variable. You'll need to load Vue.js, VueQuill JS & VueQuill CSS theme.
1010

11-
<div id="cdn-install">
11+
<div class="replaceable-area">
1212

13-
```html
14-
<!-- include VueJS first -->
15-
<script src="https://unpkg.com/vue@latest"></script>
13+
```html
14+
<!-- include VueJS first -->
15+
<script src="https://unpkg.com/vue@next"></script>
1616

17-
<!-- use the latest VueQuill release -->
18-
<script src="https://unpkg.com/@vueup/vue-quill@latest"></script>
19-
<link rel="stylesheet" href="https://unpkg.com/@vueup/vue-quill@latest/dist/vue-quill.snow.css">
17+
<!-- use the latest VueQuill release -->
18+
<script src="https://unpkg.com/@vueup/vue-quill@latest"></script>
19+
<link rel="stylesheet" href="https://unpkg.com/@vueup/vue-quill@latest/dist/vue-quill.snow.css">
2020

21-
<!-- or point to a specific VueQuill release -->
22-
<script src="https://unpkg.com/@vueup/vue-quill@$latestVersion"></script>
23-
<link rel="stylesheet" href="https://unpkg.com/@vueup/vue-quill@$latestVersion/dist/vue-quill.snow.css">
24-
```
25-
</div>
21+
<!-- or point to a specific VueQuill release -->
22+
<script src="https://unpkg.com/@vueup/vue-quill@version"></script>
23+
<link rel="stylesheet" href="https://unpkg.com/@vueup/vue-quill@version/dist/vue-quill.snow.css">
24+
```
2625

27-
::: warning
28-
For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions.
29-
:::
26+
::: warning
27+
For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions.
28+
:::
3029

3130
## NPM / Yarn
3231

3332
Use the package manager [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) to install VueQuill.
3433

3534
```bash
36-
npm install @vueup/vue-quill --save
35+
npm install @vueup/vue-quill@latest --save
3736
# OR
38-
yarn add @vueup/vue-quill
37+
yarn add @vueup/vue-quill@latest
3938
```
4039

40+
</div>
41+
4142
npm or yarn is the recommended installation method when you are using [Single File Component](usage.md#in-single-file-component), and then you can register the [Component](usage.md#in-single-file-component) in your app.
4243

43-
<!-- GithubVersionSetter used to replace target with the latest github-release tag name -->
44+
<!-- TextReplacer used to replace text after component mounted -->
4445
<ClientOnly>
45-
<GithubVersionSetter
46-
container="#cdn-install"
47-
target="$latestVersion"
48-
owner="vueup"
49-
repo="vue-quill"
50-
></GithubVersionSetter>
46+
<TextReplacer
47+
container=".replaceable-area"
48+
pattern="@latest"
49+
prefix="@"
50+
:replacement="latestRelease"
51+
></TextReplacer>
52+
<TextReplacer
53+
container=".replaceable-area"
54+
pattern="@version"
55+
prefix="@"
56+
:replacement="latestReleaseVersion"
57+
></TextReplacer>
5158
</ClientOnly>
5259
5360
<script setup>
54-
import GithubVersionSetter from '../../components/GithubVersionSetter.vue'
61+
import { onMounted, ref } from 'vue'
62+
import TextReplacer from '../../components/TextReplacer.vue'
63+
import { getLatestRelease, getLatestReleaseVersion } from '../../utils/github-api.ts'
64+
65+
const latestRelease = ref('')
66+
const latestReleaseVersion = ref('')
67+
onMounted(async () => {
68+
latestRelease.value = await getLatestRelease('vueup', 'vue-quill').then(data => data)
69+
latestReleaseVersion.value = await getLatestReleaseVersion('vueup', 'vue-quill').then(data => data)
70+
})
5571
</script>

0 commit comments

Comments
 (0)