Opened 5 years ago

Closed 4 years ago

#11613 closed Bug (duplicate)

CKEDITOR.editor.resize won't accept CSS units for height

Reported by: Christophe Guillou Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IBM Cc: Irina, Satya Minnekanti

Description

The documentation of CKEDITOR.editor.resize http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resize reads:

resize( width, height, [isContentHeight], [resizeInner] ) Resizes the editor interface. editor.resize( 900, 300 ); editor.resize( '100%', 450, true ); Parameters width : Number/String The new width. It can be an integer denoting a value in pixels or a CSS size value with unit. height : Number/String The new height. It can be an integer denoting a value in pixels or a CSS size value with unit.

But its implementation is:

CKEDITOR.editor.prototype.resize=function(a,b,c,d){ var g=this.container,k=this.ui.space("contents"),l=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,d=d?g.getChild(1):g; d.setSize("width",a,true); l&&(l.style.width="1%");

k.setStyle("height",Math.max(b-(c?0:(d.$.offsetHeight
0)-(k.$.clientHeight0)),0)+"px");

l&&(l.style.width="100%"); this.fire("resize"); };

If I call:

editor.resize("100%", "2em",true);

Math.max(b-(c?0:(d.$.offsetHeight
0)-(k.$.clientHeight0)),0) returns NaN

This results into a call to setStyle("height", "NaNpx"); which has no effect.

Change History (2)

comment:1 Changed 5 years ago by Jakub Ś

Status: newconfirmed
Version: 3.0

Problem can be reproduced from CKEditor 3.0.

This ticket has extension for IE - #8091. While #8091 is about code change, I'm not sure if in this ticket documentation or code should be changed.

comment:2 Changed 4 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed

I'm marking this ticket as dupicate of #8092

IBM team - I have moved your CC and keywords there.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy