So, yeah, this new version of Skribler is browser-based. I'm mostly relying on three pieces to make it work:
- HTML5's contentEditable, which forms the basis of everything. It makes all content editable, but for the purpose of a structured editor it is too liberal in what it allows.
- Rangy, which allows me to capture selections and caret info and manipulate these through Javascript. With a little help of JQuery this allows me to restrict the default behaviour of contentEditable.
- Knockout.js, which is an amazing Javascript library. This takes care of processing changes to the abstract syntax trees and updating the concrete syntax.
- Martin Fowler's Reader Configurations, based on an example from his Language Workbenches article.
- HTML Template Configuration Language, a DSL created by Thomas Cleenewerck with the purpose of more easily setting up websites through composition of templates.
- Knockout.js Template Language, which can be used to generate the Knockout templates for transforming abstract syntax trees into conrete syntax. In fact, this example was used to generate its own examples.
No comments:
Post a Comment