A plugin that can be used to parse urls into anchor tags.
npm i -S embed-js embed-plugin-url
https://unpkg.com/embed-plugin-url
Parsing urls into anchor tags.
import EmbedJS from 'embed-js'
import url from 'embed-plugin-url'
const x = new EmbedJS({
input: document.getElementById('element'),
plugins: [
url({
attributes: {}, // a hash of attributes to be added in the url
escape: false // whether on not to escape special characters in url
})
]
})
Note : Avoid using escape: true
when using with highlight plugin.
MIT @ Ritesh Kumar