Socket
Book a DemoInstallSign in
Socket

ocr-text-selector

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocr-text-selector

[![npm version](https://img.shields.io/npm/v/ocr-text-selector.svg)](https://www.npmjs.com/package/ocr-text-selector) [![npm downloads](https://img.shields.io/npm/dm/ocr-text-selector.svg)](https://www.npmjs.com/package/ocr-text-selector) [![license](ht

0.0.8
latest
npmnpm
Version published
Weekly downloads
573
Maintainers
1
Weekly downloads
 
Created
Source

📦 OCR Text Selector (Angular / Ionic Library)

npm version npm downloads license

ocr-text-selector is an Angular/Ionic component library that provides a Google Lens–like OCR text selection experience.
Users can run OCR on an image, see bounding boxes, and tap/click to select text directly from the image.

✨ Features

  • 🔍 OCR text recognition using Tesseract.js.
  • 🖱️ Select text (word-level) from an image.
  • 📤 Emits selected text to your app.
  • 📱 Works in both Angular and Ionic.
  • ⚡ Angular 17+ compatible.

⚙️ Setup

1. Install the package

npm install ocr-text-selector

📖 Usage

1. Import the Module

import { OcrTextSelectorModule } from 'ocr-text-selector';

@NgModule({
  imports: [
    BrowserModule,
    OcrTextSelectorModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

2. Add the Component

<ocr-text-selector
  [imageSrc]="'assets/sample.jpg'"
  (textSelected)="onTextSelected($event)">
</ocr-text-selector>

3. Handle the Event

onTextSelected(text: string) {
  console.log('User selected:', text);
  alert('Selected: ' + text);
}

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.