2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-06-10 07:12:27 +03:00

Initial commit

This commit is contained in:
syropian
2016-07-24 11:08:04 -04:00
parent 0f41d8985e
commit 7df4c3dbed
9 changed files with 193 additions and 201 deletions
+9 -28
View File
@@ -1,40 +1,21 @@
<template>
<textarea @keyup="syncToEditor">{{ editorDisplayVal }}</textarea>
<prosemirror :content="editorVal" :on-change="editorChanged" menu-type="tooltip"></prosemirror>
<input type="text" v-input-autosize v-model="foo" placeholder="Butts" />
</template>
<script>
import VueProseMirror from "../";
import Vue from "vue";
import VueInputAutosize from "../";
Vue.use(VueInputAutosize);
export default {
name: "app",
data(){
return {
editorVal: "",
editorDisplayVal: ""
}
},
ready(){
console.log("Ready!")
},
methods: {
editorChanged(raw, rendered){
this.editorDisplayVal = raw;
console.log(rendered)
},
syncToEditor($event){
this.editorVal = $event.target.value;
data(){
return {
foo: "Hello"
}
},
components: {
prosemirror: VueProseMirror
}
}
</script>
<style>
.vueProseMirror .ProseMirror .ProseMirror-content{
width: 500px;
margin: 50px auto;
border: 1px solid #eee;
outline: none;
padding: 10px;
}
</style>