by Marcus Green.
Thank for the feedback Tim. Am I right in thinking that base64 encoded images that you paste in would work without that code but a link to a Moodle file system image would not. The reason I ask is that the jiggery pokery I do to the content of the question text (rather than the introduction text) breaks links to moodle image files, but pasted in images work fine.
I realised my "a great advert for using an IDE" comment might be a bit obscure, I meant it made searching through the code easy to find that solution.