Fix issue #1 by moving the editor to an iframe
vanhempi
8dd6a9872d
commit
43142f0285
@ -0,0 +1,66 @@
|
||||
<!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>
|
Ladataan…
Viittaa uudesa ongelmassa