How to force resize the editarea?

869 views
Skip to first unread message

郑文辉(Techlive Zheng)

unread,
Mar 5, 2012, 11:37:42 PM3/5/12
to ace-d...@googlegroups.com
How to triggle a force resizing of the editarea? Is there any api can use?

Joop Ringelberg

unread,
Mar 6, 2012, 8:22:02 AM3/6/12
to ace-d...@googlegroups.com, "郑文辉(Techlive Zheng)"
Hi,
it so happens I had the same question this morning. The answer is simple:
* resize the html element on which your editor is created
* then call resize().

var aceEditor = ace.edit("editor");
// Do some resizing, e.g. with jQuery:
$( "#editor" ).width( 200 );
aceEditor.resize();

Joop

Reply all
Reply to author
Forward
0 new messages