An open API service indexing awesome lists of open source software.

https://github.com/francoisschwarzentruber/textmapeditor

A <24kB Web Component Text Editor with Rectangular Selection
https://github.com/francoisschwarzentruber/textmapeditor

ascii-art editor editor-tool rectangle text-editor text-editor-for-web tiny webcomponent

Last synced: 3 months ago
JSON representation

A <24kB Web Component Text Editor with Rectangular Selection

Awesome Lists containing this project

README

        

# Text map editor

This text editor is an HTML Web component dedicated for editing texts like **ascii-art**, or a **tile editor**, texts where both rows and colmuns are important (hence the word **map** like a 2D map). The selection is rectangular.

![image](https://github.com/francoisschwarzentruber/textmapeditor/assets/43071857/dc4f0980-b20d-450f-9a4a-68b5fed6b4ee)

## Features

- HTML Web component
- Light
- Implemented with canvas
- Drag drop
- Rectangular selection
- Multiple cursors
- Ctrl + Z, Y: Undo/redo
- Ctrl + L: select line(s)
- Ctrl + M: select column(s)
- Ctrl + X, C, V: Cut/copy/paste
- Retro-style editor
- Cursor column/row guidelines
- UTF-8 characters

## Roadmap
- Customizable (like having pictures etc. instead of text)

## How to use it

- Add ` `
- Add ` `
- Access the text with the properties `editor.text` (the string of the full text) or `editor.lines` (array of lines)