simplify placeholder example

This commit is contained in:
Chrissi2812 2019-04-25 17:29:52 +02:00
parent cf7ff907a1
commit 1b5b60c595
No known key found for this signature in database
GPG Key ID: B4B82C7E618271DA

View File

@ -1,6 +1,6 @@
<template>
<div class="editor">
<input type="text" v-model="placeholder">
<input type="text" v-model="editor.extensions.options.placeholder.emptyNodeText">
<editor-content class="editor__content" :editor="editor" />
</div>
</template>
@ -19,7 +19,6 @@ export default {
},
data() {
return {
placeholder: 'Write something …',
editor: new Editor({
extensions: [
new BulletList(),
@ -36,11 +35,6 @@ export default {
beforeDestroy() {
this.editor.destroy()
},
watch: {
placeholder(newValue) {
this.editor.extensions.options.placeholder.emptyNodeText = newValue
},
},
}
</script>