You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.0 KiB
HTML
70 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
<title>Editor</title>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="../node_modules/@fortawesome/fontawesome-free/css/all.min.css">
|
|
<link rel="stylesheet" href="../node_modules/easymde/dist/easymde.min.css">
|
|
<script src="../node_modules/easymde/dist/easymde.min.js"></script>
|
|
|
|
<style>
|
|
body {
|
|
margin: 0px;
|
|
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
|
|
}
|
|
|
|
.CodeMirror {
|
|
border: none;
|
|
margin-top: 45px;
|
|
}
|
|
|
|
.editor-toolbar {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
z-index: 99999;
|
|
background-color: white;
|
|
border: none;
|
|
border-radius: 0px;
|
|
/* Following lines are from Framework7 .elevation-2 */
|
|
-webkit-box-shadow: 0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);
|
|
box-shadow: 0px 3px 1px -2px rgba(0,0,0,.2),0px 2px 2px 0px rgba(0,0,0,.14),0px 1px 5px 0px rgba(0,0,0,.12);
|
|
/* end Framework7 code */
|
|
}
|
|
</style>
|
|
|
|
<textarea id="note"></textarea>
|
|
|
|
<script>
|
|
var easymde;
|
|
function initEditor(markdown) {
|
|
document.getElementById('note').value = markdown;
|
|
easymde = new EasyMDE({
|
|
element: document.getElementById("note"),
|
|
autoDownloadFontAwesome: false,
|
|
autofocus: true,
|
|
forceSync: true,
|
|
status: false,
|
|
spellChecker: false,
|
|
toolbar: [
|
|
"bold",
|
|
"italic",
|
|
"heading",
|
|
"|",
|
|
"quote",
|
|
"unordered-list",
|
|
"ordered-list",
|
|
"horizontal-rule"
|
|
]
|
|
});
|
|
}
|
|
|
|
function getMarkdown() {
|
|
return document.getElementById('note').value;
|
|
}
|
|
</script> |