Revert checkbox icon span — broke click-to-toggle; no CSS-only solution without JS changes

This commit is contained in:
igor 2026-04-26 17:24:28 +12:00
parent 7a96e1a997
commit 9d6531cbf8
2 changed files with 2 additions and 3 deletions

View file

@ -850,8 +850,8 @@ const renderMarkdown = (markdown) => {
html = html.replace(/\[([^\]]*)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener">$1</a>');
// Checkboxes
html = html.replace(/^- \[x\](?:\s+(.*))?$/gm, (_m, text) => `<div class="md-checkbox checked"><span class="md-cb-icon">&#9745;</span>&nbsp;${text || ''}</div>`);
html = html.replace(/^- \[ \](?:\s+(.*))?$/gm, (_m, text) => `<div class="md-checkbox"><span class="md-cb-icon">&#9744;</span>&nbsp;${text || ''}</div>`);
html = html.replace(/^- \[x\](?:\s+(.*))?$/gm, (_m, text) => `<div class="md-checkbox checked">&#9745;&nbsp;${text || ''}</div>`);
html = html.replace(/^- \[ \](?:\s+(.*))?$/gm, (_m, text) => `<div class="md-checkbox">&#9744;&nbsp;${text || ''}</div>`);
// Unordered lists
html = html.replace(/^[-*]\s+(.+)$/gm, '<li>$1</li>');

View file

@ -1324,7 +1324,6 @@ body.nav-collapsed .editor-titlebar { padding-left: 42px; }
text-indent: -1.5em;
}
.editor-preview .md-checkbox.checked { text-decoration: line-through; opacity: 0.7; }
.editor-preview .md-checkbox.checked .md-cb-icon { color: var(--accent); opacity: 1; text-decoration: none; display: inline-block; font-weight: bold; }
.preview-img { max-width: 100%; border-radius: 6px; margin: 8px 0; cursor: default; }
.editor-preview[contenteditable="true"] .preview-img { cursor: nwse-resize; border: 1px solid transparent; }
.editor-preview[contenteditable="true"] .preview-img:hover { border-color: var(--accent); opacity: 0.95; }