# @embedpdf/plugin-annotation — ./commands createAnnotationCommands [FunctionDeclaration]: export function createAnnotationCommands(): readonly CommandDefinition[]{ return [{ id: 'annotation:delete', labelKey: 'commands.annotation.delete', label: 'Delete', icon: 'delete', shortcut: ['Delete', 'Backspace'], categories: ['annotation'], run: (context) => context.get(AnnotationToken).selection.delete({ signal: context.signal} ), enabled: (context) =>{ const annotation = context.tryGet(AnnotationToken); if (!annotation) return false; const selected = annotation.selection.getSelected(); return ( selected.length > 0 && selected.every(({ ref} ) => annotation.canDelete(ref) && annotation.isEditable(ref)) ); } , } , ]; }