0👍
Thanks to Leeish, here is what I’ve done. It’s a slightly duplicate question apparently, but the answer here might help anyway.
The HTML stay the same, with @mouseup.
On methods I wrote (as quick and dirty example):
mouseup(ev){
console.log('onselect',ev);
var gs = window.getSelection();
var data = gs.baseNode.data;
var data2 = data.substr(gs.anchorOffset+gs.toString().length,data.length);
var data1 = data.substr(0,gs.anchorOffset) + gs.toString();
console.log(data1);
console.log(data2);
},
- [Vuejs]-Error when trying to work on drop down with multi select?
- [Vuejs]-TypeError: this.$cookies is undefined using vue-cookie
Source:stackexchange.com