Skip to content

iammapping/textarea

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Emmet plugin for <textarea>

This plugin is automatically compiled from the Emmet core. If you want to contribute features or fix bugs, please do this in plugin source.


To add Emmet support and basic code editor features (like Tab key handler and formatted linebreak insertion) to your <textarea> boxes:

  1. Add <script src="emmet.min.js"></script> into your page
  2. Run this JavaScript code:
emmet.require('textarea').setup({
	pretty_break: true, // enable formatted line breaks (when inserting 
			            // between opening and closing tag) 
	use_tab: true       // expand abbreviations by Tab key
});

Additionally, you can add special classes to your <textarea> element to control Emmet behavior:

  • emmet-syntax-NAME: set syntax NAME for current <textarea>: html, css, xml etc.
  • emmet-profile-NAME: set one of the predefined profile.
  • emmet-use_tab-BOOL: enable (yes) or disable (no) Tab expander on current <textarea>.
  • emmet-pretty_break-BOOL: enable (yes) or disable (no) formatted linebreak insertion on current <textarea>.
  • no-emmet: disable Emmet actions on current <textarea>.

Overriding keybindings

To override default keybindings, simply create global emmetKeymap object, the same as default one but with your own keybindings.

About

Emmet plugin for <textarea>

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published