🐛 card 转义
This commit is contained in:
parent
78ee4baefb
commit
6fc15a3b6a
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ export const makeCard = (ids: string[]) => {
|
|||
event.preventDefault();
|
||||
break;
|
||||
} else if (type === "delete") {
|
||||
confirmDialog(window.siyuan.languages.confirm, `${window.siyuan.languages.confirmDelete} <b>${target.parentElement.getAttribute("data-name")}</b>?`, () => {
|
||||
confirmDialog(window.siyuan.languages.confirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(target.parentElement.getAttribute("data-name"))}</b>?`, () => {
|
||||
fetchPost("/api/riff/removeRiffDeck", {
|
||||
deckID: target.parentElement.getAttribute("data-id"),
|
||||
}, () => {
|
||||
|
|
|
@ -363,7 +363,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
}
|
||||
const newElement = genEmptyElement(false, false);
|
||||
const selectNode = range.extractContents();
|
||||
if (selectNode.firstChild.nodeType !== 3 && selectNode.firstChild.textContent === "") {
|
||||
if (selectNode.firstChild && selectNode.firstChild.nodeType !== 3 && selectNode.firstChild.textContent === "") {
|
||||
// 回车移除空元素 https://github.com/siyuan-note/insider/issues/480
|
||||
selectNode.firstChild.after(document.createElement("wbr"));
|
||||
selectNode.firstChild.remove();
|
||||
|
|
Loading…
Add table
Reference in a new issue