New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

editcore

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editcore

A lightweight customizable React text editor built from scratch.

latest
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

React Text Editor (v0.0.1)

A lightweight, customizable, line-based text editor for React — built completely from scratch without using contentEditable.
Designed for developers who want full control over rendering, cursor behavior, and text operations.

🚀 Why This Editor?

  • Pure HTML + React implementation
  • Custom rendering logic
  • Developer-controlled cursor management
  • Line-based architecture
  • Simple undo/redo system
  • Extendable for future code-editor capabilities

✨ Current Features (v0.0.1)

  • Line-by-line rendering
  • Custom decorator/highlighter for each line
  • Basic text updating
  • Exposed line APIs
  • Simple structure for building advanced editors

📦 Installation

npm install editcore

or:

yarn add editcore

🧩 Basic Usage Example

import React from "react";
import NewTextfeild from "react-text-editor";

export default function App() {
  return (
    <NewTextfeild
      initialData={["Hello world", "This is my editor"]}
      onchangeDecorator={(text, index, extra) => {
        return <span>{text}</span>;
      }}
    />
  );
}

🔧 API (v0.0.1)

Props

PropTypeDescription
initialDatastring[]Initial lines
onchangeDecorator(text, index, extra) => ReactNodeLine rendering hook
refEditor refExposes editor methods

Methods

MethodDescription
getAllLines()Returns all text lines
setLine(index, text)Set text of a line
undo()Undo last action
redo()Redo operation
focusLine(index)Scroll to line

🛣️ Roadmap

  • Selection support
  • Advanced cursor control
  • Syntax highlighting presets
  • Theme system
  • Tabs & indentation
  • Copy/paste logic
  • Plugin support
  • Full editor builder

🤝 Contributing

Open to contributions, suggestions, and improvements.

📄 License

MIT License.

Keywords

react

FAQs

Package last updated on 23 Nov 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