Source code with Codemirror

This example shows how to connect Codemirror to view and edit source code of Redactor.

    Demo

    Code

    <!DOCTYPE html>
    <html>
    <head>
        <title>Redactor</title>
        <meta charset="utf-8">
    
        <!--css -->
        <link rel="stylesheet" href="/your-folder/redactor.css">
    
        <!- codemirror css -->
        <link rel="stylesheet" href="/your-folder/codemirror/codemirror.css">
    
    
    </head>
    <body>
        <textarea id="content"></textarea>
    
        <!-- js -->
        <script src="/your-folder/redactor.js"></script>
    
        <!-- codemirror js -->
        <script src="/your-foldercodemirror/codemirror.min.js"></script>
    
        <!-- call -->
        <script>
        $R('#content', {
            source: {
                codemirror: {
                    lineNumbers: true
                }
            }
        });
        </script>
    </body>
    </html>