Conversation
added 6 commits
September 6, 2026 16:38
Collaborator
Collaborator
|
维护者决定不做这个方案,关闭本 PR。投入很大,所以把判断说清楚,不是质量问题,是方向问题:
图片本地化存储(把内嵌 base64 落成相对路径文件、避免 感谢这份工作,抱歉方向没对上。 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Screenshot paste has no configurable local storage pipeline. This adds a dedicated Image / 图片 menu with Image Settings / 图片设置 and Import Images / 导入图片. By default, importing into
notes.mdsaves screenshots asnotes.assets/image-YYYYMMDD-HHmmss-SSS.pngand writes relative Markdown references.The settings cover copy/reference/embed, seven folder choices (including
.assets, per-document folders, an explicit root and templates), separate filename rules for files and screenshots, relative/escaped paths, content deduplication, and optional remote-image downloads. Existing embedded, local and remote images can be collected into the selected folder. Original image files are retained.Each folder choice is displayed as a complete path with localized document-name and image-name placeholders, alongside a live folder tree. For example,
./{document-name}.assets/{image-name}.{ext}and./.assets/{document-name}/{image-name}.{ext}expose their different nesting directly. The preview labels the actual image directory, filename and Markdown reference. These display placeholders do not change the existing custom-template syntax or storage behavior.Clicking an image reveals its editable Markdown/HTML in the document flow above the preview. Repeated clicks on the same image retain the source field, caret selection and loaded image; clicking elsewhere commits valid edits and collapses the field. Enter confirms, Escape cancels, and invalid syntax stays visible with an inline error. Copy and file-replacement actions are available beside the source. The interaction follows Typora's official image demonstration; it does not open a source dialog.
The image context menu provides Align Left / Center / Align Right, six scale presets (25%, 50%, 75%, 100%, 150%, 200%), and a size reset. Alignment uses standard HTML block display and horizontal margins; scaling uses
zoom. Both survive save/reopen and file replacement. Alignment affects only the selected image, while resetting size retains alignment. The renderer scales the maximum-width constraint with zoom: a large image fitted to 780px becomes 390px at 50%, avoiding a width cap that otherwise cancels most of the visible change.Imports retain surrounding rich text and track insertion positions through concurrent edits. Writes avoid overwrites and deduplicate concurrent imports. Path conversion decodes Markdown punctuation escapes, fixing filenames such as
photo (1).pngon save/reopen, and preserves HTML ampersands. Literal code examples remain unchanged.The interface follows ColaMD's existing Chinese/English system-language selection. macOS packaging restores top-level
.lprojmarkers from the shipped Electron Framework locales: copying a localelectronDisthad omitted these empty directories and caused Chinese systems to fall back to English. No general preferences page or language selector is added.Validation on macOS arm64:
git diff --check.app.asar: imports/settings, source editing, validation/cancel, document switches, save/reopen, file replacement, collection, mixed HTML paste, concurrent typing and remote downloads./Applications/ColaMD.app. The installed archive matches the build hash, and its signature and all 55 language markers verify.COLAMD_NATIVE_CLIPBOARD=1test checks native paste and pixel equality without replacing clipboard contents.Windows and Linux GUI behavior has not been tested locally. Typora YAML preferences, cloud uploaders and automatic attachment-folder moves are outside this change. Images inside arbitrary HTML blocks remain editable in document source mode. Other Markdown viewers may interpret HTML sizing differently.
Related: #21. Supersedes closed #72. Usage and validation commands:
docs/images.md.