🎨 https://github.com/siyuan-note/siyuan/issues/15330 经查看 lute 现在没有限制,因此前端也移除对其的限制

This commit is contained in:
Vanessa 2025-08-01 21:36:29 +08:00
parent 03b83d1247
commit b126d34dde

View file

@ -555,15 +555,11 @@ export class Gutter {
public renderMultipleMenu(protyle: IProtyle, selectsElement: Element[]) {
let isList = false;
let isContinue = false;
let hasEmbedBlock = false;
selectsElement.find((item, index) => {
if (item.classList.contains("li")) {
isList = true;
return true;
}
if (item.classList.contains("sb") || item.classList.contains("p")) {
hasEmbedBlock = true;
}
if (item.nextElementSibling && selectsElement[index + 1] &&
item.nextElementSibling === selectsElement[index + 1]) {
isContinue = true;
@ -612,19 +608,16 @@ export class Gutter {
type: "Blocks2Blockquote"
}));
}
// 多选引用转换为块的时候 id 不一致
if (!hasEmbedBlock) {
turnIntoSubmenu.push(this.turnsInto({
menuId: "paragraph",
icon: "iconParagraph",
label: window.siyuan.languages.paragraph,
accelerator: window.siyuan.config.keymap.editor.heading.paragraph.custom,
protyle,
selectsElement,
type: "Blocks2Ps",
isContinue
}));
}
turnIntoSubmenu.push(this.turnsInto({
menuId: "paragraph",
icon: "iconParagraph",
label: window.siyuan.languages.paragraph,
accelerator: window.siyuan.config.keymap.editor.heading.paragraph.custom,
protyle,
selectsElement,
type: "Blocks2Ps",
isContinue
}));
turnIntoSubmenu.push(this.turnsInto({
menuId: "heading1",
icon: "iconH1",