I have an component which basically takes everything from input and renders the html:
<template>
<div>
<input type="text" v-model="html">
<VRuntimeTemplate :template="html" />
</div>
</template>
<script>
import VRuntimeTemplate from 'v-runtime-template'
export default {
data: () => ({
html: ''
}),
components: {
VRuntimeTemplate
}
}
</script>
Now when I start to type then it will obviously throw me the error saying the input value doesn't have closing or ending tag.
Is there a way to validate HTML beforehand? It works fine with v-html
but there's a problem with third party modules.
Sandbox: https://codesandbox.io/s/vruntimetemplate-27bdz?fontsize=14