2) removing the "Add Alt text" and "remove" icons from the image annotation:
document.querySelector('div.editToolbar').style.display = "none";
However both these don't seem to work - I spent hours trying to debug this but couldn't get anywhere. Maybe I am missing something very simple - so would appreciate if somebody could point out what's wrong.
I was trying to do two things to an image annotation that is programatically added : 1) adding an event handler on clicking the annotation:
document.querySelector('div.stampEditor')?.addEventListener('click', (evt) => {console.log("clicked annotation")});
2) removing the "Add Alt text" and "remove" icons from the image annotation: document.querySelector('div.editToolbar').style.display = "none";
However both these don't seem to work - I spent hours trying to debug this but couldn't get anywhere. Maybe I am missing something very simple - so would appreciate if somebody could point out what's wrong.