Text editor opening and closing

Fixes STRd6/editor#22 
Fixes STRd6/editor#27