This commit is contained in:
lunaticbum
2024-10-10 17:37:22 +09:00
parent 86060d7471
commit a810db5d25
20 changed files with 40374 additions and 107 deletions
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/default_layout}"
>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" th:src="@{/js/toast-ui-view.js}"></script>
<link th:href="@{/css/toast-ui.css}" rel="stylesheet" />
<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 th:inline="javascript">
let editor
let onChange = () => {console.log(editor.getMarkdown())}
document.addEventListener("DOMContentLoaded", onLoaded);
function onLoaded() {
var h = document.querySelector('#content').getBoundingClientRect().height + 'px'
editor = new toastui.Editor({
el: document.querySelector('#editor'),
height: '500px',
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" +
"```"
,
theme:"dark",
});
}
function save() {
console.log(editor.getHTML())
}
</script>
</head>
<div layout:fragment="content" id="content">
<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>
</div>
</html>
@@ -1,24 +1,19 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/default_layout}">
<th:block layout:fragment="head">
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TOAST UI Editor CDN(JS) -->
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"/>-->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>-->
<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>-->
<html
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/default_layout}"
>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js"></script>
<!-- TOAST UI Editor CDN(CSS) -->
<link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />
<link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor-dark.css" />
<title>Spring Boot</title>
<script type="text/javascript" th:src="@{/js/toast-ui.js}"></script>
<link th:href="@{/css/toast-ui.css}" rel="stylesheet" />
<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 th:inline="javascript">
let editor
let onChange = () => {console.log(editor.getMarkdown())}
document.addEventListener("DOMContentLoaded", onLoaded);
function onLoaded() {
var h = document.querySelector('#content').getBoundingClientRect().height + 'px'
editor = new toastui.Editor({
@@ -49,20 +44,18 @@
"let test= = 'real test'\n" +
"```"
,
theme:"dark",
initialEditType:"wysiwyg",
// events : {
// change : this.onChange
// },
hooks: {
addImageBlobHook: (blob, callback) => {
const formData = new FormData();
formData.append('file', blob);
let url = 'blog/post/images/';
let url = 'post/images/';
$.ajax({
type: 'POST',
enctype: 'multipart/form-data',
url: 'blog/post/imageUpload',
url: 'post/imageUpload',
data: formData,
dataType: 'json',
processData: false,
@@ -82,26 +75,19 @@
});
}
function save() {
console.log(editor.getMarkdown())
console.log(editor.getHTML())
}
</script>
<link th:href="@{/css/common.css}" rel="stylesheet" />
<script type="text/javascript" th:src="@{/js/common.js}"></script>
<script type="text/javascript" th:src="@{/js/user.js}"></script>
</th:block>
<body onload="onLoaded()">
<th:block layout:fragment="header" th:include="@{/fragments/header}"></th:block>
<div layout:fragment='content' class='content' id='content' style="padding: 10px">
<input id="title_layer" style="width:100%; height:50px; font-size:30px; border-width: 1px; align-content: center; margin: 10px"/>
<div id="editor" style="width:90%; font-size:15px; border-width: 0px; align-content: center"></div>
</head>
<div layout:fragment="content" id="content">
<input id="title_layer" />
<div id="editor" ></div>
<div id="hashtag_layer">
<select style="width:40%; height:30px; font-size:15px; border-width: 0px"> </select>
<input id="hashtag" style="width:40%; height:30px; font-size:15px; border-width: 0px"/>
<select > </select>
<input id="hashtag" />
</div>
<div id="controll_layer" style="width: 100%">
<div id="controll_layer" >
<button onclick="save()">asdsad</button>
</div>
</div>
<th:block layout:fragment="footer" th:include="@{/fragments/footer}"></th:block>
</body>
</html>
</html>
@@ -11,12 +11,12 @@
<link th:href="@{/css/common.css}" rel="stylesheet" />
</th:block>
<body>
<th:block layout:fragment="header" th:include="@{/fragments/header}"></th:block>
<th:block layout:fragment="header" th:include="@{fragments/header}"></th:block>
<div layout:fragment="content" class="content">
<h2>This is Content</h2>
</div>
<th:block layout:fragment="footer" th:include="@{/fragments/footer}"></th:block>
<th:block layout:fragment="footer" th:include="@{fragments/footer}"></th:block>
</body>
</html>
@@ -1,25 +1,19 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/default_layout}">
<th:block layout:fragment="head">
<title>Spring Boot</title>
<html
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/default_layout}"
>
<head>
<!--css,JS 추가영역-->
<script th:inline="javascript">
function jopinClick() {
onclickJoin([[${enc}]],[[${key}]])
onclickJoin([[${enc}]],[[${keyword}]])
}
</script>
<!--/* css */-->
<link th:href="@{/css/common.css}" rel="stylesheet" />
<script type="text/javascript" th:src="@{/js/common.js}"></script>
<script type="text/javascript" th:src="@{/js/user.js}"></script>
</th:block>
<body onload="checkDebug()">
<th:block layout:fragment="header" th:include="@{/fragments/header}"></th:block>
<div layout:fragment="content" class="content">
</head>
<div layout:fragment="content" id="content">
<table>
<tr>
<td><h2>회원가입</h2></td>
@@ -37,7 +31,4 @@
<tr><td><input type="submit" value="가입하기" class="btn" onclick="jopinClick()"></td></tr>
</table>
</div>
<th:block layout:fragment="footer" th:include="@{/fragments/footer}"></th:block>
</body>
</html>
@@ -17,7 +17,7 @@
<script type="text/javascript" th:src="@{/js/user.js}"></script>
</th:block>
<body onload="checkDebug()">
<th:block layout:fragment="header" th:include="@{/fragments/header}"></th:block>
<th:block layout:fragment="header" th:include="@{fragments/header}"></th:block>
<div layout:fragment="content" class="content">
<table>
@@ -29,6 +29,6 @@
</table>
</div>
<th:block layout:fragment="footer" th:include="@{/fragments/footer}"></th:block>
<th:block layout:fragment="footer" th:include="@{fragments/footer}"></th:block>
</body>
</html>
@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<div class="footer">
<h2>Footer</h2>
</div>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<footer th:fragment="footer">
asdasdasd
</footer>
</html>
@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<div class="header">
<h2>Header</h2>
</div>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<header th:fragment="header">
header.html
</header>
</html>
@@ -1,15 +1,24 @@
<html lang="ko"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<!DOCTYPE html>
<html
lagn="ko"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns="http://www.w3.org/1999/html">
<!--/* 이곳에 각 view가 위치합니다. */-->
<th:block layout:fragment="head"></th:block>
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link th:href="@{/css/common.css}" rel="stylesheet" />
<script type="text/javascript" th:src="@{/js/common.js}"></script>
<meta name="Referrer" content="origin">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">
</head>
<body>
<div th:replace="fragments/header :: header"></div>
<div>
<div layout:fragment="header"></div>
<div layout:fragment="content"></div>
<div layout:fragment="content"></div>
<div layout:fragment="footer"></div>
</div>
<div th:replace="fragments/footer :: footer"></div>
</body>
</html>