Is there a way to convert HTML to plain text using vuejs?
<ol>
<li>The quick brown fox jumps over the lazy dog</li>
<li>The quick brown fox jumps over the lazy dog</li>
<li>The quick brown fox jumps over the lazy dog</li>
<li>The quick brown fox jumps over the lazy dog</li>
</ol>
I attempted to use v-html
, but it parsed the HTML string like this:
1. The quick brown fox jumps over the lazy dog
2. The quick brown fox jumps over the lazy dog
3. The quick brown fox jumps over the lazy dog
4. The quick brown fox jumps over the lazy dog
However, I want the result to be plain text, not HTML-formatted.
The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog
I have seen solutions for achieving this with AngularJS
and JavaScript
, but not with Vuejs
.
Note: I do not use jQuery
in my project.