Nicedit textarea width inside jQuery UI accordion not working correctly

I am using nicedit.js and jQuery UI accordion.
I have several accordions that contain these nicesit WYSIWYG text areas.

When I refresh the page, the first area of ​​the accordion opens and the correct WYSIWYG nicedit area is displayed (width is 100%).
When I select another accordion area, it opens and displays the NIESITY WYSIWYG area, but it is only 100 pixels wide.

I searched the code a bit and found that it uses 100% as width in the build process. I came across this with a jQuery UI accordion, not allowing things to display correctly before and just destroyed the identifier and reinitialized it.

I am looking for a solution that will allow all WIESSIYG nicedit areas to display 100% or even a fixed width.

+3
source share
1 answer

I suggest you subscribe to the accordion change event and initialize the WYSIWYG editors after these events, if they have not been initialized before. I am not familiar with nicedit or how their editor is designed, but if it dynamically calculates the size, then it cannot do this unless the HTML container is displayed. Thus, the change event will allow you to display the container so that the dimensions are calculated correctly.

0
source

All Articles