Description
XWIKI-9120 has added new methods to AttachmentDiff that expose the protected XWikiAttachment instances. But AttachmentDiff is exposed to the public scripting API through api.Document#getAttachmentDiff() (used by the History UI when comparing two document versions) which means we can now access the protected XWikiAttachment instances from Velocity.
$doc.getAttachmentDiff($oldDoc, $newDoc).get(0).getOrigAttachment()
Attachments
Issue Links
- blocks
-
XWIKI-9785 If attachment is of type 'text' (js, css, txt, etc.) allow the user to enable the diff across history
- Closed