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.
NotePostApp/www/pages/editor.html

66 lines
1.7 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;
}
</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>