<div id="entry-source-codemirror"></div>
Load CodeMirror on the page before Redactor (included on the documentation site).
const app = Redactor('#entry-source-codemirror', {
codemirror: {
mode: 'xml',
lineNumbers: true
}
});
Open HTML in the toolbar to switch to source mode with CodeMirror.