Skip to main content
Home
Works with
This package works with Browsers
This package works with Browsers
•JSR Score64%•
Publisheda year ago (0.0.8)

📎 A modern inline attachment

📎 Inline Attacher

NPM Version NPM Downloads License

A modern port of Inline Attachment

🔗 https://eastsun5566.github.io/inline-attacher/

Installation

npm i inline-attacher

Usage

  • Input / Textarea

    import { attach } from "inline-attacher";
    
    const textarea = document.querySelector("textarea");
    attach(textarea, { uploadUrl: "https://example.com/upload" });
    
  • CodeMirror v6

    import { EditorView } from "codemirror";
    import { inlineAttachmentExtension } from "inline-attacher";
    
    const editor = new EditorView({
      extensions: [
        inlineAttachmentExtension({ uploadUrl: "https://example.com/upload" }),
      ],
      parent: document.body,
    });
    

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.