Add support for multiline text

This PR replaces #199