Fabrikeditor grows vertically

Fabrikeditor will now grow to max-height and shrink back to original height. Default max-height is twice original height.

Also de-duplicated code.