rizkit1 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
GNU General Public License v2.0
0 stars 0 forks source link

How can I make the edit area use the CSS size and be resizable? #123

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I created a css class for my textarea that will allow it to be resized
as the parent div (a jqueryui form modal dialog) changes size (note: this
works great with stock textarea and input controls)

What is the expected output? What do you see instead?

I expected that the edit area would resize as I resize the dialog box.  But
it did not.  As a matter of fact, it seemed to be ignoring the size
constraints in the CSS class.

What version of the product are you using? On what operating system?

jwysiwyg 0.5, running Firefox 3.5 on Mac OS X (latest) and also in IE 8 on
Windows XP.

Please provide any additional information below.

After looking through the issues, I found that I could edit the source to
consider the CSS height and width.  So I edited lines 331 and 332 to read: 

    var newX = parseInt($(element).css('width')) || element.width ||
element.clientWidth;
    var newY = parseInt($(element).css('height')) || element.height ||
element.clientHeight;

and they work great on the initial sizing, but when I examine the DOM, I
find that the width/height values are converted to pixels (I was using 95%
to allow resizing) and the box does not resize.  Note that if I hand edit
the DOM to have percentage values, it sizes as expected.

Thanks.

Original issue reported on code.google.com by d...@ebji.org on 2 Aug 2009 at 5:49

GoogleCodeExporter commented 8 years ago
Simply extend Your CSS to control

div.wysiwyg

and

div.wysiwyg iframe

Original comment by akzhan.a...@gmail.com on 8 Dec 2009 at 12:09

GoogleCodeExporter commented 8 years ago

Original comment by akzhan.a...@gmail.com on 8 Dec 2009 at 12:09