javierdotnet / gwt-ckeditor

Automatically exported from code.google.com/p/gwt-ckeditor
0 stars 0 forks source link

Doesn't size correctly inside Gxt Layouts #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.add editor to Gxt LayoutContainer with FitLayout
2.run!

What is the expected output? What do you see instead?
expected editor to take up full size of layout container
instead, it only takes up about 40% of the height

What version of the product are you using? On what operating system?
Linux Ubuntu 10.10
Firefox 3.6
gwt-ckeditor 0.5

Please provide any additional information below.

tried adding setHeight("100%") and setHeight("2000px") before calling layout() 
on the gxt layout container.  doesn't change the height at all.

Original issue reported on code.google.com by eli...@espoc.com on 15 Feb 2011 at 4:10

GoogleCodeExporter commented 9 years ago
I think this is an 
[http://ckeditor.com/forums/CKEditor-3.x/Setting-editor-area-height-100?page=1 
issue] with CKEditor not accepting percentage values for 
[http://docs.ckeditor.com/#!/api/CKEDITOR.config height]. A workaround is to 
resize the Editor through JSNI once your Layout is loaded and you know the 
actual height in pixels.
{{{
private native void resizeEditor(CKEditor editor, String width,
            String height) /*-{
                var e = editor.@com.axeiya.gwtckeditor.client.CKEditor::editor;
                if(typeof(e) != 'undefined' && e != null){
                    e.resize(width, height);
                }
            }-*/;
}}}

and call it like this
{{{
String calculatedHeight = getClientHeightAsString(); // '500', '25em' or '300px'
resizeEditor(myCKEditor, "100%", calculatedHeight);
}}}

I've blogged about this 
[http://cirovladimir.wordpress.com/2013/04/22/smartgwt-ajustando-la-altura-de-un
-ckeditor/ here] (spanish)

Original comment by cirovlad...@gmail.com on 22 Apr 2013 at 5:10