This lil script shows how to use the basehub Query API + Mutation API to mimic a global find/replace in rich texts scattered around the editor. Adapt this to your use case.
To install dependencies:
bun install
To generate types:
BASEHUB_TOKEN="<add-your-token-to-env>"
bun basehub
To run:
bun run index.ts
This project was created using bun init
in bun v1.2.15. Bun is a fast all-in-one JavaScript runtime.