In confluence I need to change text on a page into an image Inside of a table i have multiple values that need to be replaced by an image. So i created following Jquery and put it into a usermacro.
<script>
AJS.toInit(function() {
AJS.$("body").html($("body").html().replace(/text to be replaced/g,'<img src="image.png">'))
});
</script>
This works fine to change the text with the image. But it breaks the left menu when put in a macro. When i run the line AJS.$("body")... directly in developer tools in the console from google chrome it does not break the menu.
I can't seem to figure out how to solve this. Anyone have an idea?