2024-10-10 17:37:22 +09:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html
|
|
|
|
|
xmlns:th="http://www.thymeleaf.org"
|
|
|
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
|
|
layout:decorate="~{layout/default_layout}"
|
|
|
|
|
>
|
2024-10-21 17:25:49 +09:00
|
|
|
<th:block layout:fragment="head">
|
2024-10-10 17:37:22 +09:00
|
|
|
<script type="text/javascript" th:src="@{/js/toast-ui-view.js}"></script>
|
|
|
|
|
<link th:href="@{/css/toast-ui-dark.css}" rel="stylesheet" />
|
2024-10-25 18:28:25 +09:00
|
|
|
<script type="text/javascript" th:src="@{/js/blog.js}"></script>
|
|
|
|
|
<link th:href="@{/css/blog.css}" rel="stylesheet" />
|
2024-10-10 17:37:22 +09:00
|
|
|
<script th:inline="javascript">
|
|
|
|
|
let editor
|
|
|
|
|
let onChange = () => {console.log(editor.getMarkdown())}
|
|
|
|
|
document.addEventListener("DOMContentLoaded", onLoaded);
|
|
|
|
|
function onLoaded() {
|
2024-10-25 18:28:25 +09:00
|
|
|
baseData.title = urldecode([[${srcPost.title}]]);
|
|
|
|
|
baseData.content = urldecode([[${srcPost.content}]]);
|
2024-10-24 18:04:29 +09:00
|
|
|
var h = document.querySelector('#main_layer').getBoundingClientRect().height + 'px'
|
2024-10-10 17:37:22 +09:00
|
|
|
editor = new toastui.Editor({
|
|
|
|
|
el: document.querySelector('#editor'),
|
|
|
|
|
height: '500px',
|
|
|
|
|
width:'100%',
|
|
|
|
|
viewer: true,
|
|
|
|
|
usageStatistics : false,
|
2024-10-25 18:28:25 +09:00
|
|
|
initialValue:baseData.content,
|
2024-10-10 17:37:22 +09:00
|
|
|
theme:"dark",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function save() {
|
|
|
|
|
console.log(editor.getHTML())
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2024-10-21 17:25:49 +09:00
|
|
|
</th:block>
|
|
|
|
|
<th:block layout:fragment="content" id="content">
|
2024-10-23 10:07:45 +09:00
|
|
|
<div id="main_layer">
|
|
|
|
|
<input id="title_layer" />
|
|
|
|
|
<div id="editor" ></div>
|
|
|
|
|
<div id="hashtag_layer">
|
|
|
|
|
<select > </select>
|
|
|
|
|
<input id="hashtag" />
|
|
|
|
|
</div>
|
|
|
|
|
<div id="controll_layer" >
|
|
|
|
|
<button onclick="save()">asdsad</button>
|
|
|
|
|
</div>
|
2024-10-10 17:37:22 +09:00
|
|
|
</div>
|
2024-10-21 17:25:49 +09:00
|
|
|
</th:block>
|
2024-10-10 17:37:22 +09:00
|
|
|
</html>
|