Opened 9 years ago

Closed 9 years ago

#13594 closed Bug (duplicate)

editor.resize(...) not working for CSS size units

Reported by: loeing Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:

Description (last modified by Jakub Ś)

When the ckeditor.resize(...) function is run with any of the CSS size units such as em, rem and %, the size of the editor doesn't change.

So ckeditor.resize(100, 100) works and so does ckeditor.resize('100px', '100px') but ckeditor.resize('100em', '100em') doesn't.

Edit: I persionally could not get it working with any CSS unit, even px.

Change History (2)

comment:1 Changed 9 years ago by Jakub Ś

Keywords: resize removed
Status: newconfirmed

I have tested below code and here are the results:

editor.on( 'instanceReady', function(event){
	//editor.resize(1000, 1000); //works  
	//editor.resize( 2000, '3500' );//works				
	//editor.resize( 2000, '3500px' );//width yes, height no	
	//editor.resize( '4000', 1350 );//width no, height yes
	//editor.resize( '2000px', '1350px' );//width no, height no

First of all results in CKE 3.6.x and 4.x are consistent. It seems that only integer values or plain strings, without any CSS units, work.

This contadicts to what documentation says:!/api/CKEDITOR.editor-method-resize,!/guide/dev_resize.

We need to either fix the docs or code.

comment:2 Changed 9 years ago by Jakub Ś

Description: modified (diff)
Resolution: duplicate
Status: confirmedclosed
Summary: editor.resize(...) not working for CSS size units other than pxeditor.resize(...) not working for CSS size units

OK it seems we have missed that ticket. This is in fact a DUP of #8092 or #11613.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy