The CSS Solution
There is a very simple solution to the problem at hand. What I essentially added is the following CSS code
word-wrap:break-word;
to the class that surrounds your tooltip text.
Here is a working demo
Also, this is a good read
What if I am using Angular UI?
For styling a tooltip from angular ui, I added tooltip-class="tooltip"
to the tooltip code.
Here is a working demo with angular
This is a modified plunkr obtained from the Angular UI documentation