<h4>Contact Us Admin JS — CodeMirror TypeError Fix</h4><ul><li><strong>Fixed:</strong> Uncaught TypeError: mainHtmlEditor.getDoc is not a function (line 789). The CodeMirror editor <code>mainHtmlEditor</code> is initialized as empty string (<code>var mainHtmlEditor = ''</code> at line 688) and only becomes a CodeMirror instance if <code>#pgHtml</code> element exists (line 758). The <code>#pgHtml</code> textarea is inside the <code>#code_tab</code> which is only rendered for super_admin users. However, the AJAX callback at line 789 calls <code>mainHtmlEditor.getDoc().setValue()</code> unconditionally. Added guard: <code>if(mainHtmlEditor && typeof mainHtmlEditor.getDoc === 'function')</code>.</li><li><strong>Fixed:</strong> Same guard added for <code>mainHtmlEditor</code> at line 842 (default HTML loader).</li><li><strong>Fixed:</strong> Same guard added for <code>mainJSEditor.getDoc()</code> at line 904.</li><li><strong>Fixed:</strong> Same guard added for <code>mainHeaderEditor.getDoc()</code> at line 964.</li></ul><p><strong>Note:</strong> The OpenWeatherMap API 401 error is an external API key issue (expired/invalid key), not a code bug.</p><p><strong>File:</strong> platform/services/.../ContactUsManager/js/custom_js.php</p>