Coder Social home page Coder Social logo

hrankit / vue-linkify-hashtags-mentions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phanan/vue-linkify

1.0 1.0 0.0 135 KB

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

JavaScript 100.00%
vue vuejs component directive url urlify link linkify mentions mention hashtag hashtags

vue-linkify-hashtags-mentions's Introduction

Fork of https://github.com/phanan/vue-linkify

A simple Vue directive to turn URL's and emails into clickable links. Based on SoapBox's Linkify.

Install

Basic Usage

In a browser environment, you should now have a v-linkified directive set up for free. If you're in a module environment, just import and register it as you please:

import linkify from '/your-path/to/vue-linkify'

Vue.directive('linkified', linkify)

And then you use it away:

<template>
  <div id="app">
    <div v-html="raw" v-linkified />
  </div>
</template>
<script>
export default {
  data () {
    return {
      raw: 'Hello from vuejs.org #India @hrank8t'
    }
  }
}
</script>

The above snippet will yield:

Hello from <a href="http://vuejs.org" class="linkified" target="_blank">vuejs.org</a> <a href="/hashtag/India" class="hashtag">#India</a> <a href="/mention/hrank8t" class="mention">@hrank8t</a> 

A list of available options is available here.

License

MIT © HRAnkit

vue-linkify-hashtags-mentions's People

Contributors

phanan avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.