I am rendering an with a directive using vue-markdown.
When my App loads, it seems that my Vue instance is not parsing my rendered tag and thus not calling the appropriate directive.
I'm wondering if there is a prop i need to pass to the vue-markdown instance that will allow the Vue parser to pick up my 'nested' directive.
see example below.
const Foo = Vue.directive('foo', el => console.log('Element with directive', el));
new Vue({
el: '#app',
components: { VueMarkdown },
directives: {
Foo
}
})
<template>
<div id="app">
<vue-markdown :html="true" source="<a href='/foo' v-foo>I have a directive</a>"></vue-markdown>
// ^output^ <a href="/url" v-foo>I have a directive</a>
// This <a /> is NOT registered as an element with a directive and NOT logged out.
<a href="/anotherURL" v-foo>I also have a directive</a>
// ^This^ IS registered as an alement with a directive and logged out.
</div>
</template>```
I am rendering an with a directive using vue-markdown.
When my App loads, it seems that my Vue instance is not parsing my rendered tag and thus not calling the appropriate directive.
I'm wondering if there is a prop i need to pass to the vue-markdown instance that will allow the Vue parser to pick up my 'nested' directive.
see example below.