Skip to content

Commit

Permalink
Added to Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglev committed Nov 5, 2022
1 parent 4362b69 commit 75a33b4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The current paste mode is displayed in Obsidian's Status Bar:

![Status bar showing current paste mode](img/status-bar.png)

### Switching paste mode
#### Switching paste mode

There are multiple ways to switch paste modes:

Expand All @@ -31,7 +31,7 @@ There are multiple ways to switch paste modes:
1. Open the Command Palette and search for `Paste to Current Indentation: Cycle Paste Mode`. This command will cycle through the different paste modes (i.e., from Text mode to Text Blockquote mode, to Markdown mode, to Markdown Blockquote mode, to Passthrough mode, back to Text mode, etc.)
1. Within the plugin's Settings page.

### Limitations of Paste Modes
#### Limitations of Paste Modes

- The "Markdown" and "Markdown (Blockquote)" modes are automatically disabled **for one-time commands** (i.e., for the "Paste in Markdown Mode," "Paste in Markdown (Blockquote) Mode", and "Paste in Mode (Interactive)" commands) in Obsidian Mobile. This is due to how Obsidian Mobile is allowed to interact with the clipboard.
If these commands are disabled, a note stating such will appear in the Settings tab for the plugin.
Expand All @@ -45,19 +45,35 @@ There are multiple ways to switch paste modes:

Block quote markers are customizable via the plugin's Settings page (e.g., if you prefer to use spaces instead of `> `).

# Roadmap
### Additional features

#### Dynamic attachment saving

- Attachments can be automatically saved to different locations based on the directory of the file being pasted into.

![](img/attachment_location_overrides.png)

#### Downloading local copies of linked attachments

- When pasting in "Markdown" or "Markdown (Blockquote)" modes, files that are linked in the text (`http://example.com/path/to/file.png`, `file://path/to/file.png`, etc.) can be automatically downloaded locally, based on their source location.

#### Automatic character escaping in Markdown

Characters that might cause display issues in Markdown (such as `==`, `<`, etc.) can be automatically [escaped](https://www.markdownguide.org/basic-syntax/#characters-you-can-escape) when pasting.

### Roadmap

I consider this plugin feature-complete for now.

Todo:

- Add tests

# Developing for this plugin
### Developing for this plugin

The documentation below is retained from the [Obsidian Sample Plugin](https://github.com/obsidianmd/obsidian-sample-plugin).

## Quickstart guide for development
#### Quickstart guide for development

- Clone this repo to a local development folder. For convenience, you can place this folder in your `.obsidian/plugins/your-plugin-name` folder.
- Install NodeJS, then run `yarn` in the command line under your repo folder.
Expand All @@ -67,7 +83,7 @@ The documentation below is retained from the [Obsidian Sample Plugin](https://gi
- Reload Obsidian to load the new version of the plugin.
- For updates to the Obsidian API run `yarn` in the command line under this repo's folder.

## Developing for mobile
#### Developing for mobile

Mobile development can be facilitated using the following workflow:

Expand All @@ -76,18 +92,18 @@ Mobile development can be facilitated using the following workflow:
1. Follow [the advice in this post](https://forum.obsidian.md/t/debugging-obsidian-mobile-plugins/20913):
> How to test plugins on Android I think you need to have ADB on your computer installed (I always had that installed; if the following directions don’t work without it, install it); on your android phone you have to enable ADB (it’s under developer settings [tap the build number three times to get these settings]); then connect the phone to your computer over USB; open chrome (or chromium based browser should also work) and type chrome://inspect in the browser. Open obsidian on your phone, then it should appear in the browser. You will have the console and the inspector like you have for desktop Obsidian
## Releasing new releases
#### Releasing new releases

- Update `manifest.json` with the new version number, such as `1.0.1`, and the minimum Obsidian version required for the latest release.
- Update the `versions.json` file with `"new-plugin-version": "minimum-obsidian-version"` so older versions of Obsidian can download an older version of the plugin that's compatible.
- Create new GitHub release using the new version number as the "Tag version". Use the exact version number (i.e., do not include a prefix `v`). See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases
- Upload the files `manifest.json`, `main.js`, and `styles.css` as binary attachments.
- Publish the release.

## Manually installing the plugin
### Manually installing the plugin

- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/obsidian-paste-to-current-indentation/`.

## Obsidian API documentation
### Obsidian API documentation

See https://github.com/obsidianmd/obsidian-api
Binary file added img/attachment_location_overrides.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 75a33b4

Please sign in to comment.