import re with open('c:/ScriptoriumAI/scriptoriumai-ui/src/layouts/EditorLayout.tsx', 'r', encoding='utf-8') as f: text = f.read() # Check if backdrop already exists if 'bg-black/50' not in text: text = text.replace(' setIsMobileMenuOpen(false)} />}\n