From 23525d5ba111a9547c1717c43f3c6f2c21f7c998 Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Tue, 8 Apr 2025 20:40:25 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=81=EC=83=81=20=EB=A7=81=ED=81=AC=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/editor/QEditor.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/editor/QEditor.vue b/src/components/editor/QEditor.vue index b805c9d..6b85bb1 100644 --- a/src/components/editor/QEditor.vue +++ b/src/components/editor/QEditor.vue @@ -41,6 +41,7 @@ + @@ -131,6 +132,17 @@ initCheckImageIndex(); } + // 영상 넣기. + quillInstance.getModule('toolbar').addHandler('video', () => { + const url = prompt('영상 URL을 입력하세요:'); + if (url) { + // 에디터에 iframe 형태로 영상 삽입 + const index = quillInstance.getSelection().index; // 현재 커서 위치 + quillInstance.insertEmbed(index, 'video', url); + quillInstance.setSelection(index + 1); // 커서를 삽입된 콘텐츠 뒤로 이동 + } + }); + // 이미지 업로드 기능 처리 let imageUrls = new Set(); // 업로드된 이미지 URL을 추적 quillInstance.getModule('toolbar').addHandler('image', () => {