UNPKG

alpaca

Version:

Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide

46 lines (41 loc) 1.45 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title>summernote</title> <!-- include jquery --> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <!-- include libraries BS3 --> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css" /> <script type="text/javascript" src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script> <!-- include summernote --> <link rel="stylesheet" href="../dist/summernote.css"> <script type="text/javascript" src="../dist/summernote.js"></script> <script type="text/javascript"> $(function() { $('.summernote').summernote({ height: 200 }); $('form').on('submit', function (e) { e.preventDefault(); alert($('.summernote').summernote('code')); alert($('.summernote').val()); }); }); </script> </head> <body> <form action="#" novalidate> <div class="form-group"> <label for="input">Text</label> <input type="text" class="form-input" id="input" value="Title"> </div> <div class="form-group"> <label for="contents">Contents</label> <textarea name="text" class="summernote" id="contents" title="Contents"></textarea> </div> <button type="submit" class="btn btn-default">submit</button> </form> </body> </html>