-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: 📝 moving examples to be imported
- Loading branch information
1 parent
a02efbf
commit 6a49a96
Showing
16 changed files
with
268 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<vue-editor v-model="content" /> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}) | ||
}; | ||
</script> |
15 changes: 15 additions & 0 deletions
15
docs/.vuepress/code-examples/source/custom-image-handler.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<vue-editor v-model="content" /> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}) | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<vue-editor v-model="content" /> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}) | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<vue-editor v-model="content" :editor-toolbar="customToolbar" /> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Html For Editor</h1>", | ||
customToolbar: [ | ||
["bold", "italic", "underline"], | ||
[{ list: "ordered" }, { list: "bullet" }], | ||
["image", "code-block"] | ||
] | ||
}) | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<vue-editor v-model="content" /> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}) | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<div> | ||
<vue-editor v-model="content" /> | ||
<div>{{ content }}</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}) | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<vue-editor v-model="content" /> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}) | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div> | ||
<button @click="saveContent">Save</button> | ||
<vue-editor v-model="content" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}), | ||
methods: { | ||
handleSavingContent() { | ||
// You have the content to save | ||
console.log(this.content); | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div id="app"> | ||
<button @click="saveContent"></button> | ||
<vue-editor v-model="content"></vue-editor> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { | ||
VueEditor | ||
}, | ||
data() { | ||
return { | ||
content: "<h3>Initial Content</h3>" | ||
}; | ||
}, | ||
methods: { | ||
handleSavingContent() { | ||
// You have the content to save | ||
console.log(this.content); | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<div> | ||
<button @click="setEditorContent">Set Editor Content</button> | ||
<vue-editor v-model="content" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: null | ||
}), | ||
methods: { | ||
setEditorContent() { | ||
this.content = "<h1>Html For Editor</h1>"; | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<div> | ||
<button @click.prevent="focusEditor">Focus Editor</button> | ||
<vue-editor ref="editor" v-model="content" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { VueEditor } from "vue2-editor"; | ||
export default { | ||
components: { VueEditor }, | ||
data: () => ({ | ||
content: "<h1>Some initial content</h1>" | ||
}), | ||
methods: { | ||
focusEditor() { | ||
this.$refs.editor.quill.focus(); | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.