The source code for v-linkify a VueJS Directive.
A simple Vue directive to turn URL's and emails into clickable links. NO dependencies!
npm install v-linkify
main.js
import Vue from 'vue';
import vLinkify from 'v-linkify';
Vue.use(vLinkify)
component.vue
import { vLinkify as linkify } from "v-linkify";
export default {
directives: {
linkify
}
}
<template>
<div v-linkify>
v-linkify https://github.com/maorbarel/v-linkify
Vue directive to parse links (urls, emails, etc.)
in text into clickable links
</div>
</template>
<template>
<div v-linkify="{ className: 'myClassName', target: '_self' }">
v-linkify https://github.com/maorbarel/v-linkify
Vue directive to parse links (urls, emails, etc.)
in text into clickable links
</div>
</template>
className | String
target | String, _blank By default
MIT © Maor Barel