2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-06-18 20:00:36 +03:00

Initial commit

This commit is contained in:
syropian
2016-07-17 10:48:56 -04:00
commit 4fc0389d8d
8 changed files with 205 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<template>
<textarea @keyup="syncToEditor">{{ editorDisplayVal }}</textarea>
<prosemirror :content="editorVal" :on-change="editorChanged" menu-type="tooltip"></prosemirror>
</template>
<script>
import VueProseMirror from "../";
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;
}
},
components: {
prosemirror: VueProseMirror
}
}
</script>
<style>
.vueProseMirror .ProseMirror .ProseMirror-content{
width: 500px;
margin: 50px auto;
border: 1px solid #eee;
outline: none;
padding: 10px;
}
</style>
+6
View File
@@ -0,0 +1,6 @@
import Vue from "vue";
import app from "./app";
new Vue({
el: "body",
components: { app }
})