correctly handle spacer when inserted on runtime

When inserting a spacer into a toolbar with toolbar.add() or toolbar.insert(), the wrong html code was generated.