4 This is a WYSIWYG HTML5 editor for the browser.
10 Early development stages.
12 The HTML5 parser component passes the full test suite (1581 tests).
14 The interface is starting to exist.
20 Programming language: CoffeeScript (compiles to javascript)
22 Interface: Implemented using the DOM api. No ``contenteditable`` or jquery.
29 1. Open ``parser_tests_coffee.html`` in your browser.
31 2. Open the console (right-click, inspect this element, console)
33 3. After a few seconds, you should see "Tests passed: 1581, Failed: 0" in the
36 4. Try running the parser in the console, example:
38 window.peach_parser.parse("<p>foo</p>", {fragment: "body"})
40 For further reading, see "Running Under node.js" below.
46 Dependencies: node.js, CoffeeScript
48 1. Install node.js https://nodejs.org/en/
50 2. Install CoffeeScript. Try:
52 apt-get install coffeescript
55 npm install -g coffee-script
57 4. Compile to javascript:
61 Now you can do any of these things in any order:
63 * Run the tests directly from CoffeeScript:
65 coffee parser_tests.coffee
67 * Test the compiled (javascript) parser in your favorite browser by opening
68 up ``parser_tests.html`` and looking at the console.
70 * Run tests via compiled code:
72 nodejs parser_tests.js
74 * Try using the parser in your own javascript node.js project:
76 var html5 = require('./parser.js');
77 var dom = html5.parse("<p>hi</p>", {fragment: 'body'});
80 * Try using the parser in your own CoffeeScript node.js project:
82 html5 = require './parser.js'
83 dom = html5.parse "<p>hi</p>", fragment: 'body'
86 Note: the CoffeeScript compile time is significant, so you'll want to use
87 the compiled javascript even though you could use the ``.coffee`` version.
90 Feedback, Questions, Etc
91 ------------------------
93 Please communicate directly with Jason Woofenden by email: jason@jasonwoof.com
94 or on freenode /msg JasonWoof