windingwind/zotero-plugin-template

Changing Report Look

themetalleg opened this issue · 4 comments

Hi, is there at the moment a way to change the look of the reports? To include costum fields for example or show images? I was not able to find anything in the documentation.

Sorry for the delayed reply.

I am not sure what you mean by the report. Could you please give some screenshots or detailed descriptions?

screenshot

No problem. Here is the screenshot. I mean the windows that opens, when you click "Generate Report from Items...".

I am not sure why or how you want to change this window. Seem like you have to use a window open listener to trigger some style/script injection when this generating report window is opened.

An example from the toolkit: https://github.com/windingwind/zotero-plugin-toolkit/blob/43141190c7b85091fe5058bf253d1e97b13bec6e/src/managers/preferencePane.ts#L203-L280

However, I would suggest not modifying existing windows or modules of Zotero, unless you fully understand what you are doing. Adding new features is safe in most cases, while changing inner modules may cause unexpected errors or data loss unless you are sure you handled everything very well.

If you only want to make the report UI more user-friendly or beautiful, it's OK to inject some CSS; otherwise, I would recommend you add a new option for users to open a new window provided by your plugin/generate the report you want.

Yeah ok, that makes sense. Thank you. Will go this way.