mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +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);
|
const currentLevel = this.getHeadingLevel(element);
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_OUTLINE_CONTEXT);
|
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) {
|
if (currentLevel > 1) {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
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) => {
|
checkFold(id, (zoomIn) => {
|
||||||
openFileById({
|
openFileById({
|
||||||
app: this.app,
|
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({id: "separator_2", type: "separator"}).element);
|
||||||
|
}
|
||||||
|
|
||||||
// 复制带子标题
|
// 复制带子标题
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
|
|
@ -1082,6 +1084,7 @@ export class Outline extends Model {
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
|
||||||
|
if (!window.siyuan.config.readonly) {
|
||||||
// 剪切带子标题
|
// 剪切带子标题
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
id: "cutHeadings1",
|
id: "cutHeadings1",
|
||||||
|
|
@ -1165,7 +1168,7 @@ export class Outline extends Model {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
}
|
||||||
window.siyuan.menus.menu.append(new MenuItem({id: "separator_3", type: "separator"}).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