mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
🚨
This commit is contained in:
parent
5886ac6bbc
commit
3b2d8be023
4 changed files with 11 additions and 11 deletions
|
|
@ -226,8 +226,8 @@ const renderEmojiContent = (previousIndex: string, previousContentElement: Eleme
|
|||
});
|
||||
previousContentElement.innerHTML = html;
|
||||
previousContentElement.removeAttribute("data-index");
|
||||
previousContentElement.removeAttribute("style")
|
||||
}
|
||||
previousContentElement.removeAttribute("style");
|
||||
};
|
||||
|
||||
export const openEmojiPanel = (id: string, type: "doc" | "notebook" | "av", position: IPosition, callback?: (emoji: string) => void, dynamicImgElement?: HTMLElement) => {
|
||||
if (type !== "av") {
|
||||
|
|
|
|||
|
|
@ -1402,9 +1402,9 @@ export class Gutter {
|
|||
click() {
|
||||
const oldHTML = nodeElement.outerHTML;
|
||||
if (isCol) {
|
||||
nodeElement.setAttribute("data-sb-layout", "row")
|
||||
nodeElement.setAttribute("data-sb-layout", "row");
|
||||
} else {
|
||||
nodeElement.setAttribute("data-sb-layout", "col")
|
||||
nodeElement.setAttribute("data-sb-layout", "col");
|
||||
}
|
||||
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ export const editAssetItem = (options: {
|
|||
});
|
||||
}
|
||||
});
|
||||
menu.addSeparator()
|
||||
menu.addSeparator();
|
||||
menu.addItem({
|
||||
label: window.siyuan.languages.copy,
|
||||
icon: "iconCopy",
|
||||
|
|
|
|||
|
|
@ -1571,14 +1571,14 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
if (selectsElement.length === 1 && selectsElement[0].getAttribute("data-type") === "NodeSuperBlock") {
|
||||
if (selectsElement[0].getAttribute("data-sb-layout") === "col") {
|
||||
const oldHTML = selectsElement[0].outerHTML;
|
||||
selectsElement[0].setAttribute("data-sb-layout", "row")
|
||||
selectsElement[0].setAttribute("data-sb-layout", "row");
|
||||
selectsElement[0].setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
updateTransaction(protyle, selectsElement[0].getAttribute("data-node-id"), selectsElement[0].outerHTML, oldHTML);
|
||||
} else {
|
||||
range.insertNode(document.createElement("wbr"))
|
||||
range.insertNode(document.createElement("wbr"));
|
||||
const sbData = cancelSB(protyle, selectsElement[0]);
|
||||
transaction(protyle, sbData.doOperations, sbData.undoOperations);
|
||||
focusByWbr(protyle.wysiwyg.element, range)
|
||||
focusByWbr(protyle.wysiwyg.element, range);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -1600,14 +1600,14 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
if (selectsElement.length === 1 && selectsElement[0].getAttribute("data-type") === "NodeSuperBlock") {
|
||||
if (selectsElement[0].getAttribute("data-sb-layout") === "row") {
|
||||
const oldHTML = selectsElement[0].outerHTML;
|
||||
selectsElement[0].setAttribute("data-sb-layout", "col")
|
||||
selectsElement[0].setAttribute("data-sb-layout", "col");
|
||||
selectsElement[0].setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
|
||||
updateTransaction(protyle, selectsElement[0].getAttribute("data-node-id"), selectsElement[0].outerHTML, oldHTML);
|
||||
} else {
|
||||
range.insertNode(document.createElement("wbr"))
|
||||
range.insertNode(document.createElement("wbr"));
|
||||
const sbData = cancelSB(protyle, selectsElement[0]);
|
||||
transaction(protyle, sbData.doOperations, sbData.undoOperations);
|
||||
focusByWbr(protyle.wysiwyg.element, range)
|
||||
focusByWbr(protyle.wysiwyg.element, range);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue