Page 1 of 1

Reload Content After Save

Posted: Thu Nov 16, 2023 10:58 pm
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?

Re: Reload Content After Save

Posted: Mon Nov 20, 2023 1:11 pm
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