|
@@ -10,67 +10,9 @@
|
|
|
<link rel="stylesheet" href="css/codemirror.css">
|
|
|
<link rel="stylesheet" href="codemirror/darcula.css">
|
|
|
<link rel="stylesheet" href="codemirror/material-ocean.css">
|
|
|
- <style>
|
|
|
- .container {
|
|
|
- margin: 45px auto;
|
|
|
- max-width: 880px;
|
|
|
- }
|
|
|
-
|
|
|
- #input-container {
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- #title {
|
|
|
- text-align: center;
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- transform: translateX(-50%)
|
|
|
- }
|
|
|
-
|
|
|
- .markdown-body blockquote, .markdown-body dl, .markdown-body ol, .markdown-body p, .markdown-body pre, .markdown-body table, .markdown-body ul {
|
|
|
- margin-bottom: 0px;
|
|
|
- }
|
|
|
-
|
|
|
- .CodeMirror {
|
|
|
- font-size: 13px
|
|
|
- }
|
|
|
-
|
|
|
- .mditor {
|
|
|
- height: 400px;
|
|
|
- width: auto;
|
|
|
- }
|
|
|
-
|
|
|
- /*非固定行高模式*/
|
|
|
- .no-fix-height {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .no-fix-height .mditor {
|
|
|
- height: initial;
|
|
|
- padding-top: 0;
|
|
|
- border: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .no-fix-height .mditor .body {
|
|
|
- height: initial;
|
|
|
- box-shadow: unset;
|
|
|
- }
|
|
|
-
|
|
|
- .no-fix-height .mditor .viewer {
|
|
|
- height: initial;
|
|
|
- padding-bottom: 10px;
|
|
|
- }
|
|
|
- .no-fix-height .mditor .head{
|
|
|
- display: none;
|
|
|
- }
|
|
|
- .no-fix-height #input-container{
|
|
|
- margin: 0 10px;
|
|
|
- }
|
|
|
- </style>
|
|
|
+ <link rel="stylesheet" href="css/app.css">
|
|
|
</head>
|
|
|
-
|
|
|
<body>
|
|
|
-
|
|
|
<div class="container">
|
|
|
<div tabindex="1" class="mditor preview">
|
|
|
<div class="head">
|
|
@@ -132,14 +74,9 @@
|
|
|
|
|
|
CodeMirror.modeURL = "https://cdn.bootcss.com/codemirror/2.36.0/%N.js";
|
|
|
|
|
|
-
|
|
|
var md_body = $('#markdown-body');
|
|
|
-
|
|
|
-
|
|
|
var ws = new WebSocket(get_ws_addr());
|
|
|
-
|
|
|
var ctrl = new WebIO.WebIOController(ws, md_body, $('#input-container'));
|
|
|
-
|
|
|
var old_send = ws.send;
|
|
|
ws.send = function (d) {
|
|
|
// console.log('<<<', JSON.parse(d));
|