B
B
BogdanZots2021-10-17 14:07:47
Yandex maps
BogdanZots, 2021-10-17 14:07:47

How to set yandex map api iconCaption inside with html tags?

Hello everyone , how to set the text nested in html tags inside iconCaption in Placemark ?
Right now I'm creating a Placemark like this:

<Placemark
                    geometry={coordinate}
                    properties={{
                      iconContent: "Название кофейни",
                      balloonContent: "цвет <strong>голубой</strong>",
                      iconCaption:`Назнавие<strong>${cofeePlaces[i]?.name}<br>Text</strong>`, // тут я хочу сделать html теги . 
                    }}
                    options={{
                      preset: "islands#blueFoodCircleIcon",
                      iconCaptionMaxWidth: "250",
                    }}
                  />

I want iconCaption to have the following structure:
`Название <Какого нибудь html тега>
${text}
<br>Text
<Закрытие тега>`

Now I have html tags along with the text displayed in plain text. What am I doing wrong ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question