Display XSweet result in front end
The first step of using XSweet in the frontend is to trigger the creation of the 'source' file when a docx is uploaded as the manuscript (file with type: 'manuscript'
, there should only be one that is not deleted).
You can see the upload-files component for how this currently works. This component triggers a couple of relevant graphql mutations, uploadFiles
and replaceManuscriptFile
, which through their resolvers each call the uploadFiles
function in server/xpub-model/entities/file
.
Probably the most efficient way to make this work is to trigger the function you've written in that function if the manuscript file uploaded is a docx (uploadFiles in
server/xpub-model/entities/file`).
The front end SHOULD already be set up to show the source file once it exists. But you can double check! Both submission-wizard/Submit
and review-wizard/Review
should use the source type file when calling the ManuscriptPreview component. This component (ManuscriptPreview) should load and display the html.