This should do the trick:
[tooltip("<img style=\"height:12px\" src=\"[buy.Cons.PowerCharge.img]\"/>", "example text")]
There are a couple of gotchas here which are easy to trip on:
- Since we're writing code inside a square block, we don't need to backlash before the equals signs.
- Since we're using quotes-within-quotes, we need to put backslashes before the inner quotes.
For the second issue, you can actually use single quotes for the outer quotes instead, which means you don't need to backslash the inner quotes:
[tooltip('<img style="height:12px" src="[buy.Cons.PowerCharge.img]"/>', "example text")]
Pro tip: This, btw, is just regular JavaScript stuff (the syntax/code inside square blocks is always just executed as JavaScript), rather than anything specific to the perchance engine itself, so you can ask an AI something like:
why isn't this javascript working? tooltip(<img style="height:12px" src="[buy.Cons.PowerCharge.img]"/>, example text)
And it should give you an answer even if it doesn't know anything about perchance (though it may be a bit confused by [buy.Cons.PowerCharge.img] because that's perchance syntax, and it probably expects to see a plain https url there in place of that).