You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 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 pandocseems 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.
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
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!
Thanks for the suggestion! This is supported in current MarkText. There is a configurable keybinding system: PDF export ships with a default shortcut (Ctrl+Alt+E) and, more importantly, you can assign/customize the shortcut yourself. Open your keybindings.json (Preferences > Keybindings, or the keybindings config file in your user data dir) and add an entry such as "file.export-file.pdf": "Ctrl+P" — changes take effect without restarting. The export commands are also available from the command palette. Note: only PDF currently has a bindable command id by default; a dedicated HTML-export keybind isn't wired up yet, so if that specific part still matters to you, please open a focused issue (or reopen) and we can add the file.export-file.html binding id. Closing as implemented for the PDF case.
Activity
LeoUpperThrower4 commentedon Aug 1, 2022
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 > HTMLyou still can change to PDF without having to close the window and reopening it. If this was accepted, we could also remove theExportsubmenu and have it`s title changed to something like "Export As...".What you think of that?
Sam-OT commentedon Apr 25, 2023
@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,
I've tried things like using
pandocwith MarkText-provided.cssfiles. But, I haven't been able to make anything look the same, or as nice. MarkText is super fast, too, whilstpandocseems 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.batfiles to automatically export my.mdfile into.pdfand.html, without having to go via the menus.Cheers!
LeoUpperThrower4 commentedon May 2, 2023
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
Sam-OT commentedon May 2, 2023
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!
Jocs commentedon Jul 2, 2026
Thanks for the suggestion! This is supported in current MarkText. There is a configurable keybinding system: PDF export ships with a default shortcut (Ctrl+Alt+E) and, more importantly, you can assign/customize the shortcut yourself. Open your
keybindings.json(Preferences > Keybindings, or the keybindings config file in your user data dir) and add an entry such as"file.export-file.pdf": "Ctrl+P"— changes take effect without restarting. The export commands are also available from the command palette. Note: only PDF currently has a bindable command id by default; a dedicated HTML-export keybind isn't wired up yet, so if that specific part still matters to you, please open a focused issue (or reopen) and we can add thefile.export-file.htmlbinding id. Closing as implemented for the PDF case.