You should:
* write an event listener
* listen to org.xwiki.bridge.event.DocumentUpdatedEvent and
org.xwiki.bridge.event.DocumentCreatingEvent events
* directly modify the XWikiDocument instance you receive with the event

See 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local
for more about events and listeners.

On Tue, May 10, 2016 at 10:49 PM, Wei He <weihe...@gmail.com> wrote:
> Hi,
> I want to modify document content while user is saving a document, for
> example: [[PageA]] will be replaced by [[PageA.WebHome]]. I want to write a
> component extension to do that. Which component should I look into?
>
> Thanks,
> Wei
>
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Document-save-hook-to-modify-content-tp7599396.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to