Just use the following CSS property on the element that you wish to force wrapping in:
word-wrap: break-word;
No need for any JavaScript!
If you really want to use JavaScript (for concept; CSS is better for accessibility and ease) then go ahead.
Oh, and another thing, if you're using a font that isn't monospace (but rather, proportional), cutting off at 100 characters could be ineffective. One line could have 100 'i' characters, with the next having another hundred 'm' chars, which are very different in size.
Oh, and another thing, you can't just apply a regex replace on the innerHTML
unless it's all text. If there could possibly be other elements there, you must actually loop through the nodes, applying the technique to only text nodes.
Oh, and another thing, don't bother. Too many problems doing it with javascript.