mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🚨
This commit is contained in:
parent
09b4304df2
commit
ab69eb5732
9 changed files with 45 additions and 73 deletions
|
|
@ -317,13 +317,13 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
|
|||
${window.siyuan.languages.insertRowBefore.replace("${x}", '<span class="fn__space"></span><input style="width:64px" type="number" step="1" min="1" placeholder="Enter" class="b3-text-field"><span class="fn__space"></span>')}
|
||||
</div>`,
|
||||
bind(element) {
|
||||
const inputElement = element.querySelector("input")
|
||||
const inputElement = element.querySelector("input");
|
||||
inputElement.addEventListener("keydown", (event: KeyboardEvent) => {
|
||||
if (!event.isComposing && event.key === "Enter") {
|
||||
insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].previousElementSibling.getAttribute("data-id"));
|
||||
menu.close();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
menu.addItem({
|
||||
|
|
@ -333,13 +333,13 @@ ${window.siyuan.languages.insertRowBefore.replace("${x}", '<span class="fn__spac
|
|||
${window.siyuan.languages.insertRowAfter.replace("${x}", '<span class="fn__space"></span><input style="width:64px" type="number" step="1" min="1" placeholder="Enter" class="b3-text-field"><span class="fn__space"></span>')}
|
||||
</div>`,
|
||||
bind(element) {
|
||||
const inputElement = element.querySelector("input")
|
||||
const inputElement = element.querySelector("input");
|
||||
inputElement.addEventListener("keydown", (event: KeyboardEvent) => {
|
||||
if (!event.isComposing && event.key === "Enter") {
|
||||
insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].getAttribute("data-id"));
|
||||
menu.close();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
menu.addSeparator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue