rangy icon indicating copy to clipboard operation
rangy copied to clipboard

Using rangy with Vue.js

Open JustinMontes opened this issue 6 years ago • 2 comments

Once installed via: npm i rangy

The syntax is not clear to my team when say calling the highlighter function. We're new to Vue.js and are experiencing a lot of compilation issues when calling these functions.

JustinMontes avatar Apr 16 '18 05:04 JustinMontes

jsut install it by "npm install rangy --save", then import in xx.vue file like "import rangy from 'rangy';", and you can use the rangy object. just use it as a module in vue.js, var rangy = require('rangy'); also available.

yangzhixiao avatar Jun 04 '18 03:06 yangzhixiao

I was successful in implementing it through following: https://vuejsdevelopers.com/2017/04/22/vue-js-libraries-plugins/

including:

import rangy from 'rangy';
Object.defineProperty(Vue.prototype, '$rangy', { value: rangy });

then makes Rangy available as this.$rangy etc.

tsaltena avatar Jul 13 '18 09:07 tsaltena