    function deleteCell(cellId) {
            const cell = document.querySelector(`[data-cell-id="${cellId}"]`);
            if (cell && document.querySelectorAll('.cell').length > 1) {
                const editor = editorInstances.get(cellId);
                if (editor) {
                    editor.toTextArea();
                    editorInstances.delete(cellId);
                }
                cell.remove();
            }
        }
        
        function moveUp(cellId) {
            const cell = do