HyperLink
Facade API | Has Paid Plan | Univer Server | Univer on Node.js | Preset |
---|---|---|---|---|
- | - | - | - | UniverDocsHyperLinkPreset |
Insert hyperlinks in the document.
This feature includes the following plugin packages:
@univerjs/docs-hyper-link
- HyperLink Plugin@univerjs/docs-hyper-link-ui
- HyperLink UI Plugin
Presets Installation
import { createUniver, defaultTheme, LocaleType, merge } from '@univerjs/presets';
import { UniverDocsCorePreset } from '@univerjs/presets/preset-docs-core';
import UniverPresetDocsCoreEnUS from '@univerjs/presets/preset-docs-core/locales/en-US';
import { UniverDocsHyperLinkPreset } from '@univerjs/presets/preset-docs-hyper-link';
import UniverPresetDocsHyperLinkEnUS from '@univerjs/presets/preset-docs-hyper-link/locales/en-US';
import '@univerjs/presets/lib/styles/preset-docs-hyper-link.css'
const { univerAPI } = createUniver({
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: merge(
{},
UniverPresetDocsCoreEnUS,
UniverPresetDocsHyperLinkEnUS
),
},
theme: defaultTheme,
presets: [
UniverDocsCorePreset(),
UniverDocsHyperLinkPreset(),
],
});
Piecemeal Installation
npm install @univerjs/docs-hyper-link @univerjs/docs-hyper-link-ui
import { LocaleType, merge, Univer } from '@univerjs/core';
import { defaultTheme } from "@univerjs/design";
import { UniverDocsHyperLinkPlugin } from '@univerjs/docs-hyper-link';
import { UniverDocsHyperLinkUIPlugin } from '@univerjs/docs-hyper-link-ui';
import DocsHyperLinkUIEnUS from '@univerjs/docs-hyper-link-ui/locale/en-US';
import '@univerjs/docs-hyper-link-ui/lib/index.css';
const univer = new Univer({
theme: defaultTheme,
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: merge(
DocsHyperLinkUIEnUS
),
},
});
univer.registerPlugin(UniverDocsHyperLinkPlugin);
univer.registerPlugin(UniverDocsHyperLinkUIPlugin);