mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
8c35440a77
commit
74b4a00a2f
42 changed files with 426 additions and 270 deletions
|
|
@ -19,6 +19,7 @@ import {uploadLocalFiles} from "../upload";
|
|||
import {insertHTML} from "./insertHTML";
|
||||
import {isBrowser} from "../../util/functions";
|
||||
import {hideElements} from "../ui/hideElements";
|
||||
import {App} from "../../index";
|
||||
|
||||
const moveToNew = (protyle: IProtyle, sourceElements: Element[], targetElement: Element, newSourceElement: Element,
|
||||
isSameDoc: boolean, isBottom: boolean, isCopy: boolean) => {
|
||||
|
|
@ -695,7 +696,7 @@ const dragSame = async (protyle: IProtyle, sourceElements: Element[], targetElem
|
|||
focusBlock(sourceElements[0]);
|
||||
};
|
||||
|
||||
export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
export const dropEvent = (app: App, protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
editorElement.addEventListener("dragstart", (event) => {
|
||||
const target = event.target as HTMLElement;
|
||||
if (target.tagName === "IMG") {
|
||||
|
|
@ -852,7 +853,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
id: protyle.block.id,
|
||||
size: window.siyuan.config.editor.dynamicLoadBlocks,
|
||||
}, getResponse => {
|
||||
onGet(getResponse, protyle);
|
||||
onGet({data: getResponse, protyle, app});
|
||||
/// #if !MOBILE
|
||||
// 文档标题互转后,需更新大纲
|
||||
updatePanelByEditor({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue