Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inputizer

An easier way to interact with text areas that use common text editing functionality

Add keybindings on the fly

In your configuration object add a new modifier mapping:

const options = new InputizerOptions({
    ...
    modifierOptions: [
        {
            modifierKeys: KeyboardEventModifiers.CTRL,
            key: 's',
            do: (e) => {
                console.log('trying to save?');
            }
        }
    ],
    ...
})

Note: all modifier mappings will execute e.preventDefault()

Use prebuilt sequence functions and bind them to your preference

- Adding a line comment
- Deleting lines
- Move lines up and down
- Add indented lines above/below
- Tab lines forward and backward

Usage

  • Download the 'lib' directory into your project
  • Import the 2 main files:
    • index.js
    • options/model/InputizerOptions.js
  • Add the text area for handling by calling the default function:
inputize("myTextArea", options);

See example.js for example configurations

About

An easier way to interact with HTML text areas

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages