editor fits parent
parent
c2f5edead6
commit
54a4a70eac
|
|
@ -63,6 +63,25 @@ func main() {
|
|||
log.Println("hi")
|
||||
}
|
||||
` + "```" + `
|
||||
|
||||
and
|
||||
|
||||
now
|
||||
|
||||
the
|
||||
|
||||
newlines
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
`,
|
||||
},
|
||||
"Tree": `{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,26 @@
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
|
||||
<style>
|
||||
#easyMDEwrap,
|
||||
#easyMDEwrap > .EasyMDEContainer,
|
||||
#easyMDEwrap > .EasyMDEContainer > .CodeMirror {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.EasyMDEContainer > .CodeMirror {
|
||||
height: 5px;
|
||||
}
|
||||
#article {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
#titlepath, #title {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
|
|
@ -72,7 +92,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<!-- todo: each line no is an anchor -->
|
||||
<div class="monospace">
|
||||
<div id="easyMDEwrap" class="monospace">
|
||||
<textarea id="my-text-area"></textarea>
|
||||
</div>
|
||||
<div id="saveFeedback" style="min-height: 1.2em; text-align: right;">
|
||||
|
|
@ -88,7 +108,7 @@
|
|||
element: document.getElementById('my-text-area'),
|
||||
forceSync: true,
|
||||
indentWithTabs: false,
|
||||
initialValue: "# initial\nvalue",
|
||||
initialValue: "loading...",
|
||||
showIcons: ["code", "table"],
|
||||
spellChecker: false,
|
||||
sideBySideFullscreen: false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue