commit ef9c2c29e65dfa04954bbf00dba7e22791531dc8
parent b435027e69ba7cbafe43ca751de2c62e52a9a338
Author: unitehenry <unitehenry@gmail.com>
Date: Wed, 6 Nov 2019 15:06:11 -0500
demo
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/demo/src/App.vue b/demo/src/App.vue
@@ -47,7 +47,12 @@ export default {
d:
"M1600 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"
},
- handler: () => console.log('hello')
+ handler: () => {
+ const range = this.editor.range;
+ if(range && range.startContainer !== document) {
+ range.insertNode(document.createTextNode('Created by a custom button!'))
+ }
+ }
}
],
placeholder: "Begin typing in this editor...",