[pull] develop from marktext:develop - #109
Merged
Merged
Conversation
…ey out menus) (#4810) * fix(desktop): suppress paragraph/format edit commands in source mode The paragraph edit commands (Insert Table wizard, duplicate/create/delete paragraph) and inline format commands still ran in source-code mode, where they operate on the hidden WYSIWYG engine rather than the visible CodeMirror source — e.g. the Insert Table wizard opened and wrote to the invisible editor. Guard handleEditParagraph, handleParagraph and handleInlineFormat on sourceCode, mirroring handleUndo/handleSelectAll. Fixes #3531 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(desktop): grey out Paragraph/Format menus in source-code mode The Paragraph and Format menu commands act on the hidden WYSIWYG engine, so in source-code mode they either silently mutate the discarded engine or (for the table wizard) spawn an inert invisible dialog. Disable the whole Paragraph and Format menu entries when entering source mode and re-enable them on return, so they are clearly unavailable there. The renderer-side handler guards remain as defense-in-depth. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(desktop): re-apply cursor-context menu state when exiting source mode On returning to WYSIWYG, re-apply the Paragraph/Format menu state for the current cursor (a code block or table still disables some items) instead of blanket-enabling everything. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Invoking "New File" on a collapsed folder did nothing. The create input only renders inside the folder's expanded contents, but handleInputFocus guarded the expand (isCollapsed = false) behind `if (input.value)` — which is null while collapsed — so the folder never expanded and no input appeared. Scope the handler to the create-target folder and expand it first, then focus the input on the next tick once it has rendered. Fixes #3439 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-pressing Find (Cmd/Ctrl-F) while the bar was already open only re-focused the input, leaving the caret after the existing term so the next keystroke appended to it. Select the input's contents after focusing so the current term is highlighted and a keystroke types over it. Fixes #3458 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#4805) The Header & Footer export branch re-sanitized the whole assembled document with the export DOMPurify config. That config strips the <foreignObject> mermaid renders its node labels into, so enabling Header & Footer silently dropped diagram content; exporting the same document without Header & Footer was fine because that branch never re-sanitized. The article is already sanitized by the engine during render, so re-sanitizing it is both redundant and lossy. Sanitize only the user-supplied header/footer text fields instead, and leave the rendered article untouched. Fixes #3359 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The font picker populated its suggestions only from the OS font list, but MarkText's defaults — Open Sans (editor) and DejaVu Sans Mono (code) — are bundled via @font-face and are not installed system fonts. So once a user switched away they could never reselect the bundled default. Prepend the bundled font(s) for the matching picker (proportional vs monospace), de-duplicating any that happen to be installed. Fixes #3021 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
) The Edit menu's screenshot entry is macOS-only (`visible: isOsx`), but the separator after it stayed visible on Windows/Linux. With the screenshot hidden, that left two adjacent separators — a doubled divider — between "Find in Folder" and "Line Ending". Gate the trailing separator with `visible: isOsx` so it collapses with the entry it belongs to. Fixes #2997 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(desktop): generate a PDF outline from headings on export Exported PDFs had no navigation/bookmark pane. Electron's printToPDF supports generateDocumentOutline, which builds a clickable outline tree from the document's h1-h6 headers; muya already emits real heading tags, so enabling it gives exported PDFs a heading-based navigation pane. Fixes #2989 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(desktop): add generateTaggedPDF so the PDF outline is actually generated generateDocumentOutline alone is a no-op — Chromium builds the outline from the tagged-PDF structure tree, which only exists when generateTaggedPDF is also set. Verified: with only generateDocumentOutline the PDF has no /Outlines; adding generateTaggedPDF produces /Outlines + /StructTreeRoot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When exporting to PDF or printing, a page could break immediately after a heading, stranding it at the bottom of a page away from its content. Emit `break-after: avoid` (and `break-inside: avoid`) for h1-h6 in the printable stylesheet so a heading stays with the content that follows it and multi-line headings aren't split. styledHtml export is unaffected. Fixes #3039 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
) When MarkText is launched from Finder/GUI (not a login shell), macOS and Linux don't inherit the user's shell PATH, so /opt/homebrew/bin, /usr/local/bin and other standard bin dirs are missing. CLI tools such as pandoc then fail to be found during import/export even though they are installed. patchEnvPath only appended /Library/TeX/texbin on darwin. Extend it into an electron-free envPath module that merges the Homebrew and standard bin dirs on darwin/linux (mirroring the picgo uploader's PATH handling), de-duplicating existing entries and leaving win32 alone. Fixes #2751 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )