This is a visual representation of my component:
<template>
<div v-html="someHtml"></div>
</template>
<script>
export default {
name: "test",
props: {
someHtml: String,
},
}
</script>
Here is how the component is utilized in storybooks:
export const testtest = () => ({
components: {test},
props: {
someHtml: {default: text('somehtml', '<a href="link" class="link text-theme">see data</a>')}
},
template: `
<test v-bind="$props"/>
`,
});
The output is always an HTML raw string like this ==>
<a href="link" class="link text-theme">see data</a>
Although the documentation provides clear instructions on usage, I am still facing issues.
I am passing raw HTML as a prop. When using raw HTML from Vue.js data, it works and correctly renders the parsed HTML string.