Closed
Description
该问题是否已经被报告过了? Is there an existing issue for this?
- 我已经搜索了 Issues,没有发现类似问题
I have searched the existing issues
该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?
- 我能够在默认主题下重现该问题
I was able to reproduce the issue with the default theme
描述问题 Describe the problem
I can only copy paragraphs from a website with the "Web select" feature of Microsoft Edge if the paragraphs do not contain an image.
As soon as the selected paragraphs contain an image, only the image is pasted into SiYuan.
期待的结果 Expected result
I expect the paragraphs to be pasted into SiYuan, not the image alone.
截屏或者录屏演示 Screenshot or screen recording presentation
No response
版本环境 Version environment
- Version: v2.6.2
- Operating System: Windows 11
- Browser (if used): Microsoft Edge (as a source for copying text fragments into the clipboard)
日志文件 Log file
The log file is not applicable to this issue.
更多信息 More information
I think the code responsible for this is in app/src/protyle/util/paste.ts#L197
if (files && files. length === 1 && textHTML. indexOf("<img") > -1) {
isHTML = false;
} else {
isHTML = true;
}
Maybe, isHTML should only be set to false if, in addition to the existing checks, also textPlain. trim() == "".
The functionality of "Web Select" is best explained by this article:
https://www.stevefenton.co.uk/blog/2022/04/web-select-makes-copy-and-paste-easier/
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]Trying to paste a combination of html and image only pastes the image (using Web Select from Microsoft Edge browser)[/-][+]改进 Edge 浏览器 `Web 选择` 复制[/+]🎨 fix #7021
🎨 改进 Edge 浏览器 `Web 选择` 复制 Fix #7021