API / @aionbuilders/nabu/extend

PasteInterpreter

Type Stability: stable

Definition

TypeScript
import type { PasteInterpreter } from '@aionbuilders/nabu/extend';
TypeScript
interface PasteInterpreter {
  format: string;
  interpret: (raw: string, nabu: Nabu, options?: PasteInterpretOptions) => PasteFragment | null;
  outranksFiles?: (raw: string) => boolean;
  priority?: number;
}

Properties

Properties of PasteInterpreter
PropertyTypeDescription
formatstring

MIME type géré ('application/x-nabu+json', 'text/html', 'text/plain')

interpret(raw: string, nabu: Nabu, options?: PasteInterpretOptions) => PasteFragment | nulln/a
outranksFilesoptional(raw: string) => boolean

Files on the clipboard normally win over the text payloads. Return true when THIS payload is worth more than the files that come with it (a spreadsheet range is put on the clipboard as a table AND as an image of it).

priorityoptionalnumber

Plus haut = appelé en premier (default: 0)

Source: src/lib/utils/extensions.js:24