@univerjs/watermark v0.5.1 • Docs
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
Parameter | Type | Description |
---|---|---|
type | Text | The type of watermark to add. Can be either ‘Text’ or ‘Image’. |
config | ITextWatermarkConfig | The 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
Parameter | Type |
---|---|
type | Image |
config | IImageWatermarkConfig |
Returns
void
Defined in
watermark/src/facade/f-univer.ts:32
addWatermark(type, config)
addWatermark(type, config): void
Parameters
Parameter | Type |
---|---|
type | Text | Image |
config | ITextWatermarkConfig | 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