Limiting iframe designmode width after typing till a particular length

144 views Asked by At

I have an iframe which is something like this :

<iframe id="topic-content" name="topic-content" class="form-fields" ></iframe>

I'm able to get it in design mode and everything is working just fine. But the problem arises when i can't limit the length of text that should be in one line.

If i start typing in it, it continues taking everything in one single line. I've set the width and height of it, tried fixing the overflows -x and -y, but still not able to fix it.

Suggestions will be appreciated. Thank you.

1

There are 1 answers

0
Dangling Cruze On BEST ANSWER

Try contenteditable property of a div, it'll be much easier to style.

Reference link : contenteditable property