Femto

A minimum featured textarea


Project maintained by lambdalisue Hosted on GitHub Pages — Theme by mattgraham

femto Build Status

femto is a simple and minimum textarea upgrade library. It only add the following features but the file size is small (9.6 kB) and well tested (passed 211 tests).

Bookmarklet

femto can be used as a bookmarklet and then you can enable to use features of femto anywhere. Because github does not allow me to paste bookmarklet as a link. You need to make the bookmarklet as your self. The following is a code of the bookmarklet. Use it with your own responsibility.

javascript:(function(){var s=document.createElement('script');s.src='http://goo.gl/NHDBkx';s.onload=function(){console.log('Loaded');Femto.transformAll();};document.body.appendChild(s);})();

Usage

  1. Download femto-0.3.1.tar.gz
  2. Copy extracted files into js directory like

    + www
      + index.html
      + js
        + femto-0.3.1.js
    
  3. Write index.html as

    <!DOCTYPE html>
    <html>
      <body>
        <textarea id="femto"></textarea>
        <script src="js/femto-0.3.1.js"></script>
        <script>
          // or your can use $(function(){});
          window.onload = function() {
            var textarea, options;
            options = {};
            textarea = document.getElementById("femto");
            textarea = Femto.transform(textarea, options);
          };
        </script>
      </body>
    </html>
    

Options

Test

You can check the test result at femto Travis-ci or try with your browser at Test.

Develop

You can read an API documentation at femto API documentation

License

MIT License

© 2012-2014 Alisue, hashnote.net