To display this as html and not string you can use the v-html attribute
v-html="yourTextVariable"
For example
<p v-html="yourTextVariable"></p>
Hello everyone , so right now, I am developing a Laravel-Vue website, and I am trying to make a news/event page. The contents of the blog or news I can simply output from the database without a problem, my problem is the inconsistency of the styling of each different blog since they might have different number of titles and sub-titles inside the blog text since it might depend on the number of paragraphs etc..., some words of the content of the blog might be desired to be enlarged or be bold or underlined since its a title , the titles are not consistent between blogs in order to surround a part of the output with tags or any different styling ,do anyone know how to solve that problem?
thank you for your help
@john123 First you should look into adding a RichTextEditor that gives you the sytling options you need. There are multiple editors for this available with each their available styling options.
Personally I use SunEditor but there are also others like Quill Js, WYSIWYG Editor, CK Editor, TinyMCE, ... You should check multiple and see which one fits best to your needs and for your application.
When you've installed a RichTextEditor for you application you can use this as a kind of 'TextArea' in your form.
After the form has been saved to the database you can use the v-html attribute to display the styled text.
Please or to participate in this conversation.