...
This commit is contained in:
@@ -7,12 +7,15 @@
|
||||
<th:block layout:fragment="head">
|
||||
<script type="text/javascript" th:src="@{/js/toast-ui-view.js}"></script>
|
||||
<link th:href="@{/css/toast-ui-dark.css}" rel="stylesheet" />
|
||||
<!-- <link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor-dark.css" />-->
|
||||
<script type="text/javascript" th:src="@{/js/blog.js}"></script>
|
||||
<link th:href="@{/css/blog.css}" rel="stylesheet" />
|
||||
<script th:inline="javascript">
|
||||
let editor
|
||||
let onChange = () => {console.log(editor.getMarkdown())}
|
||||
document.addEventListener("DOMContentLoaded", onLoaded);
|
||||
function onLoaded() {
|
||||
baseData.title = urldecode([[${srcPost.title}]]);
|
||||
baseData.content = urldecode([[${srcPost.content}]]);
|
||||
var h = document.querySelector('#main_layer').getBoundingClientRect().height + 'px'
|
||||
editor = new toastui.Editor({
|
||||
el: document.querySelector('#editor'),
|
||||
@@ -20,26 +23,7 @@
|
||||
width:'100%',
|
||||
viewer: true,
|
||||
usageStatistics : false,
|
||||
initialValue:
|
||||
"# 제목 " +"\n" +
|
||||
"평문 사이에 **볼드체** *이탤릭체*"+"\n" +
|
||||
"~~어디쓰지~~"+"\n" +
|
||||
"***"+"\n" +
|
||||
"### 모라모라 " +"\n" +
|
||||
"> 으흐흠..." +"\n" +
|
||||
"* 쓸까?" +"\n" +
|
||||
"1. 첫번째" +"\n" +
|
||||
"* [x] 체크하자" +"\n" +
|
||||
"* [ ] 체크하자" +"\n" +
|
||||
" \|dd\|cc\|ff\|\n" +
|
||||
" \|\-\-\-\|\-\-\-\|\-\-\-\|\n" +
|
||||
" \|aa\|s\|s\|" +"\n" +
|
||||
"[링크다](https://youtube.com)" +"\n" +
|
||||
"`var test = 'real test'`" +"\n" +
|
||||
"```\n" +
|
||||
"let test= = 'real test'\n" +
|
||||
"```"
|
||||
,
|
||||
initialValue:baseData.content,
|
||||
theme:"dark",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user