I have a number (variable) of Editors on a page which each show dynamic content in preview mode. This is so that poorly formatted HTML within that content does not have adverse affects on the rest of the page (the Editor acts as a kind of quarantine for each piece of content).
I'd like each Editor panel to be as small as possible, but autosize up to a maximum height based on the size of its content. I don't believe Editor can calculate the size needed to display certain content, but can I, client side, do something like:
1.) Iterate through each Editor
2.) Set size to a nominal small value
3.) Check if the vertical scroll bar is showing and the Editor has not already reached it's maximum height allowed
4.) If true, increase the height of the Editor by 10px and repeat step 3
Is it possible to achieve this and / or are there more elegant solutions?
Regards
I'd like each Editor panel to be as small as possible, but autosize up to a maximum height based on the size of its content. I don't believe Editor can calculate the size needed to display certain content, but can I, client side, do something like:
1.) Iterate through each Editor
2.) Set size to a nominal small value
3.) Check if the vertical scroll bar is showing and the Editor has not already reached it's maximum height allowed
4.) If true, increase the height of the Editor by 10px and repeat step 3
Is it possible to achieve this and / or are there more elegant solutions?
Regards