In confluence there is very handy functionality, that I miss in xwiki. When user pastes a picture to the CKeditor, the image (when viewed later on the page) is by default clickable and linked to the attachement (and displayed using lightbox).
I m trying to implement the same in xwiki as it saves ton of work.
Basically I want pasted image [[image:myimage.png||width=“100"]] to be always displayed as [[[[image:myimage.png||width=“100"]]>>attach:myimage.png]]
In the old post in the mailing list it is suggested to use DefaultXHTMLImageRenderer - in this case probably AttachmentXHTMLImageTypeRenderer (probably to generate extra A tag around IMG?)
In XWiki, page content is parsed as a DOM of elements (we call it a XDOM) and when rendering an XDOM to a syntax (XHTML in this case), we generate events, and we have Listener or Renderer (a Renderer is a Listener) to decide what to generate for each element (paragraph, images, etc).