Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/9183

Vanessab902789aa4ed
diff --git a/app/src/assets/scss/pdf/_pdf.scss b/app/src/assets/scss/pdf/_pdf.scss
index 788e2f2d8f..c52662b468 100644
--- a/app/src/assets/scss/pdf/_pdf.scss
+++ b/app/src/assets/scss/pdf/_pdf.scss
@@ -39,6 +39,7 @@
&__util {
z-index: 4;
+ padding: 8px;
&--hide .pdf__util__hide {
display: none;
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 2a44ebe456..1cb98a8b30 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -301,6 +301,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
uploadFiles(protyle, files);
} else if (textPlain.trim() !== "" && files && files.length === 0) {
if (range.toString() !== "") {
+ const firstLine = textPlain.split("\n")[0];
if (isDynamicRef(textPlain)) {
protyle.toolbar.setInlineMark(protyle, "block-ref", "range", {
type: "id",
@@ -308,10 +309,10 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
color: `${textPlain.substring(2, 22 + 2)}${Constants.ZWSP}s${Constants.ZWSP}${range.toString()}`
});
return;
- } else if (isFileAnnotation(textPlain)) {
+ } else if (isFileAnnotation(firstLine)) {
protyle.toolbar.setInlineMark(protyle, "file-annotation-ref", "range", {
type: "file-annotation-ref",
- color: textPlain.substring(2).replace(/ ".+">>$/, "")
+ color: firstLine.substring(2).replace(/ ".+">>$/, "")
});
return;
} else if (protyle.lute.IsValidLinkDest(textPlain)) {