1.7.1 • Published 5 years ago

vue-autolink-component v1.7.1

Weekly downloads
23
License
MIT
Repository
-
Last release
5 years ago

vue-autolink-component

Probably the easiest autolink solution for Vue.js

Features & characteristics:

  • convert url to 'a tag'.
  • consider \n.

Install & basic usage

npm install vue-autolink-component
<template>
  <div>
    <VueAutolinkComponent :message="text"></VueAutolinkComponent>
  </div>
</template>

<script>
import VueAutolinkComponent from "vue-autolink-component";
import "vue-autolink-component/dist/vue-autolink-component.css";

export default {
  components: {
    VueAutolinkComponent
  },
  data() {
    return {
      text: `a text including URL
      like https://www.google.com/`
    };
  }
};
</script>

The output will be

output

If you would like to change styles for linked word, just do like below.

<style scoped>
.vue-autolink-component >>> .vue-autokink-component__link {
  /* Note! this is a default setting. */
  color: #0026ca;
  cursor: pointer;
  text-decoration: none;
}
</style>
1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago