Coder Social home page Coder Social logo

mleidel / pta Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 129 KB

Programming Textarea - add text editor functions to textarea - JS library

License: GNU General Public License v3.0

JavaScript 76.54% CSS 2.25% HTML 21.21%
textarea-editor javascript-library web javascript

pta's Introduction

Programming TextArea

enhancing textarea with Javascript

A JS Library

Programming Textarea makes a textarea into a simple code editor. This project builds some useful code writing enhancements into standard HTML textarea, using only pure Javascript (library). currently < 7K.

side note:

Many of these features were incorporated into the "iedit" repository
where the "Ace" text editor is used instead of a textarea.


Programming Textarea:

  • Keyboard Event Handlers (hot-keys)
  • Join Lines
  • Toggle Line Numbers
  • Tab Key - single line or selected lines
  • Auto Indentation
  • Search and Replace
    • Pts has FIND, REPLACE and REPLACE ALL
  • Brace{} and Paren() Matching
    • Alt-q attempts to match the symbol next to the cursor, and select the block of code between the open and closing symbol.
  • Zen Coding Capabilities (non-standard)
    • By selecting text and pressing alt-z the text acts as a key to find and insert text from a JSON file. The json file (tags.js) can be modified and greatly expanded. Alternatively alt-z will wrap the any word in angle braces.
    • Alt-a will prompt for a tag name and then surround selected text. "ucase", "lcase", ',",${},<!,/*, are additional options
    • Alt-w will repeat the last alt-a function.
key action
alt-d Duplicate Character
alt-t Join Lines
alt-q Match Brace
alt-n Toggle Line Nbr Insert
alt-z Zen Insert at Keyword
alt-a Zen wrap with tag
alt-w Repeat Last Tag Wrap (alt-a)
Tab Find selected Next

pta's People

Contributors

mleidel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.