mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🚨
This commit is contained in:
parent
7557c77b9f
commit
671f182d5c
6 changed files with 26 additions and 28 deletions
|
|
@ -598,7 +598,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
fetchPost("/api/asset/getImageOCRText", {
|
||||
path: imgElement.getAttribute("src"),
|
||||
force: true
|
||||
})
|
||||
});
|
||||
}
|
||||
}, {
|
||||
iconHTML: Constants.ZWSP,
|
||||
|
|
@ -608,8 +608,8 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
path: imgElement.getAttribute("src"),
|
||||
force: false
|
||||
}, (response) => {
|
||||
element.querySelector("textarea").value = response.data.text
|
||||
})
|
||||
element.querySelector("textarea").value = response.data.text;
|
||||
});
|
||||
}
|
||||
}],
|
||||
}).element);
|
||||
|
|
@ -708,7 +708,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
const textElements = window.siyuan.menus.menu.element.querySelectorAll("textarea");
|
||||
textElements[0].focus();
|
||||
window.siyuan.menus.menu.removeCB = () => {
|
||||
const ocrElemennt = window.siyuan.menus.menu.element.querySelector('[data-type="ocr"]') as HTMLTextAreaElement
|
||||
const ocrElemennt = window.siyuan.menus.menu.element.querySelector('[data-type="ocr"]') as HTMLTextAreaElement;
|
||||
if (ocrElemennt) {
|
||||
fetchPost("/api/asset/setImageOCRText", {
|
||||
path: imgElement.getAttribute("src"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue