Rich editing
Here is a selection of fancy editing primitives. This comes as an experiment on the ideas of Tangle and MagicInk. This is technical experimentation rather than an attempt to improve upon Tangle. For the fun of it of course!
Click on any dotted element to edit the element or, alternatively, tab through the elements.
- Free text
- In the beginning there was the word.
- Selection
- A selection of words.
- Date (make this more fancy)
- This was written on: 2011-10-22. And a fancy date looks like this: 2011-10-22
- Range (this element has problems with focus, only really works with keyboard right now)
- An average person has 4 close friends.
Linked elements
So far so good. But then comparing this to the tangle show case this is distinctly lacking the ability to connect different datasources not all of which may be editable.
Examples (beware this uses the HTML 5 input event and probably won't work on IE):
- The square of x=1 is 1. And the square of that in turn is 1.
- The word palindrome is not a palindrome.
Tidbits
Things that I have not yet implemented / figured out:
- Numeric elements. Various forms drag, slider.
- How to make the slider work properly with focussing
- Connectors between different elements i.e. on-update propagation
- Validation rules
- Much more ... ;)
And this is what I have learnt about ClojureScript on the way ...
- Get access to javascript objects via js prefix, like (js/alert "some messages")
- Get a native object from a clojure map by (.strobj {"value" "text"})
- Invoke a no arg function by (. element (focus))
- (not= undefined nil)
- No introspection like ns-publics, *ns*, etc