'How to pass text with <b> tag having bold effect in <v-textarea> from the data() of vue app?
I am trying to pass text to v-textarea from data() in a vuetify project. The text inside the textarea appeears along with the bold tags which i dont want but instead i want the text to be in bold format. But the text outside textarea is in bold.
<template>
<div>
<v-textarea v-model="value"></v-textarea>
<p v-html="value"></p>
</div>
</template>
</div>
</template>
<script>
export default {
data() {
return {
value: "<b>This is the value</b>",
};
},
};
</script>
Solution 1:[1]
just move <b> from data value direct to the template
<template>
<div>
<v-textarea style="font-weight:bold" v-model="value"></v-textarea>
<p><b>{{value}}</b></p>
</div>
</template>
</div>
</template>
<script>
export default {
data() {
return {
value: "This is the value",
};
},
};
</script>
and then configure textarea with css to be bold
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

