ClipReplace

by pseudo
5
4
3
2
1
Score: 50/100

Description

Reviews

No reviews yet.

Stats

0
stars
12
downloads
0
forks
6
days
7
days
7
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
1
commits

Latest Version

7 days ago

Changelog

ClipReplace 0.1.0

Initial public beta release.

ClipReplace swaps the currently selected text with the contents of your clipboard in a single command.

Features

  • Swap selected text with clipboard contents
  • Preserve the replaced text in the clipboard
  • Works with multiline text and Unicode
  • Available through the Obsidian command palette and custom hotkeys

README file from

Github

ClipReplace

ClipReplace is a tiny Obsidian plugin that swaps the current text selection with the clipboard in one command.

It is designed for revision workflows where you already have a replacement on the clipboard and want to keep the old wording available immediately afterward.

Example

Before running the command:

Clipboard:      The revised sentence.
Selected text:  The old sentence.

Run ClipReplace: Replace selection & copy.

Afterward:

Note:           The revised sentence.
Clipboard:      The old sentence.

No temporary note, second copy operation, or manual delete/paste cycle is needed.

Usage

  1. Copy the replacement text to your clipboard.
  2. Select the text you want to replace in an Obsidian note.
  3. Run ClipReplace: Replace selection & copy from the Command Palette.
  4. Optionally assign the command a hotkey under Settings → Hotkeys.

The command is only available when the editor has a non-empty selection.

Safety behavior

ClipReplace deliberately performs the operation in a defensive order:

  1. Read the existing clipboard.
  2. Copy the selected text to the clipboard.
  3. Replace the selection with the old clipboard contents.

If clipboard access fails, the note is left unchanged. If editor replacement fails after the clipboard was changed, ClipReplace makes a best-effort attempt to restore the original clipboard contents and shows an Obsidian notice.

Privacy

ClipReplace does not send text anywhere, does not use telemetry, and does not make network requests. Clipboard and editor operations stay local to Obsidian and your device.

Installation

Community Plugins

Once ClipReplace is accepted into the Obsidian Community directory:

  1. Open Settings → Community plugins → Browse.
  2. Search for ClipReplace.
  3. Install and enable it.

Manual installation

Download main.js and manifest.json from a GitHub release and place them in:

<your-vault>/.obsidian/plugins/clipreplace/

Reload Obsidian and enable ClipReplace under Community plugins.

Development

Requirements:

  • Node.js
  • npm

Install dependencies:

npm install

Type-check:

npm run check

Development build/watch:

npm run dev

Production build:

npm run build

The production build writes main.js in the repository root.

Release checklist

For each release:

  1. Update the version in manifest.json and package.json.
  2. Update versions.json if minAppVersion changes.
  3. Run npm run check and npm run build.
  4. Commit the generated main.js.
  5. Create a GitHub release whose tag exactly matches the manifest version, for example 0.1.0 (no v prefix).
  6. Attach main.js and manifest.json to the GitHub release. styles.css is not required because ClipReplace has no custom styles.

License

MIT