NicEdit in Hidden Div is resized small

In my case this worked with jquery:

new nicEditor().panelInstance('myArea');

$('.nicEdit-panelContain').parent().width('100%');
$('.nicEdit-panelContain').parent().next().width('100%');

Or to absolute witdh:

$('.nicEdit-panelContain').parent().width('400px');
$('.nicEdit-panelContain').parent().next().width('400px');

The answer by @Hans worked with me ... But I needed to add this as well to resize the div containing the text being edited (only the container around that div was being resized when not using the line below):

$('.nicEdit-main').width('100%');

$('.nicEdit-panelContain').parent().width('100%');
$('.nicEdit-panelContain').parent().next()
    .width($('.nicEdit-panelContain').parent().width()-2);

Add "-2" to "width" if parent of textarea has prop "padding-left" or "padding-right".