Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ In [settings.json](https://github.com/MarkEdit-app/MarkEdit/wiki/Customization#a

- `updateBehavior`: `"quiet"` shows a button, `"notify"` shows an alert, `"never"` disables update checks.
- `syncScroll`: Whether to enable scroll synchronization.
- `hidePreviewButtons`: Whether to hide the built-in preview buttons (not applicable for lite build).
- `hidePreviewButtons`: Whether to hide the built-in preview buttons in side-by-side mode (for lite build, hides preview buttons under table wrappers only).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I don't think we should use the word under, for users, this is just a preview button for table.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aa46380 — changed to "hides table preview buttons only".

- `syntaxAutoDetect`: Whether to enable automatic language detection for syntax highlighting in code blocks (not applicable for lite build).
- `imageHoverPreview`: Whether to enable image preview on hover.
- `themeName`: Set the preview color theme, available themes can be found in the [`styles/themes`](styles/themes) folder.
Expand Down
11 changes: 9 additions & 2 deletions src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,16 @@ export function setUp() {
import('../styles/katex.css?raw').then(mod => appendStyle(mod.default));
appendStyle(hljsCss());

// Hide the built-in preview button since we have a better preview with all features
// Hide the built-in preview buttons in side-by-side mode
if (hidePreviewButtons) {
appendStyle(`.cm-md-previewWrapper {
appendStyle(`.markdown-container .cm-md-previewWrapper {
display: none !important;
}`);
}
} else {
// For lite build, hide preview buttons under table wrapper in side-by-side mode
if (hidePreviewButtons) {
appendStyle(`.markdown-container .cm-md-tableWrapper .cm-md-previewWrapper {
display: none !important;
}`);
}
Expand Down