I am trying to create a code snippet builder in Vue.
When I enter a URL into a text box, I want the URL to be inserted into an HTML template, which can be copied and pasted into an HTML document. The main issue here is getting the output as raw HTML (like you would see in
and tags in a Medium tutorial).
Code I've tried (CodePen):
const Child = {
name: 'Child',
template: `
props: {
value: String
}
}
new Vue({
el: '#app',
components: {
Child
},
data () {
return {
myUrl: ''
}
}
})
Desired outcome:
Previously using AWS SES and Node, I inserted a variable into a code block as ${myURL}. Not sure whether this approach is compatible with Vue.