mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
3f9e6d0eaa
commit
9dba5dbb4a
1 changed files with 208 additions and 205 deletions
|
|
@ -875,6 +875,8 @@ export class Outline extends Model {
|
|||
const currentLevel = this.getHeadingLevel(element);
|
||||
window.siyuan.menus.menu.remove();
|
||||
window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_OUTLINE_CONTEXT);
|
||||
const id = element.getAttribute("data-node-id");
|
||||
if (!window.siyuan.config.readonly) {
|
||||
// 升级
|
||||
if (currentLevel > 1) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
|
|
@ -916,7 +918,6 @@ export class Outline extends Model {
|
|||
}
|
||||
|
||||
// 带子标题转换
|
||||
const id = element.getAttribute("data-node-id");
|
||||
checkFold(id, (zoomIn) => {
|
||||
openFileById({
|
||||
app: this.app,
|
||||
|
|
@ -1059,6 +1060,7 @@ export class Outline extends Model {
|
|||
}
|
||||
|
||||
window.siyuan.menus.menu.append(new MenuItem({id: "separator_2", type: "separator"}).element);
|
||||
}
|
||||
|
||||
// 复制带子标题
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
|
|
@ -1082,6 +1084,7 @@ export class Outline extends Model {
|
|||
}
|
||||
}).element);
|
||||
|
||||
if (!window.siyuan.config.readonly) {
|
||||
// 剪切带子标题
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
id: "cutHeadings1",
|
||||
|
|
@ -1165,7 +1168,7 @@ export class Outline extends Model {
|
|||
});
|
||||
}
|
||||
}).element);
|
||||
|
||||
}
|
||||
window.siyuan.menus.menu.append(new MenuItem({id: "separator_3", type: "separator"}).element);
|
||||
|
||||
// 展开子标题
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue