Rework the preview js part (move from ace_textarea field to the editor)