<!DOCTYPE html>
<html 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">
</th:block>

<th:block layout:fragment="content" id="content">
  <section class="wrapper style2">
    <div class="container">
      <header class="major">
        <h2 th:text="${srcPost.title}">소개글 제목</h2>
        <p>
          최종 수정일: <span th:text="${#temporals.format(T(java.time.Instant).ofEpochMilli(srcPost.modifyTime).atZone(T(java.time.ZoneId).systemDefault()).toLocalDateTime(), 'yyyy-MM-dd HH:mm')}"></span>
        </p>
      </header>
    </div>
  </section>

  <section class="wrapper style1">
    <div class="container">
      <article>
        <div id="editor"></div>
      </article>
    </div>
  </section>

  <link href="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.snow.css" rel="stylesheet" />
  <script src="https://cdn.jsdelivr.net/npm/quill@2/dist/quill.js"></script>
  <script>
    // DOM 로드 완료 후 Quill 에디터를 읽기 전용(false)으로 초기화
    document.addEventListener('DOMContentLoaded', function() {
      initEditor(false);
    });
  </script>
</th:block>
</html>