Skip to content

[FR] Export to PDF/HTML Keybind Option #3245

Closed

Description

@backpack5689

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

Activity

  1. LeoUpperThrower4 commented on Aug 1, 2022

    @LeoUpperThrower4

    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?

  2. Sam-OT commented on Apr 25, 2023

    @Sam-OT

    @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!

  3. LeoUpperThrower4 commented on May 2, 2023

    @LeoUpperThrower4

    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

  4. Sam-OT commented on May 2, 2023

    @Sam-OT

    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!

  5. added
    🦄 feature request
    🕊️ export/pdf
    on May 16, 2026
  6. Jocs commented on Jul 2, 2026

    @Jocs
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🕊️ export/pdf🦄 feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions