Zerium
Zerium

Reputation: 17333

How to wrap text inside an iframe with designMode on, using css and also javascript if necessary?

Any simple solution to this dilemma? I've tried this possible solution, but it didn't seem to work inside iframes.

Help?

JSFiddle Link

EDIT: I've searched myself online, and they all say specify a percentage. But I don't initially have content in it, and I set designMode to 'On'. Just to mention to filter out useless answers.

Upvotes: 2

Views: 6320

Answers (2)

Viktor Soroka
Viktor Soroka

Reputation: 217

In CSS you could do it by using word-wrap: break-word;

Upvotes: 0

Zerium
Zerium

Reputation: 17333

Ha, solved! Used javascript:

myiframe.document.body.style.wordWrap = 'break-word';

that did it when put into window.onload.

Solved, finally!

Upvotes: 9

Related Questions