inline-attachment-next
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

📎 Inline Attachment Next (WIP)

NPM Version NPM Downloads License

A modern port of Inline Attachment

Installation

npm i inline-attachment-next

Usage

  • Input / Textarea

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

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

Package Sidebar

Install

npm i inline-attachment-next

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

29.1 kB

Total Files

15

Last publish

Collaborators

  • eastsun5566