//= require th-page-editor //= require jquery.ajaxform.js $(function() { var $simplePageForm = $(".simple-page-form"); if(!$simplePageForm.length) return; (function() { var $tagsmanager = $simplePageForm.find("[data-simple-routes-list]"); $tagsmanager.tagsManager({ prefilled: $tagsmanager.val().split(/,/g), preventSubmitOnEnter: true, typeahead: false, hiddenTagListName: $tagsmanager.prop("name"), validator: function(pathname) { return !pathname.match(/(?:^\/|\s|\/$)/); } }).prop("name", "").val("").blur(function() { if($(this).val().length) { $(this).trigger(jQuery.Event("keypress", { which: 44 })); } }); })(); var $htmlContainer = $simplePageForm.find(".content-html-container"); if($htmlContainer.html().match(/^\s*$/)) { $htmlContainer.html("