phanan / vue-linkify

A simple Vue directive to turn URL's and emails into clickable links
83 stars 16 forks source link

Does this plugin can work with SSR? #3

Open applecat opened 7 years ago

applecat commented 7 years ago

I tried this plugin with Nuxt.js. Everything works fine except SSR - plugin works only on client side. Can vue-linkify prepare HTML on server side? Thanx.

plugins/vue-linkify.js:

import Vue from 'vue'
import linkify from 'vue-linkify'
Vue.directive('linkified', linkify)

template:

<p v-html="studio.text" v-linkified:options="{ nl2br: true }"></p>
2xAA commented 6 years ago

I've written a Vue component for Linkify which works for SSR also. It can be found in the fork mentioned in this Issue: https://github.com/SoapBox/linkifyjs/issues/232