if (!userSelectSave.value) {
                alert('Please select a user first');
                return;
            }

            if (!editorContainer.innerHTML.trim()) {
                alert('Save data cannot be empty');
                return;
            }

            try {
                const user = JSON.parse(userSelectSave.value);
                
                // Get the editor content and ensure it's valid JSON
                const editorContent = editorContainer.querySelector('.CodeMirror