X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=README.md;h=97d26281a4e16569a35125e92f218d12acaba65d;hb=115352a3056c8456e9998e214458c2b10875e9c7;hp=b414c02577296e6fd425f520b75a5ce9bd9a7523;hpb=68bf5e08a951f954f9e22836560f5b9b77ef8d02;p=peach-html5-editor.git diff --git a/README.md b/README.md index b414c02..97d2628 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,69 @@ -wheic -===== +Peach HTML5 Editor +================== -This project is to build a HTML5 parser, then use that to build a WYSIWYG html -editor for the browser. +Peach Editor is a WYSIWYG HTML5 editor for the browser. -The code is written in CoffeeScript for modern browsers. The HTML5 parser can -also run under node.js. - -Status +Vision ------ -HTML5 parser: all (1581) tests pass. Works in the browser and node.js - -WYSIWYG editor: planning stages - - -Quick Start Guide ------------------ +Most online HTML editors are built around the "contenteditable" feature of +modern browsers. While this gives developers a lot of features right out of the +box, they must surrender almost complete control over how it works, and thus +we all get stuck using editors that are frustrating and have loads of bugs and +compatibility issues. -1. Open ``test.html`` in your browser. +Instead of trying to create an ever-expanding set of workarounds for the +quirks, limitations and bugs of different platforms/browsers implementation of +contenteditable, this project aims to create an HTML5 editor that does not use +this feature at all. -2. Open the console (right-click, inspect this element, console) +This method is much more work, but has the potential to make an editor that is +actually good, since all the code that makes it tick is part of the project, +and its code can be modified. -3. After a few seconds, you should see "Tests passed: 1581, Failed: 0" in the - console. +Jason couldn't find an HTML parser in JavaScript that was at all accurate +according to the HTML5 spec, so he wrote one; see ``parser.js``. -4. Try running the parser in the console, example: +Current work is going into the GUI. - window.wheic.parse_html("

foo

", {fragment: "body"}) -For further reading, see "Running Under node.js" below. +Status +------ +The HTML5 parser: complete component passes the full test suite (1581 tests). -Running Under node.js ---------------------- +Editor GUI: in early development stages. -Dependancies: node.js, coffeescript -1. Install node.js https://nodejs.org/en/ +Quick Start +----------- -2. Install coffeescript. Try: +Open ``index.html`` in a browser (no need for a web server) - apt-get install coffeescript - or +For further reading, see "Running Under node.js" below. - npm install -g coffee-script -3. You can run the tests directly from coffeescript: +Technologies +------------ - coffee test.coffee +Programming language: JavaScript -4. Compile to javascript: +HTML5 Parser: Spec compliant, also runs on node.js - make +Interface: Implemented using the DOM api. No ``contenteditable`` or jquery. -5. Run tests via compiled code: - nodejs test.js +Running Parser with node.js +--------------------------- -5. Try using the parser in your own code: +The parser can run without the browser, try: - var wheic = require('./parse-html.js'); - var dom = wheic.parse_html("

hi

", {fragment: 'body'}); - ... + nodejs parser_tests.js Feedback, Questions, Etc ------------------------ -Please communicate directly with Jason Woofenden by email: jason@jasonwoof.com -or on freenode /msg JasonWoof +Please communicate directly with Jason Woofenden via his website: +https://jasonwoof.com/contact