CKeditor iframe size issues [message #1699201] |
Mon, 22 June 2015 14:06 |
Antoni Mylka Messages: 14 Registered: January 2015 |
Junior Member |
|
|
i'm trying to integrate the CKeditor incubator widget in our RAP 2.3.0 application. I've noticed two issues.
First issue is visible in the Demo app at:
rap.eclipsesource.com/demo/release/rapdemo/#ckeditor
When you open that page in Firefox 38.0.5, then start typing text with very short lines and lots of linebreaks, so that the cursor reaches the bottom end of the text area a scrollbar appears. The problem is that that scrollbar doesn't reach to the end of the text area. It looks as if the iframe were smaller than the text area. If I zoom in and out (CTRL+Scroll Wheel down and up) then the widget gets resized and the scrollbars get the correct size.
State after the text is typed, but before the resize:
State after a zoom out and zoom in
I only noticed this in Firefox, In Chrome and IE the demo seems to work.
A second, similar problem I see in my app. I have a Composite that is supposed to contain the CKEditor. In the code I do this:
Composite composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new DockData("default", 1));
composite.setLayout(createGridLayout(1, true, true, true));
final CKEditor ckEditor = new CKEditor(composite, SWT.NONE);
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
ckEditor.setLayoutData(layoutData);
DockData is a LayoutData for our own proprietary layout. In this case it's equivalent to FillLayout with a minimal height of 250. The createGridLayout function is a copy of the ExampleUtil function from the demo. When the app is rendered and I write something in the editor, the scrollbar appears as well, but this time it is too long. It looks as if the iframe itself were 250 pixels high, but the toolbar weren't taken into account. The area that's cut off is of the same height as the toolbar. When I do a zoom in and out - the widget gets resized and the underlying iframe gets the proper size, where the combined height of the iframe and the toolbar is 250.
State before the resize:
State after a zoom out and zoom in
In our app this phenomenon is visible in chrome, firefox and IE.
What to do? Where should I start looking to ensure that the layout function from handler.js takes the iframe and the toolbar into account both on the first render and after a resize? Our Layout is non-standard, but the resizing issue seems like a bug in the widget. The entire CKEditor widget has the correct area, just the toolbar pushes the iframe down, so that a part of it gets cut off. That looks like a problem internal to the widget. Perhaps if the issue visible in the demo is fixed - the issue visible in our app will get fixed as well.
All ideas welcome.
|
|
|
Powered by
FUDForum. Page generated in 0.02412 seconds