matching tag fixes

remove global editor ref, add listener