- Text / Image / Button / Section 블록을 이 영역에서 추가할 수 있습니다.
+ Text / Image / Button / Divider / List / Section 블록을 이 영역에서 추가할 수 있습니다.
+
+
+
+
+
+
+ >
+ );
+ }
+
if (selectedBlock.type === "image") {
const imageProps = selectedBlock.props as ImageBlockProps;
@@ -664,6 +726,63 @@ export default function EditorPage() {
);
}
+ if (selectedBlock.type === "list") {
+ const listProps = selectedBlock.props as ListBlockProps;
+ const firstItem = listProps.items && listProps.items.length > 0 ? listProps.items[0] : "";
+
+ return (
+ <>
+
+
+
+
+
+
+
+ >
+ );
+ }
+
if (selectedBlock.type === "button") {
const buttonProps = selectedBlock.props as ButtonBlockProps;
@@ -872,6 +991,24 @@ function SortableEditorBlock({
} else if (block.type === "image") {
alignClass = "text-left";
sizeClass = "text-base";
+ } else if (block.type === "divider") {
+ const dividerProps = block.props as DividerBlockProps;
+ alignClass =
+ dividerProps.align === "center"
+ ? "text-center"
+ : dividerProps.align === "right"
+ ? "text-right"
+ : "text-left";
+ sizeClass = "text-base";
+ } else if (block.type === "list") {
+ const listProps = block.props as ListBlockProps;
+ alignClass =
+ listProps.align === "center"
+ ? "text-center"
+ : listProps.align === "right"
+ ? "text-right"
+ : "text-left";
+ sizeClass = "text-base";
} else {
// 섹션 블록: 텍스트 크기 대신 섹션 자체에 패딩/배경을 입히므로 텍스트 클래스는 기본값만
alignClass = "text-left";
@@ -964,6 +1101,31 @@ function SortableEditorBlock({
);
})()}
+ {block.type === "divider" && (() => {
+ const dividerProps = block.props as DividerBlockProps;
+ const thicknessClass = dividerProps.thickness === "medium" ? "border-t-2" : "border-t";
+
+ return (
+