X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=README.md;h=b414c02577296e6fd425f520b75a5ce9bd9a7523;hb=55d296a75a0471af76f0dc05494e9eb98567d314;hp=111cd5df1155073705b1d9024102d41c45f44f66;hpb=cf969645829968285a2cd1f8bc6b8bc49822d0ea;p=peach-html5-editor.git diff --git a/README.md b/README.md index 111cd5d..b414c02 100644 --- a/README.md +++ b/README.md @@ -4,27 +4,66 @@ wheic This project is to build a HTML5 parser, then use that to build a WYSIWYG html editor for the browser. +The code is written in CoffeeScript for modern browsers. The HTML5 parser can +also run under node.js. + + Status ------ -Under development +HTML5 parser: all (1581) tests pass. Works in the browser and node.js + +WYSIWYG editor: planning stages + + +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: + + window.wheic.parse_html("

foo

", {fragment: "body"}) + +For further reading, see "Running Under node.js" below. + + +Running Under node.js +--------------------- + +Dependancies: node.js, coffeescript + +1. Install node.js https://nodejs.org/en/ + +2. Install coffeescript. Try: + + apt-get install coffeescript + or + + npm install -g coffee-script +3. You can run the tests directly from coffeescript: -Getting Started ---------------- + coffee test.coffee -You'll need coffeescript, you can hopefully get that with a command such as -this: +4. Compile to javascript: - apt-get install coffeescript + make -or +5. Run tests via compiled code: - npm install -g coffee-script + nodejs test.js -Then run ``make`` +5. Try using the parser in your own code: -Then run the test suite by opening ``index.html`` in a modern browser. + var wheic = require('./parse-html.js'); + var dom = wheic.parse_html("

hi

", {fragment: 'body'}); + ... Feedback, Questions, Etc