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