====
TODO
====

- dialog issues

  - inserLink, 
  
    - setFocus or getSelectedText does not really work, it seems that all text
      get selected

  - updateMedia
  
    - insert works but it will append the media to the end. Selecting the
      cursor position and bring them back does not work
  
  - flash
  
    - position doesn't work
  
    - insert a second movie removes the link from the first movie


Note:

the rangs library is what we shold use for simplify the bookmark and restore
selection within a dialog. See xing on github for rangy selection usage at:
https://github.com/xing/wysihtml5/blob/master/src/selection/selection.js
