mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
b313ee93ad
commit
b61dfc2a7f
3 changed files with 11 additions and 2 deletions
|
|
@ -299,6 +299,7 @@ export const about = {
|
||||||
confirmDialog("⚠️ " + window.siyuan.languages.resetRepo, window.siyuan.languages.resetRepoTip, () => {
|
confirmDialog("⚠️ " + window.siyuan.languages.resetRepo, window.siyuan.languages.resetRepoTip, () => {
|
||||||
fetchPost("/api/repo/resetRepo", {}, () => {
|
fetchPost("/api/repo/resetRepo", {}, () => {
|
||||||
window.siyuan.config.repo.key = "";
|
window.siyuan.config.repo.key = "";
|
||||||
|
window.siyuan.config.sync.enabled = false;
|
||||||
importKeyElement.parentElement.classList.remove("fn__none");
|
importKeyElement.parentElement.classList.remove("fn__none");
|
||||||
importKeyElement.parentElement.nextElementSibling.classList.add("fn__none");
|
importKeyElement.parentElement.nextElementSibling.classList.add("fn__none");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,7 @@ ${accountHTML}
|
||||||
confirmDialog(window.siyuan.languages.remove, "", () => {
|
confirmDialog(window.siyuan.languages.remove, "", () => {
|
||||||
fetchPost("/api/repo/resetRepo", {}, () => {
|
fetchPost("/api/repo/resetRepo", {}, () => {
|
||||||
window.siyuan.config.repo.key = "";
|
window.siyuan.config.repo.key = "";
|
||||||
|
window.siyuan.config.sync.enabled = false;
|
||||||
importKeyElement.parentElement.classList.remove("fn__none");
|
importKeyElement.parentElement.classList.remove("fn__none");
|
||||||
importKeyElement.parentElement.nextElementSibling.classList.add("fn__none");
|
importKeyElement.parentElement.nextElementSibling.classList.add("fn__none");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,10 @@ const listEnter = (protyle: IProtyle, blockElement: HTMLElement, range: Range) =
|
||||||
removeEmptyNode(newElement);
|
removeEmptyNode(newElement);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (range.toString() === "" && range.startContainer.nodeType === 3 && range.startContainer.textContent === Constants.ZWSP && range.startOffset === 0) {
|
||||||
|
// 图片后的零宽空格前回车 https://github.com/siyuan-note/siyuan/issues/5690
|
||||||
|
range.setStart(range.startContainer, 1);
|
||||||
|
}
|
||||||
range.insertNode(document.createElement("wbr"));
|
range.insertNode(document.createElement("wbr"));
|
||||||
const listItemHTML = listItemElement.outerHTML;
|
const listItemHTML = listItemElement.outerHTML;
|
||||||
const html = listItemElement.parentElement.outerHTML;
|
const html = listItemElement.parentElement.outerHTML;
|
||||||
|
|
@ -354,6 +357,10 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
||||||
removeEmptyNode(newElement);
|
removeEmptyNode(newElement);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (range.toString() === "" && range.startContainer.nodeType === 3 && range.startContainer.textContent === Constants.ZWSP && range.startOffset === 0) {
|
||||||
|
// 图片后的零宽空格前回车 https://github.com/siyuan-note/siyuan/issues/5690
|
||||||
|
range.setStart(range.startContainer, 1);
|
||||||
|
}
|
||||||
range.insertNode(document.createElement("wbr"));
|
range.insertNode(document.createElement("wbr"));
|
||||||
const html = blockElement.outerHTML;
|
const html = blockElement.outerHTML;
|
||||||
if (range.toString() !== "") {
|
if (range.toString() !== "") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue