Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
import { ISidebarService, useDependency } from '@univerjs/ui';
import { WATERMARK_PANEL, WATERMARK_PANEL_FOOTER } from '../controllers/components.controller';
export function useWatermark() {
const sidebarService = useDependency(ISidebarService);
const onSelect = () => {
sidebarService.open({
header: { title: 'Watermark' },
children: { label: WATERMARK_PANEL },
footer: { label: WATERMARK_PANEL_FOOTER },
onClose: () => { },
width: 330,
});
};
return {
type: 'item' as const,
children: '🌊 Watermark Settings',
onSelect,
};
}