npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elecerp/directus-extension-filetext-interface

v1.0.0

Published

A text input field that supports both manual text input and file drag & drop, automatically reading file content and filling it into the input field.

Readme

File Text - Directus Extension

A text input field that supports both manual text input and file drag & drop, automatically reading file content and filling it into the input field.

Features

  • 📝 Text Input: Support for multi-line text input
  • 📁 File Drag & Drop: Drag and drop files to the input area
  • 📂 File Selection: Click to select files from file picker
  • 🔍 Auto Read: Option to automatically read file content
  • File Validation: Support for file type and size restrictions
  • 🎨 Beautiful UI: Modern drag & drop area and file information display
  • 🌐 Internationalization: Support for multiple languages

Installation

npm install @elecerp/directus-extension-filetext-interface

Usage

1. Configure Field in Directus

  1. Create a text type field
  2. Select "File Text" interface in field settings
  3. Configure related options

2. Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | placeholder | string | "Please enter text or drag files here" | Input field placeholder text | | acceptFileTypes | string | ".txt,.md,.json,.csv" | Accepted file types, supports extensions and MIME types | | maxFileSize | number | 10 | Maximum file size (MB) | | showFileInfo | boolean | true | Whether to show file information | | autoReadFile | boolean | true | Whether to automatically read file content |

3. Supported File Types

  • Text files: .txt, .md, .log
  • Code files: .js, .ts, .py, .java, .c, .cpp
  • Data files: .json, .csv, .xml
  • Markup files: .html, .css, .sql

Features Description

File Drag & Drop

  • Drag files to the dashed border area
  • Supported files will automatically display file information
  • If auto-read is enabled, file content will automatically fill the text field

File Selection

  • Click "Select File" button to choose files
  • Support for file type filtering
  • File size validation

Text Editing

  • Support for multi-line text input
  • Real-time content saving
  • Clear text functionality

Error Handling

  • Display error messages for unsupported file types
  • Display error messages for oversized files
  • Display error messages for file reading failures

Development

Build

npm run build

Development Mode

npm run start

Technical Implementation

  • Vue 3: Using Composition API
  • Directus Extensions SDK: 9.5.2+
  • File API: Using FileReader API to read file content
  • Drag & Drop API: Using HTML5 Drag and Drop API

Publishing

  1. Update version number
  2. Build project: npm run build
  3. Publish to npm: npm publish --access=public

License

MIT License

Contributing

Welcome to submit Issues and Pull Requests!

Changelog

v1.0.0

  • Initial version
  • Support for file drag & drop and selection
  • Support for text input and editing
  • Support for file type and size validation
  • Support for automatic file content reading