diff --git a/docs/.vuepress/code-examples/source/basic.vue b/docs/.vuepress/code-examples/source/basic.vue
new file mode 100644
index 0000000..96fe517
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/basic.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/custom-image-handler.vue b/docs/.vuepress/code-examples/source/custom-image-handler.vue
new file mode 100644
index 0000000..96fe517
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/custom-image-handler.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/custom-modules.vue b/docs/.vuepress/code-examples/source/custom-modules.vue
new file mode 100644
index 0000000..96fe517
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/custom-modules.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/custom-toolbar.vue b/docs/.vuepress/code-examples/source/custom-toolbar.vue
new file mode 100644
index 0000000..e59ae4c
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/custom-toolbar.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/event-listening.vue b/docs/.vuepress/code-examples/source/event-listening.vue
new file mode 100644
index 0000000..96fe517
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/event-listening.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/live-preview.vue b/docs/.vuepress/code-examples/source/live-preview.vue
new file mode 100644
index 0000000..14daacd
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/live-preview.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/multiple-editors.vue b/docs/.vuepress/code-examples/source/multiple-editors.vue
new file mode 100644
index 0000000..96fe517
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/multiple-editors.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/save-content.vue b/docs/.vuepress/code-examples/source/save-content.vue
new file mode 100644
index 0000000..23741e0
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/save-content.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/set-contents.vue b/docs/.vuepress/code-examples/source/set-contents.vue
new file mode 100644
index 0000000..c4d9e29
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/set-contents.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/code-examples/source/set-focus.vue b/docs/.vuepress/code-examples/source/set-focus.vue
new file mode 100644
index 0000000..6882d7b
--- /dev/null
+++ b/docs/.vuepress/code-examples/source/set-focus.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 726ee6a..02cf705 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -1,14 +1,14 @@
-const path = require("path");
+// const path = require("path");
const { version } = require("../../package.json");
module.exports = {
head: [
- [
- "script",
- {
- src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"
- }
- ],
+ // [
+ // "script",
+ // {
+ // src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"
+ // }
+ // ],
[
"script",
{
@@ -30,9 +30,8 @@ module.exports = {
],
plugins: [
require("./plugin.js"),
- "live",
- "demo-block",
-
+ // "live",
+ // "demo-block",
[
"@vuepress/google-analytics",
{
@@ -62,24 +61,8 @@ module.exports = {
link: "https://github.com/davidroyer/vue2-editor/releases"
}
],
- // sidebar: ["/installation.md", "/started.md", "/usage.md"]
sidebar: ["/guide/", "/examples/"]
- // sidebar: 'auto'
- }
- }
- },
-
- /**
- * Allows the use of using aliases in files for easier importing
- */
- configureWebpack: {
- resolve: {
- alias: {
- "@root": path.resolve(__dirname, "../../"),
- "@src": path.resolve(__dirname, "../../src"),
- "@mixins": path.resolve(__dirname, "../../src/mixins"),
- "@utils": path.resolve(__dirname, "../../utils"),
- "@images": "./../images"
+ // sidebar: ["/guide/", "/examples/", "/playground.md"]
}
}
}
diff --git a/docs/.vuepress/snippets/demo.js b/docs/.vuepress/snippets/demo.js
deleted file mode 100644
index c0e8abe..0000000
--- a/docs/.vuepress/snippets/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export default {
- a: "value for 1",
-
- b: "value for b"
-};
diff --git a/docs/.vuepress/styles/palette.styl b/docs/.vuepress/styles/palette.styl
index 7d2fe05..87a2900 100755
--- a/docs/.vuepress/styles/palette.styl
+++ b/docs/.vuepress/styles/palette.styl
@@ -29,4 +29,4 @@ img {
}
.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__code
- overflow: scroll
\ No newline at end of file
+ overflow: scroll
diff --git a/docs/examples/README.md b/docs/examples/README.md
index 144e565..d704f83 100755
--- a/docs/examples/README.md
+++ b/docs/examples/README.md
@@ -4,28 +4,10 @@
# Examples
-
## Basic Setup
-``` vue
-
-
-
-
-
-
-
-```
+<<< @/docs/.vuepress/code-examples/source/basic.vue
+
## Custom Image Handler
@@ -87,41 +69,17 @@ export default {
```
-## Set Contents After Page Load
-
-```vue
-
-
-
-
-
-
-
-
-```
+<<< @/docs/.vuepress/code-examples/source/set-contents.vue
+
## Using Multiple Editors
+
+
```vue
@@ -157,95 +115,18 @@ export default {
## Custom Toolbar
-``` vue
-
-
-
-
-
-
-
-```
+<<< @/docs/.vuepress/code-examples/source/custom-toolbar.vue
+
## Saving The Content
-```vue
-
-
-
-
-
-
-
-
-```
+<<< @/docs/.vuepress/code-examples/source/custom-toolbar.vue
+
## Use a Live Preview
-```vue
-
-
-
-
-
-```
+<<< @/docs/.vuepress/code-examples/source/live-preview.vue
+
## How To Use Custom Quill Modules
@@ -308,6 +189,9 @@ export default {
```
+
+
+
### Version 2 - **_You Import | Vue2Editor Registers_**
1. Import your custom modules
@@ -349,29 +233,19 @@ export default {
```
+
+
## Setting Focus on Editor Programmatically
Give the editor instance a `ref` property
-```vue
-
-
-
-
-
-
-```
+<<< @/docs/.vuepress/code-examples/source/set-focus.vue
+
## Listening For Events
+
+
```vue
-->
diff --git a/docs/snippets/snippet-1.vue b/docs/snippets/snippet-1.vue
deleted file mode 100644
index c5256ae..0000000
--- a/docs/snippets/snippet-1.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
I am snippet 1
-
-
-
-
-
-