mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 06:24:06 +01:00
This commit is contained in:
parent
fc1cbf46aa
commit
4e4398ef47
3 changed files with 31 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import {Constants} from "../../constants";
|
||||
import {uploadFiles, uploadLocalFiles} from "../upload";
|
||||
import {processPasteCode, processRender} from "./processCode";
|
||||
import {getLocalFiles, readText} from "./compatibility";
|
||||
import {getLocalFiles, getTextSiyuanFromTextHTML, readText} from "./compatibility";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName} from "./hasClosest";
|
||||
import {getEditorRange} from "./selection";
|
||||
import {blockRender} from "../render/blockRender";
|
||||
|
|
@ -288,6 +288,12 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
|||
if (textPlain.endsWith(Constants.ZWSP) && !textHTML && !siyuanHTML) {
|
||||
siyuanHTML = textPlain.substr(0, textPlain.length - 1);
|
||||
}
|
||||
// 复制/剪切折叠标题需获取 siyuanHTML
|
||||
if (textHTML && textPlain && !siyuanHTML) {
|
||||
const textObj = getTextSiyuanFromTextHTML(textHTML);
|
||||
siyuanHTML = textObj.textSiyuan;
|
||||
textHTML = textObj.textHtml;
|
||||
}
|
||||
// 剪切复制中首位包含空格或仅有空格 https://github.com/siyuan-note/siyuan/issues/5667
|
||||
if (!siyuanHTML) {
|
||||
// process word
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue