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

Markdown Preview output is not rendered when exporting to PDF #98

Closed
frvkl opened this issue Feb 23, 2021 · 4 comments
Closed

Markdown Preview output is not rendered when exporting to PDF #98

frvkl opened this issue Feb 23, 2021 · 4 comments
Projects
Milestone

Comments

@frvkl
Copy link

@frvkl frvkl commented Feb 23, 2021

When exporting a note to PDF in Obsidian, the output is not printed to the PDF. Instead the codeblock is printed to the PDF.

To Reproduce
Steps to reproduce the behavior:

  1. Add Todoist codeblock to a note
  2. Check if output is shown correctly in Markdown preview mode.
  3. Export the note to PDF
  4. See codeblock printed on PDF instead of the markdown output

Expected behavior
The Markdown Preview output printed to the PDF

Screenshots

Editor:
shot_210223_204727

Markdown Preview
shot_210223_204906

Rendered in exported PDF
shot_210223_204657

Desktop (please complete the following information):

  • Plugin v1.7.0
  • Obsidian v0.11.0

Additional context
I inquired in the Obsidian forum: https://forum.obsidian.md/t/plugin-output-from-codefence-not-rendered-in-pdf-export/13497
The moderator asked me to submit a ticket here.

@jamiebrynes7
Copy link
Owner

@jamiebrynes7 jamiebrynes7 commented Feb 24, 2021

As far as I'm aware, plugins cannot modify the PDF rendering output. At least, there doesn't seem to be any references to it in the plugin API.

Obsidian would need to expose hooks for that process before I can implement this.

@argenos
Copy link

@argenos argenos commented Feb 24, 2021

Here's a tip from Licat:

The PDF export "waits" for some async tasks to execute. If the plugin author didn't properly return the async task, then we won't wait for them to render their portion, so nothing gets rendered. Specifically for the todoist plugin, they should mark this function as async and wait for the query to execute so that we can properly render the PDF:

onNewBlock(el: HTMLElement, ctx: MarkdownPostProcessorContext) {

@leovannier
Copy link

@leovannier leovannier commented Mar 8, 2021

Hi Jamie, +1 for this feature.

@jamiebrynes7 jamiebrynes7 added this to the Release v2.0 milestone Mar 22, 2021
@jamiebrynes7 jamiebrynes7 added this to Release v2.0 in Roadmap Mar 22, 2021
@frvkl frvkl closed this Jun 16, 2021
@jamiebrynes7
Copy link
Owner

@jamiebrynes7 jamiebrynes7 commented Jun 17, 2021

Going to leave this one open @frvkl, as it seems you're not the only one that might want this.

@jamiebrynes7 jamiebrynes7 reopened this Jun 17, 2021
@frvkl frvkl closed this Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Roadmap
Release v2.0
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants