0

Sample HTML code

<img  id="PartId" title="Test Part" class="visible-lg visible-md visible-sm" onclick="func1();" src="../theme1/buttons/add.png">

<i class="material-icons">add_circle</i>

I don't want to display the image from the path, but to display material icon instead in the image control

Please help!

InteXX
  • 6,135
  • 6
  • 43
  • 80
Sreeni C
  • 1
  • 3
  • Please clarify what you mean when you "don't want to display the image from the path, but to display material icon instead in the image control"? Are you trying to place the Add icon inside the image container? – Ivan Kahl Jan 31 '20 at 14:23
  • Yes, I want to display icon in the container and not the image from the url – Sreeni C Jan 31 '20 at 14:28
  • Don't use the "image control". Just use the `add_circle` HTML. – Heretic Monkey Jan 31 '20 at 14:28
  • Use a `
    ` for your container or something similar and then just place the `add_circle` in there. Don't use the component
    – Ivan Kahl Jan 31 '20 at 14:29
  • It is HTML image control only – Sreeni C Jan 31 '20 at 14:30
  • Its difficult to remove the img control as there are some dependencies and its been used many places in the code base – Sreeni C Jan 31 '20 at 14:34
  • Assuming that you never searching it by img but from id, you can change tag with a simple
    and remove src property and put the icon inside it.
    – gsimo83 Jan 31 '20 at 15:37
  • Thank you all who reviewed and tried to help with this question. Replacing the tag to div on run time would run into more issues later, one solution would be to use a different control which supports material design icon tag so that it can be used as it is.. but it may need more testing. – Sreeni C Feb 03 '20 at 11:13

0 Answers0