mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 00:21:00 +08:00
This commit is contained in:
parent
079328dee9
commit
d3742f0770
@ -145,8 +145,13 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
|
|||||||
if (blockElement.classList.contains("table")) {
|
if (blockElement.classList.contains("table")) {
|
||||||
scrollLeft = getContenteditableElement(blockElement).scrollLeft;
|
scrollLeft = getContenteditableElement(blockElement).scrollLeft;
|
||||||
}
|
}
|
||||||
// 使用 md 闭合后继续输入应为普通文本
|
if (/<span data-type="backslash">.<\/span><wbr>/.test(html)) {
|
||||||
blockElement.outerHTML = html.replace("</span><wbr>", "</span>" + Constants.ZWSP + "<wbr>");
|
// 转义不需要添加 zwsp
|
||||||
|
blockElement.outerHTML = html;
|
||||||
|
} else {
|
||||||
|
// 使用 md 闭合后继续输入应为普通文本
|
||||||
|
blockElement.outerHTML = html.replace("</span><wbr>", "</span>" + Constants.ZWSP + "<wbr>");
|
||||||
|
}
|
||||||
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${id}"]`).forEach((item: HTMLElement) => {
|
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${id}"]`).forEach((item: HTMLElement) => {
|
||||||
if (item.getAttribute("data-type") === "NodeBlockQueryEmbed" ||
|
if (item.getAttribute("data-type") === "NodeBlockQueryEmbed" ||
|
||||||
!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
|
!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user