Skip to content
/ Pta Public

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

License

Notifications You must be signed in to change notification settings

MLeidel/Pta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published