Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting or Printing Note Excludes Reference List #28

Open
chk86 opened this issue Aug 31, 2021 · 3 comments
Open

Exporting or Printing Note Excludes Reference List #28

chk86 opened this issue Aug 31, 2021 · 3 comments

Comments

@chk86
Copy link

chk86 commented Aug 31, 2021

I just started using this plugin and it works wonderfully. I did notice that in the side-by-side editor layout, the viewer screen shows a References list containing the citation for all the references in the note. However, when I either print the note or export the note, that References list is not included. I included a screenshot of the References List in the viewer mode. I did try exporting it as a PDF, html, and markdown, and none of them included the list.

Screen Shot 2021-08-31 at 1 53 40 PM

@extall
Copy link

extall commented Sep 9, 2021

+1. Pity I did not pay attention to this issue until I rediscovered it with my students during a live demonstration.
I guess for now the solution is to copy rich text from the preview into a context that supports rich text (e.g., ms word). But then, if you're using a dark theme like we apparently do, you have to also change the style or paste as plain text and then fix the style.

@laurent22
Copy link
Member

laurent22 commented Sep 9, 2021

Yes that was discussed here and the reason why I was trying to encourage the use of a [citation] tag that would then be rendered. Right now the plugin is doing some magic to display the references, and that magic doesn't happen when printing.

@extall
Copy link

extall commented Sep 14, 2021

Yes that was discussed here and the reason why I was trying to encourage the use of a [citation] tag that would then be rendered. Right now the plugin is doing some magic to display the references, and that magic doesn't happen when printing.

I've studied the code, the Joplin plugin API, the linked discussion, and the way MarkdownIt works.
I wonder how else you would pass the data about the cited references loaded from the file from the plugin to the contentScript for rendering purposes if not through the webviewApi.postMessage() by executing the script that upon fetching the data from the plugin adds the references into the desired placeholder in the generated HTML?

Looking at the HTML export, the script does not get executed prior to export and so what we see in the exported file is a call to webviewApi which is no longer valid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants