Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Bold word in a text

I would like to put in bold key words found in a paragraph.

Here my code for the moment :

       <div v-for="item in data.description" :key="item">
          {{item}}
       </div>

Item is all the sentences of my description.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

On my interface I have for example the following text:

125.475 mhz will not be avbl. pilots requesting flight information During this period may contact london control on the notified h24
Frequencies in the aip page enr 2.1

I would like to put in bold the word "frequencies" just in the sentence where there is this word.

Do you know how to do that ?

Thank you

>Solution :

Replace

{{item}}

with

<span v-html="item.replaceAll('frequencies', '<b>frequencies</b>')"></span>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading