mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
This commit is contained in:
parent
9cae635647
commit
4bc21c493b
8 changed files with 12 additions and 13 deletions
|
|
@ -959,7 +959,7 @@ export class Toolbar {
|
|||
const msgId = showMessage(window.siyuan.languages.exporting, 0);
|
||||
if (renderElement.getAttribute("data-subtype") === "plantuml") {
|
||||
fetch(renderElement.querySelector("img").getAttribute("src")).then(function (response) {
|
||||
return response.blob()
|
||||
return response.blob();
|
||||
}).then(function (blob) {
|
||||
const formData = new FormData();
|
||||
formData.append("file", blob);
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
|
||||
if ((event.shiftKey && !event.altKey && !isCtrl(event) && (event.key === "Home" || event.key === "End") && isMac()) ||
|
||||
(event.shiftKey && !event.altKey && isCtrl(event) && (event.key === "Home" || event.key === "End") && !isMac())) {
|
||||
const topElement = hasTopClosestByAttribute(nodeElement, "data-node-id", null)
|
||||
const topElement = hasTopClosestByAttribute(nodeElement, "data-node-id", null);
|
||||
if (topElement) {
|
||||
topElement.classList.add("protyle-wysiwyg--select");
|
||||
let nextElement = event.key === "Home" ? topElement.previousElementSibling : topElement.nextElementSibling;
|
||||
|
|
@ -469,9 +469,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
nextElement = event.key === "Home" ? nextElement.previousElementSibling : nextElement.nextElementSibling;
|
||||
}
|
||||
if (event.key === "Home") {
|
||||
protyle.wysiwyg.element.firstElementChild.scrollIntoView()
|
||||
protyle.wysiwyg.element.firstElementChild.scrollIntoView();
|
||||
} else {
|
||||
protyle.wysiwyg.element.lastElementChild.scrollIntoView(false)
|
||||
protyle.wysiwyg.element.lastElementChild.scrollIntoView(false);
|
||||
}
|
||||
}
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue