This commit is contained in:
parent
632c421ec1
commit
23525d5ba1
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
<button class="ql-link">Link</button>
|
<button class="ql-link">Link</button>
|
||||||
<button class="ql-image">Image</button>
|
<button class="ql-image">Image</button>
|
||||||
|
<button class="ql-video">Video</button>
|
||||||
<button class="ql-blockquote">Blockquote</button>
|
<button class="ql-blockquote">Blockquote</button>
|
||||||
<button class="ql-code-block">Code Block</button>
|
<button class="ql-code-block">Code Block</button>
|
||||||
</div>
|
</div>
|
||||||
@ -131,6 +132,17 @@
|
|||||||
initCheckImageIndex();
|
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을 추적
|
let imageUrls = new Set(); // 업로드된 이미지 URL을 추적
|
||||||
quillInstance.getModule('toolbar').addHandler('image', () => {
|
quillInstance.getModule('toolbar').addHandler('image', () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user