https://github.com/eastsun5566/inline-attacher
📎 A modern inline attachment
https://github.com/eastsun5566/inline-attacher
attachment drop file image inline-attachment paste upload
Last synced: 4 months ago
JSON representation
📎 A modern inline attachment
- Host: GitHub
- URL: https://github.com/eastsun5566/inline-attacher
- Owner: EastSun5566
- License: mit
- Created: 2023-07-11T19:38:30.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T19:14:48.000Z (over 1 year ago)
- Last Synced: 2025-10-24T02:18:04.829Z (8 months ago)
- Topics: attachment, drop, file, image, inline-attachment, paste, upload
- Language: TypeScript
- Homepage: https://eastsun5566.github.io/inline-attacher/
- Size: 698 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 📎 Inline Attacher
[](https://www.npmjs.com/package/inline-attacher)
[](https://www.npmjs.com/package/inline-attacher)
[](https://github.com/EastSun5566/inline-attacher/blob/main/LICENSE)
> A modern port of [Inline Attachment](https://github.com/Rovak/InlineAttachment)
🔗
## Installation
```sh
npm i inline-attacher
```
## Usage
- Input / Textarea
```ts
import { attach } from "inline-attacher";
const textarea = document.querySelector("textarea");
attach(textarea, { uploadUrl: "https://example.com/upload" });
```
- CodeMirror v6
```ts
import { EditorView } from "codemirror";
import { inlineAttachmentExtension } from "inline-attacher";
const editor = new EditorView({
extensions: [
inlineAttachmentExtension({ uploadUrl: "https://example.com/upload" }),
],
parent: document.body,
});
```