Almost complete rewrite (thanks Claude!) It's now generally working. The node selection when clicking the html area is not soild yet.