Skip to content

Commit

Permalink
fix: 붙여넣기 할 때 순서 리스트 유지되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovico7 committed Dec 5, 2024
1 parent 28f4b84 commit dc3e589
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/features/editor/hooks/useCopyAndPaste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const useCopyAndPaste = ({
sendCharDeleteOperation,
sendBlockInsertOperation,
sendBlockUpdateOperation,
sendBlockReorderOperation,
} = useSocketStore();

const handleCopy = useCallback(
Expand Down Expand Up @@ -183,6 +184,7 @@ export const useCopyAndPaste = ({
}
currentBlockIndex += 1;
});
editorCRDT.LinkedList.updateAllOrderedListIndices();
} else {
// 텍스트를 한 글자씩 순차적으로 삽입
text.split("").forEach((char, index) => {
Expand Down

0 comments on commit dc3e589

Please sign in to comment.