Options
All
  • Public
  • Public/Protected
  • All
Menu

joplin.clipboard

Index

Methods

availableFormats

  • availableFormats(): Promise<string[]>
  • Returns the list available formats (mime types).

    For example [ 'text/plain', 'text/html' ]

readHtml

  • readHtml(): Promise<string>
  • desktop

readImage

  • readImage(): Promise<string>
  • Returns the image in data URL format.

    desktop

readText

  • readText(): Promise<string>

write

  • Writes multiple formats to the clipboard simultaneously. This allows setting both text/plain and text/html at the same time.

    desktop

    example
    await joplin.clipboard.write({
      text: 'Plain text version',
      html: '<strong>HTML version</strong>'
    });

    Parameters

writeHtml

  • writeHtml(html: string): Promise<void>
  • desktop

    Parameters

    • html: string

writeImage

  • writeImage(dataUrl: string): Promise<void>
  • Takes an image in data URL format.

    desktop

    Parameters

    • dataUrl: string

writeText

  • writeText(text: string): Promise<void>
  • Parameters

    • text: string