WYSIWYG editor: planning stages
-Getting Started
----------------
+Quick Start Guide
+-----------------
+
+1. Open ``test.html`` in your browser.
+
+2. Open the console (right-click, inspect this element, console)
+
+3. After a few seconds, you should see "Tests passed: 1581, Failed: 0" in the
+ console.
+
+4. Try running the parser in the console, example:
-Recommended: see "With CoffeeScript" below
+ window.wheic.parse_html("<p>foo</p>", {fragment: "body"})
-(experimental) Alternate: see "Without Compiling"
+For further reading, see "Running Under node.js" below.
-With CoffeeScript
-------------------
+Running Under node.js
+---------------------
+
+Dependancies: node.js, coffeescript
You can get CoffeeScript with a command such as this:
npm install -g coffee-script
+Now you can run the test suite like this:
-Then, to test in the browser, run ``make``, then open ``index.html`` in your
-favorite browser.
-
-Or, to run the tests on the commandline, run ``coffee test.coffee``
-
-
-Without CoffeeScript
------------------
+ coffee test.coffee
-It is recommended to install CoffeeScript (see With CoffeeScript above), but it
-should be pretty easy to get your browser to compile the CoffeScript on the
-fly, to avoid installing anything. See the instructions here:
+Or use the parser from your own code:
- http://coffeescript.org/#scripts
+ wheic = require './parse-html.coffee'
+ dom = wheic.parse_html "foo <b>bar"
Feedback, Questions, Etc