mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
🎨 数据库块适配外观和宽度调整
This commit is contained in:
parent
a20ffeb12b
commit
9978827389
1 changed files with 19 additions and 3 deletions
|
|
@ -70,6 +70,7 @@ import {insertHTML} from "../util/insertHTML";
|
|||
import {removeSearchMark} from "../toolbar/util";
|
||||
import {copyPNG} from "../../menus/util";
|
||||
import {avKeydown} from "../render/av/keydown";
|
||||
import {resizeAV} from "../util/resize";
|
||||
|
||||
|
||||
const getContentByInlineHTML = (range: Range, cb: (content: string) => void) => {
|
||||
|
|
@ -1174,7 +1175,12 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
selectElements = [nodeElement];
|
||||
}
|
||||
updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {
|
||||
e.style.textAlign = "left";
|
||||
if (e.classList.contains("av")) {
|
||||
e.style.margin = ""
|
||||
resizeAV(e);
|
||||
} else {
|
||||
e.style.textAlign = "left";
|
||||
}
|
||||
});
|
||||
}
|
||||
event.stopPropagation();
|
||||
|
|
@ -1191,7 +1197,12 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
selectElements = [nodeElement];
|
||||
}
|
||||
updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {
|
||||
e.style.textAlign = "center";
|
||||
if (e.classList.contains("av")) {
|
||||
e.style.margin = "0 auto"
|
||||
resizeAV(e);
|
||||
} else {
|
||||
e.style.textAlign = "center";
|
||||
}
|
||||
});
|
||||
}
|
||||
event.stopPropagation();
|
||||
|
|
@ -1204,7 +1215,12 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
selectElements = [nodeElement];
|
||||
}
|
||||
updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {
|
||||
e.style.textAlign = "right";
|
||||
if (e.classList.contains("av")) {
|
||||
e.style.margin = "0 0 0 auto";
|
||||
resizeAV(e);
|
||||
} else {
|
||||
e.style.textAlign = "right";
|
||||
}
|
||||
});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue