mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -210,9 +210,8 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
|
||||
}
|
||||
|
||||
public bindUploadEvent(protyle: IProtyle, element: HTMLElement) {
|
||||
const uploadElement = element.querySelector('input[type="file"]');
|
||||
if (uploadElement) {
|
||||
uploadElement.addEventListener("change", (event: InputEvent & { target: HTMLInputElement }) => {
|
||||
element.querySelectorAll('input[type="file"]').forEach(item => {
|
||||
item.addEventListener("change", (event: InputEvent & { target: HTMLInputElement }) => {
|
||||
if (event.target.files.length === 0) {
|
||||
return;
|
||||
}
|
||||
@@ -224,7 +223,7 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
|
||||
uploadFiles(protyle, event.target.files, event.target);
|
||||
hideElements(["hint", "toolbar"], protyle);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private getHTMLByData(data: IHintData[]) {
|
||||
|
||||
Reference in New Issue
Block a user