@univerjs/sheets-hyper-link-ui
TypeScript icon, indicating that this package has built-in type declarations

0.8.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @univerjs/sheets-hyper-link-ui

Homepage

univer.ai

Weekly Downloads

3,364

Version

0.8.2

License

Apache-2.0

Unpacked Size

348 kB

Total Files

72

Last publish

Collaborators

  • wendellhu95
  • jikkai
  • wbfsa
  • yuhongz
  • mengshukeji