marktext icon indicating copy to clipboard operation
marktext copied to clipboard

[FR] Export to PDF/HTML Keybind Option

Open backpack5689 opened this issue 3 years ago • 1 comments

Description

Feature Request: I would love to see the ability added to the keybinds to set keybinds for exporting to PDF, as I do this a lot to send markdown files to co-workers.

Steps to reproduce

N/A

Expected behavior:

Do a keybind that you set, and the window to export to a PDF comes up.

Actual behavior:

N/A

Versions

  • MarkText: v0.17.1
  • Operating system: Windows 10

backpack5689 avatar May 05 '22 13:05 backpack5689

Nice suggestion! I just created the pull request. I was also thinking we could add a switch button to change between HTML and PDF directly in the export window, so even tough you select File > Export > HTML you still can change to PDF without having to close the window and reopening it. If this was accepted, we could also remove the Export submenu and have it`s title changed to something like "Export As...". What you think of that?

LeoUpperThrower4 avatar Aug 01 '22 03:08 LeoUpperThrower4

@LeoUpperThrower4 Thanks for doing this. It really would be an excellent feature. It seems that this project isn't so actively maintained, and your update is unlikely to get reviewed any time soon. Would it be fairly straightforward for me to pull your changes onto my own copy? I'm not knowledgeable regarding building programmes or anything. I had a look through the installed files, but it was far from obvious to me what I should do.

Alternatively,

Do you know what code MarkText uses to actually make the export?

I've tried things like using pandoc with MarkText-provided .css files. But, I haven't been able to make anything look the same, or as nice. MarkText is super fast, too, whilst pandoc seems to compile via LaTeX? I'm intentionally not using LaTeX to write these super-lightweight files, but sometimes people want me to send them PDFs, not Markdown files. If I knew some command, I could create a .bat files to automatically export my .md file into .pdf and .html, without having to go via the menus.

Cheers!

Sam-OT avatar Apr 25 '23 17:04 Sam-OT

Hey Sam! Yeah, unfortunately this project is not maintained. Feel free to get my changes! I'm sorry, but I don't know that much on how this project works under the hood

LeoUpperThrower4 avatar May 02 '23 13:05 LeoUpperThrower4

Thanks, @LeoUpperThrower4. I'll check out how to accept someone's MR on my own copy. I'm not super familiar with Git Hub... Cheers for making the changes!

Sam-OT avatar May 02 '23 13:05 Sam-OT