Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using rangy with Vue.js #444

Open
JustinMontes opened this issue Apr 16, 2018 · 2 comments
Open

Using rangy with Vue.js #444

JustinMontes opened this issue Apr 16, 2018 · 2 comments

Comments

@JustinMontes
Copy link

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.

@yangzhixiao
Copy link

yangzhixiao commented Jun 4, 2018

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.

@tsaltena
Copy link

tsaltena commented Jul 13, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants