 () => toggleEditMode(true));
                cancelEditButton.addEventListener('click', () => toggleEditMode(false));
                saveEditButton.addEventListener('click', updateMindmapFromEdit);
            });

            function toggleEditMode(show) {
                const viewerContent = document.querySelector('.viewer-content');
                const editorElement = document.getElementById('markdown-editor');
                const textarea = document.getElementById('markdown-textarea');
         