zhaojinyu e984acc6d0 first commit 3 месяцев назад
..
lib e984acc6d0 first commit 3 месяцев назад
LICENSE e984acc6d0 first commit 3 месяцев назад
README.md e984acc6d0 first commit 3 месяцев назад
package.json e984acc6d0 first commit 3 месяцев назад

README.md

@univerjs/sheets-hyper-link-ui

Package Overview

Package Name UMD Namespace Version License Downloads Contains CSS Contains i18n locales
@univerjs/sheets-hyper-link-ui UniverSheetsHyperLinkUi ⭕️ ⭕️

Introduction

@univerjs/sheets-hyper-link-ui provides a hyperlink feature that allows users to create links for quick access to resources both within and outside of the spreadsheet, including web pages, files, email addresses, or other locations in the workbook.

Usage

Installation

# Using npm
npm install @univerjs/sheets-hyper-link-ui

# Using pnpm
pnpm add @univerjs/sheets-hyper-link-ui

Register the plugin

import { UniverSheetsHyperLinkUIPlugin } from '@univerjs/sheets-hyper-link-ui';

univer.registerPlugin(UniverSheetsHyperLinkUIPlugin);

API

// All commands
import { AddHyperLinkCommand, type IAddHyperLinkCommandParams } from '@univerjs/sheets-hyper-link-ui';
import { RemoveHyperLinkCommand, CancelHyperLinkCommand, type IRemoveHyperLinkCommandParams } from '@univerjs/sheets-hyper-link-ui';
import { UpdateHyperLinkCommand, type IUpdateHyperLinkCommandParams } from '@univerjs/sheets-hyper-link-ui';

// Add hyperlink by command
const commandService = univer.__getInjector().get(ICommandService);

commandService.executeCommand(AddHyperLinkCommand.id, {
    unitId: 'unitId',
    subUnitId: 'subUnitId',
    link: {
        // comment content
        payload: 'https://univer.ai',
        id: '1',
        row: 0,
        column: 0
    },
} as IAddCommentCommandParams);