Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 

README.md

TAP - Text Area Processor

Text highlighter and HTML formatter. Format textarea inputs with regex patterns.

alt tag

Usage

new tap(element, options);

Element paramenter expects textarea inputs only

Example Usage

// Instantiate TAP
var textArea = new tap(element, {

	patterns: [
	{
			regex: ['(@\\w{1,15})', 'gi'], // RegExp [pattern, flag]
			element: 'span', // Wrapping Tag
			attributes: { // Element Attributes
				class: 'tap-username'
			}
		},
		{
			regex: ['\\b(link)\\b', 'gi'],
			element: 'a',
			attributes: {
				class: 'tap-link',
				href: 'http://claytonn.com'
			}
		}
		]
	});

To Do

  • Add Event Callbacks
  • Replace innerHTML Method w/ createElement()
  • Attach Event Listeners To TAP Generated Elements
  • Add Box Resizing w/ Overflow Options

About

Format textarea inputs with regex patterns.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.