vue-autolink

Auto-link url and images in Vue components
1,566
Install
npm install vue-autolink
Latest Version:0.0.11
Vue:1
License:MIT
Last Updated:Dec 3, 2015
Links: npm
Maintainer: kchan

It's not just link, it's everything link-able in text.

Installation

npm i -D vue-autolink

Example

app.js

// locally
import autoLink from 'vue-autolink/autolink'
new Vue({
  components: { autoLink }
})
// globally
import autoLink from 'vue-autolink'
Vue.use(autoLink)

template

<!-- enable all embed and escape html -->
<auto-link :content="content_variable" embed safe></auto-link>
<!-- enable specific embed-able links -->
<auto-link :content="content_variable" embed="youtube,youku"></auto-link>
<!-- custom attributes -->
<auto-link :content="content_variable" :link-attr="{'data-link': true}" :image-attr="{'data-image': true}"></auto-link>
<!-- it's sure that you can still use :style :class on component -->
<auto-link :class="{myStyle: true}" :style="{textAlign: 'center'}"></auto-link>

For more usages, check out autolink.js

License

MIT © EGOIST

Related Packages

vue-linkify

A simple Vue directive to turn URL's and emails into clickable links

294,529
v-linkify

A simple Vue directive to turn URL's and emails into clickable links

11,676 3
@linksense/vue

Vue composables for URL platform detection — useLinkSense, useDetectAll, useNorm...

915
@scayle/nuxt-image-provider

An image provider to handle SCAYLE-specific modifiers

99,945
vue-linkify-vue3

A simple Vue directive to turn URL's and emails into clickable links. Maintained...

7,558 0

Version History

Version Released Vue License
0.0.11 ^1.0.10 MIT
0.0.1 ^1.0.10 MIT