I've been utilizing the v-html tag to display HTML in my Vue pages. However, I came across a string that was a complete HTML file with content like this:
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
....
<style>
</style>
</head>
<body style="....">
</body>
</html>
The issue is that when I use v-html on a div, the code starts affecting the entire page and adds its styling to the whole page instead of just that specific div.
I attempted adding "scope" to the style tags, but it didn't work. Perhaps because there's also an inline style tag on the body?
I'm searching for a solution to ensure that the HTML only affects the div it's placed on and not the entire page.