DocsOCodeInsertCodeMirror Editor
Reference

CodeMirror Editor

OCodeInsertorravo.com/docs/ocodeinsert/codemirror-editor

CodeMirror Editor

OCodeInsert uses WordPress's built-in CodeMirror editor (wp-codemirror) -- no external dependencies.

Features:

  • Syntax highlighting for HTML, JavaScript, and CSS
  • Line numbers
  • Bracket and tag matching
  • Auto-indent
  • Mode switches automatically when you change the Type dropdown

Mode mapping:

TypeCodeMirror Mode
HTMLtext/html (HTML mixed -- supports embedded JS and CSS)
JavaScripttext/javascript
CSStext/css

The editor is only loaded on the Snippets page, not the Settings page, to keep asset loading minimal.

CodeMirror Editor — OCodeInsert Docs — Orravo