JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
run in the browser without installing coffeescript
[peach-html5-editor.git] / README.md
1 wheic
2 =====
3
4 This project is to build a HTML5 parser, then use that to build a WYSIWYG html
5 editor for the browser.
6
7 The code is written in CoffeeScript for modern browsers. The HTML5 parser can
8 also run under node.js.
9
10
11 Status
12 ------
13
14 HTML5 parser: all (1581) tests pass. Works in the browser and node.js
15
16 WYSIWYG editor: planning stages
17
18
19 Quick Start Guide
20 -----------------
21
22 1.      Open ``test.html`` in your browser.
23
24 2.      Open the console (right-click, inspect this element, console)
25
26 3.      After a few seconds, you should see "Tests passed: 1581, Failed: 0" in the
27         console.
28
29 4.      Try running the parser in the console, example:
30
31                 window.wheic.parse_html("<p>foo</p>", {fragment: "body"})
32
33 For further reading, see "Running Under node.js" below.
34
35
36 Running Under node.js
37 ---------------------
38
39 Dependancies: node.js, coffeescript
40
41 You can get CoffeeScript with a command such as this:
42
43         apt-get install coffeescript
44
45 or
46
47         npm install -g coffee-script
48
49 Now you can run the test suite like this:
50
51         coffee test.coffee
52
53 Or use the parser from your own code:
54
55         wheic = require './parse-html.coffee'
56         dom = wheic.parse_html "foo <b>bar"
57
58
59 Feedback, Questions, Etc
60 ------------------------
61
62 Please communicate directly with Jason Woofenden by email: jason@jasonwoof.com
63 or on freenode /msg JasonWoof