/obsidian-copy-with-format

Plugin allowing formatting of copied text to remove syntax of Obsidian for the purposes of pasting to other formats.

Primary LanguageJavaScript

Obsidian Copy with Format (Name likely to change)

This is a sample plugin for Obsidian (https://obsidian.md).

Currently supports the following features:

  • command palette command Copy with Format which will copy the selected text, removing the [[ and ]], to system clipboard.

How to use

Recommend installing BRAT. Then adding this repo using BRAT's add functionality. The quickstart guide should walk you through the process. The URL for this plugin is: https://github.com/Quinn-Donnelly/obsidian-copy-with-format

Installing the plugin for local development

  • Clone this repo.
  • Make sure your NodeJS is at least v16 (node --version).
  • npm i or yarn to install dependencies.
  • npm run dev to start compilation in watch mode.
  • Either
    • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/your-plugin-id/.
    • or
    • (Recommended) Use ln and making a symlink to the cloned repo in VaultFolder/.obsidian/plugins/your-plugin-id/.

Releasing new releases

  • Update your manifest.json with your new version number, such as 1.0.1, and the minimum Obsidian version required for your latest release.
  • Update your versions.json file with "new-plugin-version": "minimum-obsidian-version" so older versions of Obsidian can download an older version of your plugin that's compatible.
  • Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix v. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases
  • Upload the files manifest.json, main.js, styles.css as binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release.
  • Publish the release.

You can simplify the version bump process by running npm version patch, npm version minor or npm version major after updating minAppVersion manually in manifest.json. The command will bump version in manifest.json and package.json, and add the entry for the new version to versions.json

Adding your plugin to the community plugin list

API Documentation

See https://github.com/obsidianmd/obsidian-api