Improve event handling of script changes.
- Temporary fix until #219 is properly implemented.
Convert `text_display` plug-in to new-style API
- Use HTML renderer
- Deal with os-specific line separators (closes #237)