Chnage mode

Become to the code editor

Modes :   Themes :

x
39
 
1
<!DOCTYPE html>
2
<html lang="zh">
3
    <head>
4
        <meta charset="utf-8" />
5
        <title>Chnage mode - Editor.md examples</title>
6
        <link rel="stylesheet" href="css/style.css" />
7
        <link rel="stylesheet" href="../css/editormd.css" />
8
        <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
9
    </head>
10
    <body>
11
        <div id="layout">
12
            <header>
13
                <h1>Chnage mode</h1>
14
            </header>
15
            <div id="test-editormd">
16
                <textarea style="display:none;"></textarea>
17
            </div>
18
        </div>
19
        <script src="js/jquery.min.js"></script>
20
        <script src="../editormd.js"></script>
21
        <script type="text/javascript">
22
            $(function() {
23
                var testEditor = editormd("test-editormd", {
24
                    width            : "90%",
25
                    height           : 720,
26
                    watch            : false,
27
                    toolbar          : false,
28
                    codeFold         : true,
29
                    searchReplace    : true,
30
                    placeholder      : "Enjoy coding!",
31
                    value            : (localStorage.mode) ? $("#"+localStorage.mode.replace("text/", "")+"-code").val() : $("#html-code").val(),
32
                    theme            : (localStorage.theme) ? localStorage.theme : "default",
33
                    mode             : (localStorage.mode) ? localStorage.mode : "text/html",
34
                    path             : '../lib/'
35
                });
36
            });
37
        </script>
38
    </body>
39
</html>