$('#form_blocks').replaceWith('<%= escape_javascript(render(:partial => "form_blocks")) %>'); $.CMS.enable_codemirror();