/* CommentEditor -- shared comment composer for the mockups. Mirrors the live Templ components: CommentEditor > CommentEditorHeader + MarkdownEditor + CommentEditorActions. Requires markdown-editor.js to be loaded first (it supplies the inner editor). Each page uses:
The buttons inside the mount become the CommentEditorActions footer -- the page-specific slot. Markup below is a fixed build-time template. */ (function () { var mount = document.getElementById('cz-comment-editor'); if (!mount) return; if (!window.CZMarkdownEditor) { console.error('comment-editor.js requires markdown-editor.js to be loaded first'); return; } var avatar = mount.getAttribute('data-avatar') || ''; var actions = mount.innerHTML; // page-specific action buttons var editor = window.CZMarkdownEditor.html({ rows: mount.getAttribute('data-rows'), placeholder: mount.getAttribute('data-placeholder') || 'Leave a comment — Markdown supported' }); mount.outerHTML = `
Add a comment
${editor}

Markdown supported · drop files to attach

${actions}
`; })();