Vue Storefront v-html router

Description
v-html link router component for Vue Storefront

When using data from extenal resources, e.g. Magento CMS Pages and CMS Blocks, if the content has links, they will do a refresh to access the link. With this, it will find links in the CMS Page Content, intercept their click event and use Vue Router to go to these links without refresh.

This only works with relative links, e.g. /home, if link is specified with http/s, it will do a redirect with a refresh.

Features overview
Main and only feature is that this allows to use router on v-html elements, only by adding ref to an element and a mounted function. This works as a Mixin.

Author: Magebit | Emils Malovka

Create date: 2019-07-11

Contact: info@magebit.com

Github repo: https://github.com/EmilsM/v-html-router