mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 11:30:42 +08:00
This commit is contained in:
parent
a6522c59c8
commit
2c2dce16fd
@ -891,9 +891,8 @@ export class Toolbar {
|
|||||||
focusSideBlock(renderElement);
|
focusSideBlock(renderElement);
|
||||||
}
|
}
|
||||||
} else if (event.key === "Tab") {
|
} else if (event.key === "Tab") {
|
||||||
const start = textElement.selectionStart;
|
// https://github.com/siyuan-note/siyuan/issues/5270
|
||||||
textElement.value = textElement.value.substring(0, start) + "\t" + textElement.value.substring(textElement.selectionEnd);
|
document.execCommand("insertText", false, "\t");
|
||||||
textElement.selectionStart = textElement.selectionEnd = start + 1;
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -181,6 +181,8 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
|
|||||||
protyle.hint.render(protyle);
|
protyle.hint.render(protyle);
|
||||||
}
|
}
|
||||||
hideElements(["gutter"], protyle);
|
hideElements(["gutter"], protyle);
|
||||||
|
// 在数学公式输入框中撤销到最后一步,再继续撤销会撤销编辑器正文内容,从而出发 input 事件
|
||||||
|
protyle.toolbar.subElement.classList.add("fn__none");
|
||||||
updateInput(html, protyle, id, type, todoOldHTML);
|
updateInput(html, protyle, id, type, todoOldHTML);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user