1👍
Try using v-html directive instead of v-text on your HTML.
<div class="line" v-if="lyrics.show" v-html="lyrics.currentLine"></div>
-1👍
There are two main ways to create elements in Javascript. The first is to use createElement()
function:
const div = document.createElement("div");
div.innerHTML = "I'm a div";
div.id = "myDiv";
document.body.appendChild(div);
#myDiv{
color: red;
}
The second is to use the innerHTML
property on an existing element:
const div = document.getElementById("myDiv");
div.innerHTML = "<p>I'm a p tag</p>";
p{
color: green;
}
<div id="myDiv"></div>
- [Vuejs]-Laravel vue Column not found: 1054 Unknown
- [Vuejs]-Trouble downloading mp3 files from S3 using Amplify/Node
Source:stackexchange.com