You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
again, im working on a github clone except i want to hide the caret shown. how do i do this?
constc={lineNumbers: true,mode: "javascript",theme: "csmpt-code",// custom themegutters: ["CodeMirror-linenumbers","CodeMirror-foldgutter"],lineWrapping: true,readOnly: true,autoCloseBrackets: {pairs: "()[]{}''\"\"``<>",triples: "",explode: "[]{}()<>",},};conste=CodeMirror.fromTextArea(textArea,c);// Ensure that the editor is properly initializede.refresh();// Refresh to handle any layout issues// Focus the editor programmatically after initializatione.focus();// Focus the editor// Set the code contente.setValue(snippet.code);// Function to remove 'CodeMirror-focused' classconstremoveFocusedClass=()=>{constwrapper=e.getWrapperElement();wrapper.classList.remove('CodeMirror-focused');};// Remove class initiallysetTimeout(removeFocusedClass,0);// Continuously remove the 'CodeMirror-focused' class on focuse.getWrapperElement().addEventListener('focus',removeFocusedClass,true);
again, im working on a github clone except i want to hide the caret shown. how do i do this?