JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
rename to Peach HTML5 Editor
[peach-html5-editor.git] / README.md
1 Peach HTML5 Editor
2 ==================
3
4 This is a WYSIWYG HTML5 editor for the browser.
5
6
7 Status
8 ------
9
10 Early development stages.
11
12 The HTML5 parser component passes the full test suite (1581 tests).
13
14 The interface is starting to exist.
15
16
17 Technologies
18 ------------
19
20 Programming language: CoffeeScript (compiles to javascript)
21
22 Interface: Implemented using the DOM api. No ``contenteditable`` or jquery.
23
24
25
26 Quick Start Guide
27 -----------------
28
29 1.      Open ``parser_tests_coffee.html`` in your browser.
30
31 2.      Open the console (right-click, inspect this element, console)
32
33 3.      After a few seconds, you should see "Tests passed: 1581, Failed: 0" in the
34         console.
35
36 4.      Try running the parser in the console, example:
37
38                 window.peach_parser.parse("<p>foo</p>", {fragment: "body"})
39
40 For further reading, see "Running Under node.js" below.
41
42
43 Running Under node.js
44 ---------------------
45
46 Dependencies: node.js, CoffeeScript
47
48 1.      Install node.js https://nodejs.org/en/
49
50 2.      Install CoffeeScript. Try:
51
52                 apt-get install coffeescript
53         or
54
55                 npm install -g coffee-script
56
57 4.      Compile to javascript:
58
59                 make
60
61 Now you can do any of these things in any order:
62
63 *       Run the tests directly from CoffeeScript:
64
65                 coffee parser_tests.coffee
66
67 *       Test the compiled (javascript) parser in your favorite browser by opening
68         up ``parser_tests.html`` and looking at the console.
69
70 *       Run tests via compiled code:
71
72                 nodejs parser_tests.js
73
74 *       Try using the parser in your own javascript node.js project:
75
76                 var html5 = require('./parser.js');
77                 var dom = html5.parse("<p>hi</p>", {fragment: 'body'});
78                 ...
79
80 *       Try using the parser in your own CoffeeScript node.js project:
81
82                 html5 = require './parser.js'
83                 dom = html5.parse "<p>hi</p>", fragment: 'body'
84                 ...
85
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.
88
89
90 Feedback, Questions, Etc
91 ------------------------
92
93 Please communicate directly with Jason Woofenden by email: jason@jasonwoof.com
94 or on freenode /msg JasonWoof