超链接
📊 Univer Sheet📝 Univer Doc
支持在文档中插入超链接。
安装
pnpm add @univerjs/docs-hyper-link @univerjs/docs-hyper-link-ui
引入
import '@univerjs/docs-hyper-link-ui/lib/index.css';
import { UniverDocsHyperLinkPlugin } from '@univerjs/docs-hyper-link';
import { UniverDocsHyperLinkUIPlugin } from '@univerjs/docs-hyper-link-ui';
国际化
import { LocaleType, Tools } from '@univerjs/core';
import DocsHyperLinkUIZhCN from '@univerjs/docs-hyper-link-ui/locale/zh-CN';
const univer = new Univer({
theme: defaultTheme,
locale: LocaleType.ZH_CN,
locales: {
[LocaleType.ZH_CN]: Tools.deepMerge(
DocsHyperLinkUIZhCN
),
},
});
注册
univer.registerPlugin(UniverDocsHyperLinkPlugin);
univer.registerPlugin(UniverDocsHyperLinkUIPlugin);