Skip to content

Documentation on clipboard topics should be updated #899

Closed

Description

@Haojen

In Raycast latest version(1.28.0) , the Clipboard API is removed and split. If follow the steps in the documentation to import Clipboard API, they will be throw A error info say can't find this module.

The doc say

import { Clipboard } from "@raycast/api";

export default async () => {
  await Clipboard.copy("https://raycast.com");
};

But actually is

import { copyTextToClipboard,  pasteText } from  "@raycast/api";

Activity

  1. added
    documentation
    on Feb 14, 2022
  2. mathieudutour commented on Feb 14, 2022

    @mathieudutour
    Member

    It's the other way around: in 1.28.0, copyTextToClipboard and pasteText are deprecated in favour of Clipboard

  3. Haojen commented on Feb 14, 2022

    @Haojen
    ContributorAuthor

    @mathieudutour True, I checked my package.json depend, is 1.27 NOT 1.28, so I update to 1.28. then I seen discarded and replace a lot APIs. I'm so tired look like my Raycast extension never can't publish. always on the road. 😂

    By the way, the old APIs on new Raycast version (1.28+) can work is fine?

  4. mathieudutour commented on Feb 14, 2022

    @mathieudutour
    Member

    yes, it's all backward compatible, the old APIs will work fine, but they will be shown as deprecated and should show a helpful message regarding how to migrate.

    Sorry about the confusion!

  5. Haojen commented on Feb 14, 2022

    @Haojen
    ContributorAuthor

    @mathieudutour Yeah, I agree with that. Hope can show a deprecated API info to attention developers. anyway hope you guys doing well

  6. added a commit that references this issue on Apr 23, 2024
  7. added a commit that references this issue on Apr 29, 2024
  8. added a commit that references this issue on Sep 11, 2025
  9. added a commit that references this issue on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions