Small bugfix and other changes

Hello, 

I have started working on your text editor and will be sending more pull requests later on. In this one I have 

1) Fixed a bug that made it impossible to hide the toolbar.
2) Added user control of the color and width of the border.
3) Reworked the initialization of the toolbar so that it can be reorganized dynamically (which I will be working on in the future)
4) ... and other small things that you can see in the diff.

Thank you for releasing this as OSS. I hope to be adding many worthwhile features myself!

Best regards, 
Mads