Target activity with <svg> tag or runtime content | Community
Skip to main content
Level 3
February 24, 2025
Question

Target activity with <svg> tag or runtime content

  • February 24, 2025
  • 1 reply
  • 312 views

Hi All,

 

We are trying to create activity changing text related with <svg> tag but it's breaking the functionality of it.

it looks like to me that it's kind of runtime thing and changes to it breaks the communication of existing code.

 

 

Is there any work around for this?

1 reply

New Member
February 26, 2025

Hi @rudrawiley

As per your screen shot, you are trying to change to change the SVG attribute which contents tooltip HTML content correct ?

This can be achieved through below script on form based approach.

<script> // Get the popover element var updatePopover = $('.icon-info[data-bs-toggle="popover"]'); // Update the popover customized content and title updatePopover.attr('data-bs-content', 'Customized text content '); updatePopover.attr('data-bs-title', 'Customized text content'); // Update the popover using Bootstrap's API var popoverInstance = new bootstrap.Popover(updatePopover[0]); popoverInstance.update(); var popoverTriggerList = [].slice.call( document.querySelectorAll('[data-bs-toggle="popover"]')) var popoverList = popoverTriggerList .map(function (popoverTriggerEl) { return new bootstrap.Popover(popoverTriggerEl) }) </script>

Hope this helps !