Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-11-22 01:22:54 +08:00
commit 5f5d70740e
5 changed files with 18 additions and 10 deletions

View file

@ -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) {