oerpub/Aloha-Editor — pull request #23 by izak (2013-06-28 13:29:20+00:00)
Title: Fix heading updating in toolbar plugin

This stopped working most likely because the currentHeading element could not be found and was never updated. It was fixed, for some value of fixed, by writing 76 lines of jquery-less javascript and inserting it into index.html. Of course that means it only ever works when you use OUR index.html.

This fixes that by repairing the heading updating (the dropdown changes if you change focus into a heading) in the toolbar plugin and removing all the old code in index.html. It uses proper jquery for this. In addition, it also uses the aloha.selection.context-change event which fires less often and therefore makes this more efficient.