in my wiki I want to insert big pictures, which should be displayed small, but shown in full size when clicked on them. There are macros (lightbox, for example) which achieve exactly that.
Is there a way to modify the default editor behavior on copy/pasting of images? (so that the pasted image is not put between [[image: and ]], but between the macro tags)
OK, I have not found anything helpful yet.
What I have thought about now is to implement a job (using the scheduler) which replaces all the default image tags with lightroom macro ones.
Does anyone know a proper tutorial for writing such jobs (iterating through articles and replacing source text)?
Hi. That would be a really bad solution with lots of limitations
If you don’t want option 1 (which is the simplest by far IMO) then you could implement an XWiki Event Listener that listens to DocumentModifiedEvent (and DocumentCreatedEvent). There are some tutorials on xwiki.org about that.
See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/SkinExtensionsTutorial/ for the JSX in XWiki. As for the javascript to write you’ll have to figure it out yourself since the code doesn’t exist yet. Or wait for xwiki devs to implement it, or sponsor the feature (or write the Event Listener). But it’s really not hard, I’m sure you could even find existing JS libraries that would do it for you.