Reload Content After Save

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
lhopkins
Posts: 4
Joined: Thu Nov 16, 2023 10:28 pm

Reload Content After Save

Post by lhopkins »

Hi,

I have a plugin that performs a XSLT then reloads the editor content on button click. I would like to modify the behavior to run the XSLT when the user clicks the Save button but before the Save occurs, then reload the new saved document with the result of the XSLT.

Using the SaveHookExtension, I have been able to perform the transform inside the editorAboutToBeSavedVeto function, but I am unable to reload the contents of the editor, or even the entire webpage after the transform has been done and the document saved.

Is there a way to do this using ReloadContentOperation or editorAccess.reloadContent(newReader, true); inside the editorSaved function?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Reload Content After Save

Post by Radu »

Hi,
Maybe this sample plugin is closer to what you want:
https://github.com/oxygenxml/wsaccess-j ... XSLTFilter
It's implemented in Javascript but the Javascript calls our Java APIs so you should be able to reuse the idea from here:
https://github.com/oxygenxml/wsaccess-j ... sAccess.js
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply