Skip to Content
defold-typescript libraries
britzl

britzl/defold-clipboard/clipboard

Defold native extension to access the clipboard

  • GitHub: britzl/defold-clipboard — pinned to 1.24.0 (released while Defold 1.6.3 was current)
    1. Pick a release from britzl/defold-clipboard releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as clipboard from "clipboard"
  • Asset Portal: defold-clipboard

Functions

clipboard.copy(text: string)

Copy text to the clipboard.

Parameters

  • text: string

clipboard.paste(): string

Get text from the clipboard.

Returns

  • text: string

On this page