diff --git a/app/modules/project/store.py b/app/modules/project/store.py
index db14744..0a6cc62 100644
--- a/app/modules/project/store.py
+++ b/app/modules/project/store.py
@@ -333,8 +333,12 @@ def build_subject_project_done(*, project_name: str) -> str:
_DESC_ALLOWED_TAGS: frozenset[str] = frozenset({
"p", "br", "b", "strong", "i", "em", "u", "a", "img",
"ul", "ol", "li", "blockquote", "code", "pre", "span", "div",
+ # 취소선(서식 도구 "S" — 브라우저에 따라 strike/s/del 로 만든다)
+ "s", "strike", "del",
+ # 체크박스(서식 도구 "☑") — type="checkbox" 만, 속성은 checked 뿐(아래 _emit_start)
+ "input",
})
-_DESC_VOID_TAGS: frozenset[str] = frozenset({"br", "img"})
+_DESC_VOID_TAGS: frozenset[str] = frozenset({"br", "img", "input"})
# a: target/rel 은 "새 탭에서 열기"용. 화면(설명란)에서 링크를 클릭하면
# 새 탭으로 여는데, 저장했다 다시 열었을 때도 같은 동작이어야 해서 허용한다.
# span: 멘션 칩(@이름) 전용 — class="pj-mention" + data-email 만 남긴다.
@@ -342,6 +346,7 @@ _DESC_ALLOWED_ATTRS: dict[str, frozenset[str]] = {
"a": frozenset({"href", "target", "rel"}),
"img": frozenset({"src", "alt", "width", "height"}),
"span": frozenset({"class", "data-email"}),
+ "input": frozenset({"type", "checked"}),
}
# URL 은 금지 목록이 아니라 허용 목록으로 검사한다. 금지 목록(javascript: 등)은
# "jav ascript:" 처럼 중간에 탭/개행을 끼우면 통과하는데, 브라우저는 URL 을
@@ -411,6 +416,14 @@ class _DescriptionSanitizer(HTMLParser):
return
if tag not in _DESC_ALLOWED_TAGS:
return
+ # input 은 체크박스만 — 다른 종류(text·file·hidden 등)는 태그째 버리고,
+ # 체크 여부 말고는 아무 속성도 남기지 않는다.
+ if tag == "input":
+ if (dict(attrs).get("type") or "").strip().lower() != "checkbox":
+ return
+ checked = any(name == "checked" for name, _ in attrs)
+ self.out.append('' if checked else '')
+ return
allowed = _DESC_ALLOWED_ATTRS.get(tag, frozenset())
# span 은 멘션 칩일 때만 속성을 갖는다 — class 가 pj-mention 이 아니면
# data-email 까지 통째로 버린다(평범한 span 으로만 남는다).
diff --git a/app/modules/project/templates/project/help.html b/app/modules/project/templates/project/help.html
index 4735edf..191bb90 100644
--- a/app/modules/project/templates/project/help.html
+++ b/app/modules/project/templates/project/help.html
@@ -1,8 +1,8 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
-
+
+
{% endblock %}
@@ -274,7 +274,8 @@
설명
- - 서식 도구: B 굵게 · I 기울임 · U 밑줄 · 글머리 목록 · 번호 목록 · 인용 · 링크 · ×서식(서식 지우기) · 이미지 넣기
+ - 서식 도구: B 굵게 · I 기울임 · U 밑줄 ·
S 취소선(Ctrl+Shift+X) · 글머리 목록 · 번호 목록 · check_box 체크박스 · 인용 · 링크 · ×서식(서식 지우기) · 이미지 넣기
+ - 체크박스 — 커서 자리에 체크박스가 들어갑니다. 누를 때마다 체크/해제되고, 저장하면 체크 상태도 그대로 남습니다. 글머리 목록과 함께 쓰면 할 일 목록처럼 쓸 수 있어요.
- 이미지 — 캡처한 그림을 Ctrl+V로 바로 붙여 넣을 수 있습니다. 그림을 누르면 모서리를 끌어 크기를 바꾸거나 지울 수 있습니다.
- 링크 — 웹 주소를 붙여 넣으면 자동으로 링크가 되고, 누르면 새 탭에서 열립니다.
- @태그 — @를 누르면 사람 목록이 뜹니다. 고른 사람의 수신함에 이 작업이 쌓입니다.
diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html
index b3bafd9..eba4bef 100644
--- a/app/modules/project/templates/project/inbox.html
+++ b/app/modules/project/templates/project/inbox.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
@@ -101,5 +101,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/mytasks.html b/app/modules/project/templates/project/mytasks.html
index 50433e5..928e125 100644
--- a/app/modules/project/templates/project/mytasks.html
+++ b/app/modules/project/templates/project/mytasks.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html
index 62909d0..9861db1 100644
--- a/app/modules/project/templates/project/project.html
+++ b/app/modules/project/templates/project/project.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
@@ -326,9 +326,11 @@
+
+
@@ -468,5 +470,5 @@
-
+
{% endblock %}
diff --git a/app/modules/project/templates/project/trash.html b/app/modules/project/templates/project/trash.html
index f34212b..4a7bee1 100644
--- a/app/modules/project/templates/project/trash.html
+++ b/app/modules/project/templates/project/trash.html
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
-
+
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
-
+
{% endblock %}
diff --git a/app/static/project.css b/app/static/project.css
index eb1b81f..3d33294 100644
--- a/app/static/project.css
+++ b/app/static/project.css
@@ -994,6 +994,11 @@
기본 24px 아이콘을 그대로 두면 이 버튼만 커 보이고 줄도 어긋난다. */
.pj-desc-fmtbtn .material-symbols-outlined { font-size: 19px; line-height: 1; position: relative; top: 4px; }
label.pj-desc-fmtbtn { line-height: 26px; }
+/* 설명란 체크박스(서식 도구 ☑) — 누르면 체크/해제, 체크 여부는 저장된다 */
+.pj-desc-editor input[type="checkbox"] {
+ width: 15px; height: 15px; margin: 0 4px 0 1px; vertical-align: -2px; cursor: pointer;
+ accent-color: var(--pj-accent);
+}
.pj-desc-fmtsep { width: 1px; height: 16px; background: #e2e4ea; margin: 0 4px; }
.pj-desc-editor {
min-height: 80px; max-height: 300px; overflow-y: auto; padding: 8px 10px;
diff --git a/app/static/project.js b/app/static/project.js
index faa3c7b..0b847e1 100644
--- a/app/static/project.js
+++ b/app/static/project.js
@@ -4990,6 +4990,12 @@
arg = prompt("연결할 주소(URL)를 입력하세요", "https://");
if (!arg) return;
}
+ // 체크박스 — 커서 자리에 체크박스 하나 + 공백. 누르면 체크/해제(아래 클릭 처리).
+ if (cmd === "insertCheckbox") {
+ try { document.execCommand("insertHTML", false, ' '); } catch (_) {}
+ box.dispatchEvent(new Event("input", { bubbles: true }));
+ return;
+ }
try { document.execCommand(cmd, false, arg); } catch (_) {}
if (cmd === "createLink") normalizeEditorLinks(box);
updateFmtState();
@@ -4997,7 +5003,7 @@
function updateFmtState() {
fmtbar.querySelectorAll(".pj-desc-fmtbtn[data-cmd]").forEach(function (btn) {
const cmd = btn.dataset.cmd;
- if (cmd === "createLink" || cmd === "removeFormat") return;
+ if (cmd === "createLink" || cmd === "removeFormat" || cmd === "insertCheckbox") return;
let active = false;
try { active = document.queryCommandState(cmd); } catch (_) { active = false; }
btn.classList.toggle("is-active", active);
@@ -5006,8 +5012,29 @@
box.addEventListener("keyup", updateFmtState);
box.addEventListener("mouseup", updateFmtState);
box.addEventListener("focus", updateFmtState);
+ // Ctrl+Shift+X = 취소선(구글 문서·아사나와 같은 단축키)
+ box.addEventListener("keydown", function (e) {
+ if ((e.ctrlKey || e.metaKey) && e.shiftKey && (e.key === "x" || e.key === "X")) {
+ e.preventDefault();
+ try { document.execCommand("strikeThrough"); } catch (_) {}
+ updateFmtState();
+ }
+ });
}
+ // ── 체크박스 누르기 — 편집칸 안의 체크박스는 브라우저마다 눌림 동작이 달라
+ // 직접 바꾼다. 저장되는 건 HTML 이라 화면 상태(.checked)가 아니라 checked
+ // 속성을 바꿔야 저장·다시 열기에도 남는다(서버 정리기는 checked 속성만 남긴다).
+ box.addEventListener("click", function (e) {
+ const cb = e.target;
+ if (!cb || cb.tagName !== "INPUT" || cb.type !== "checkbox") return;
+ e.preventDefault(); // 브라우저 기본 토글은 막고(취소되면 원래 값으로 되돌려 놓는다) 아래에서 직접
+ const next = !cb.hasAttribute("checked");
+ if (next) cb.setAttribute("checked", ""); else cb.removeAttribute("checked");
+ setTimeout(function () { cb.checked = next; }, 0);
+ box.dispatchEvent(new Event("input", { bubbles: true }));
+ }, true);
+
// ── 설명란 이미지 선택 → 크기 조절 핸들 + 삭제 버튼 오버레이 ──
// 크기는 style이 아니라 width 속성으로 저장한다(서버 sanitize가 style은
// 버리지만 img width/height 속성은 허용 목록에 있어 저장 후에도 유지된다).
@@ -5221,6 +5248,7 @@
return {
setTaskId: setTaskId,
setHtml: function (html) {
+ // (체크박스는 checked 속성이 그대로 화면 상태가 된다 — 새 HTML 이라 따로 맞출 필요 없음)
selectImg(null); lastRange = null;
box.innerHTML = html || "";
normalizeEditorLinks(box);