mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
This commit is contained in:
parent
1d1e224dd2
commit
c1ec8035b2
6 changed files with 31 additions and 6 deletions
|
|
@ -1226,13 +1226,38 @@ export class Gutter {
|
|||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconCopy",
|
||||
label: window.siyuan.languages.copyHeadings,
|
||||
label: `${window.siyuan.languages.copy} <b>${window.siyuan.languages.headings1}</b>`,
|
||||
click() {
|
||||
fetchPost("/api/block/getHeadingChildrenDOM", {id}, (response) => {
|
||||
writeText(response.data + Constants.ZWSP);
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconCut",
|
||||
label: `${window.siyuan.languages.cut} <b>${window.siyuan.languages.headings1}</b>`,
|
||||
click() {
|
||||
fetchPost("/api/block/getHeadingChildrenDOM", {id}, (response) => {
|
||||
writeText(response.data + Constants.ZWSP);
|
||||
fetchPost("/api/block/getHeadingDeleteTransaction", {
|
||||
id,
|
||||
}, (response) => {
|
||||
transaction(protyle, response.data.doOperations, response.data.undoOperations);
|
||||
});
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconTrashcan",
|
||||
label: `${window.siyuan.languages.delete} <b>${window.siyuan.languages.headings1}</b>`,
|
||||
click() {
|
||||
fetchPost("/api/block/getHeadingDeleteTransaction", {
|
||||
id,
|
||||
}, (response) => {
|
||||
transaction(protyle, response.data.doOperations, response.data.undoOperations);
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
}
|
||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue