Emmet plugin for <textarea>
JavaScript
Latest commit a2caeeb Feb 19, 2014 @sergeche sergeche Merge pull request #5 from davelab6/master
Fix <> in readme
Permalink
Failed to load latest commit information.
README.md Fix <> in readme Feb 19, 2014
emmet.js Updated core to most recent version Apr 17, 2013
emmet.min.js Updated core to most recent version Apr 17, 2013
index.html Initial commit Feb 20, 2013

README.md

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.