Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol diffdown.com

Fix jumpToParagraph: use Milkdown editorViewCtx instead of CSS selector

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+4 -2
+4 -2
templates/document_edit.html
··· 883 883 if (pid === 'general') return; 884 884 const idx = parseInt(pid.replace('p-', ''), 10); 885 885 if (isNaN(idx)) return; 886 - const pmEl = document.querySelector('#editor-rich .ProseMirror'); 887 - if (!pmEl) return; 886 + if (!milkdownEditor) return; 887 + const pmView = milkdownEditor.action(ctx => ctx.get(editorViewCtx)); 888 + if (!pmView) return; 889 + const pmEl = pmView.dom; 888 890 const blocks = Array.from(pmEl.children); 889 891 const target = blocks[idx]; 890 892 if (!target) return;