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 5. Open ``editor_tests_coffee.html`` in your browser
42 For further reading, see "Running Under node.js" below.
48 With node.js and Coffeescript, you can compile the coffeescript so you can use
49 the faster test pages, and you can test the html parser without a browser.
51 Dependencies: node.js, CoffeeScript
53 1. Install node.js https://nodejs.org/en/
55 2. Install CoffeeScript. Try:
57 apt-get install coffeescript
60 npm install -g coffee-script
62 4. Compile to javascript:
66 Now you can do any of these things in any order:
68 * Run the tests directly from CoffeeScript:
70 coffee parser_tests.coffee
72 * Test the compiled (javascript) parser in your favorite browser by opening
73 up ``parser_tests.html`` and looking at the console.
75 * Run tests via compiled code:
77 nodejs parser_tests.js
79 * Try using the parser in your own javascript node.js project:
81 var html5 = require('./parser.js');
82 var dom = html5.parse("<p>hi</p>", {fragment: 'body'});
85 * Try using the parser in your own CoffeeScript node.js project:
87 html5 = require './parser.js'
88 dom = html5.parse "<p>hi</p>", fragment: 'body'
91 Note: the CoffeeScript compile time is significant, so you'll want to use
92 the compiled javascript even though you could use the ``.coffee`` version.
94 * Hack editor.coffee more quickly, by testing in editor_tests.html which uses
95 the compiled version of the parser, thus speeding up load time
99 Feedback, Questions, Etc
100 ------------------------
102 Please communicate directly with Jason Woofenden by email: jason@jasonwoof.com
103 or on freenode /msg JasonWoof