This plugin enables source code highlighting, powered by CodeMirror. For all available settings and commands, please refer to CodeMirror User Manual.

This plugin is only compatible with Redactor II 1.0.1 or higher.

Download Plugin

<!DOCTYPE html>
        <meta charset="utf-8">

        <script src="//"></script>

        <link rel="stylesheet" href="/js/redactor/redactor.css" />
        <script src="/js/redactor/redactor.js"></script>

        <!-- Codemirror -->
        <link rel="stylesheet" href="/js/codemirror/codemirror.css" />
        <script src="/js/codemirror/codemirror.js"></script>
        <script src="/js/codemirror/xml/xml.js"></script><p>
        <!-- Plugin -->
        <script src="/js/redactor/plugins/codemirror.js"></script>

        <script type="text/javascript">
                plugins: ['codemirror'],
                codemirror: {
                    lineNumbers: true,
                    mode: 'xml',
                    indentUnit: 4
        <textarea id="redactor">...</textarea>