mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🎨 复制纯文本 时移除所有零宽空格 Fix https://github.com/siyuan-note/siyuan/issues/6674
This commit is contained in:
parent
3ab71117f6
commit
14a8b1f8a4
4 changed files with 13 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import {focusByRange} from "./selection";
|
||||
import {fetchPost} from "../../util/fetch";
|
||||
import {Constants} from "../../constants";
|
||||
|
||||
export const openByMobile = (uri: string) => {
|
||||
if (!uri) {
|
||||
|
|
@ -59,6 +60,11 @@ export const writeText = async (text: string) => {
|
|||
}
|
||||
};
|
||||
|
||||
export const copyPlainText = async (text: string) => {
|
||||
text = text.replace(new RegExp(Constants.ZWSP, "g"), ""); // `复制纯文本` 时移除所有零宽空格 https://github.com/siyuan-note/siyuan/issues/6674
|
||||
await writeText(text);
|
||||
};
|
||||
|
||||
// 用户 iPhone 点击延迟/需要双击的处理
|
||||
export const getEventName = () => {
|
||||
if (navigator.userAgent.indexOf("iPhone") > -1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue