@univerjswatermarkfacadeinterfacesIfuniverwatermarkmixin

@univerjs/watermark v0.5.1Docs


Interface: IFUniverWatermarkMixin

Methods

addWatermark()

addWatermark(type, config)

addWatermark(type, config): void

Adds a watermark to the unit. Supports both text and image watermarks based on the specified type.

Parameters
ParameterTypeDescription
typeTextThe type of watermark to add. Can be either ‘Text’ or ‘Image’.
configITextWatermarkConfigThe configuration object for the watermark. - If the type is ‘Text’, the config should follow the ITextWatermarkConfig interface. - If the type is ‘Image’, the config should follow the IImageWatermarkConfig interface.
Returns

void

Throws

Throws an error if the watermark type is unknown.

Defined in

watermark/src/facade/f-univer.ts:31

addWatermark(type, config)

addWatermark(type, config): void
Parameters
ParameterType
typeImage
configIImageWatermarkConfig
Returns

void

Defined in

watermark/src/facade/f-univer.ts:32

addWatermark(type, config)

addWatermark(type, config): void
Parameters
ParameterType
typeText | Image
configITextWatermarkConfig | IImageWatermarkConfig
Returns

void

Defined in

watermark/src/facade/f-univer.ts:33


deleteWatermark()

deleteWatermark(): void

Deletes the currently applied watermark from the unit.

This function retrieves the watermark service and invokes the method to remove any existing watermark configuration.

Returns

void

Defined in

watermark/src/facade/f-univer.ts:43