DAR-1631, refactor preview width calculation so it works both with sourc...

...e and CKE editor