mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-18 01:50:58 +08:00
This commit is contained in:
parent
a252068365
commit
fc85a72a1b
@ -575,8 +575,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
document.onmouseup = null;
|
||||
});
|
||||
editorElement.addEventListener("drop", async (event: DragEvent & { target: HTMLElement }) => {
|
||||
if (event.dataTransfer.getData(Constants.SIYUAN_DROP_EDITOR)) {
|
||||
// 编辑器内选中文字拖拽
|
||||
if (protyle.disabled || event.dataTransfer.getData(Constants.SIYUAN_DROP_EDITOR)) {
|
||||
// 只读模式/编辑器内选中文字拖拽
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return;
|
||||
|
@ -1267,6 +1267,11 @@ export class WYSIWYG {
|
||||
});
|
||||
|
||||
this.element.addEventListener("paste", (event: ClipboardEvent & { target: HTMLElement }) => {
|
||||
if (protyle.disabled) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
|
||||
// https://github.com/siyuan-note/siyuan/issues/4600
|
||||
if (event.target.tagName === "PROTYLE-HTML") {
|
||||
|
Loading…
Reference in New Issue
Block a user