mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
2a201e8bab
commit
6bc95e9f09
2 changed files with 5 additions and 4 deletions
|
|
@ -227,7 +227,7 @@ export const showPopover = async () => {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!hasPin &&
|
if (!hasPin && popoverTargetElement.parentElement &&
|
||||||
popoverTargetElement.parentElement.style.opacity !== "0.1" // 反向面板图标拖拽时不应该弹层
|
popoverTargetElement.parentElement.style.opacity !== "0.1" // 反向面板图标拖拽时不应该弹层
|
||||||
) {
|
) {
|
||||||
window.siyuan.blockPanels.push(new BlockPanel({
|
window.siyuan.blockPanels.push(new BlockPanel({
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,9 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
||||||
const tempInnerHTML = tempElement.innerHTML;
|
const tempInnerHTML = tempElement.innerHTML;
|
||||||
insertHTML(tempInnerHTML, protyle, isBlock);
|
insertHTML(tempInnerHTML, protyle, isBlock);
|
||||||
filterClipboardHint(protyle, tempInnerHTML);
|
filterClipboardHint(protyle, tempInnerHTML);
|
||||||
|
blockRender(protyle, protyle.wysiwyg.element);
|
||||||
|
processRender(protyle.wysiwyg.element);
|
||||||
|
highlightRender(protyle.wysiwyg.element);
|
||||||
} else if (code) {
|
} else if (code) {
|
||||||
if (!code.startsWith('<div data-type="NodeCodeBlock" class="code-block" data-node-id="')) {
|
if (!code.startsWith('<div data-type="NodeCodeBlock" class="code-block" data-node-id="')) {
|
||||||
const wbrElement = document.createElement("wbr");
|
const wbrElement = document.createElement("wbr");
|
||||||
|
|
@ -219,9 +222,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let isHTML = false;
|
let isHTML = false;
|
||||||
if (textHTML.startsWith(Constants.ZWSP) || textHTML.endsWith(Constants.ZWSP)) {
|
if (textHTML.replace("<!--StartFragment--><!--EndFragment-->", "").trim() !== "") {
|
||||||
isHTML = true;
|
|
||||||
} else if (textHTML.replace("<!--StartFragment--><!--EndFragment-->", "").trim() !== "") {
|
|
||||||
textHTML = textHTML.replace("<!--StartFragment-->", "").replace("<!--EndFragment-->", "").trim();
|
textHTML = textHTML.replace("<!--StartFragment-->", "").replace("<!--EndFragment-->", "").trim();
|
||||||
if (files && files.length === 1 && (
|
if (files && files.length === 1 && (
|
||||||
textHTML.startsWith("<img") || // 浏览器上复制单个图片
|
textHTML.startsWith("<img") || // 浏览器上复制单个图片
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue