<commit_before>$("#create-post-form").on('submit', function() {
    var title = $("#inputTitle").val();
    var contents = $("#inputPostContents").val();

    if (!title) {
        alert("Please enter a title");
        return false;
    }

    if (!contents) {
        alert("Please enter some contents");
        return false;
    }
    return true;
});


var editingPost = false;
var published = false;
var allowEditingOfSlugUrl = true;
var originalSlugUrl = "";
var originalTitle = "";

$(function() {
    var simplemde = new SimpleMDE({
        element: $("#inputPostContents")[0],
        spellChecker: false,
        forceSync: true,
        placeholder: "Write your blog post here",
        autosave: {
            enabled: true,
            uniqueId: "SteamPress-Create-Post",
            delay: 1000,
        },
        promptURLs: true,
    });
});
<commit_msg>Post Contents text area is no longer required when hidden by SimpleMDE<commit_after>$("#create-post-form").on('submit', function() {
    var title = $("#inputTitle").val();
    var contents = $("#inputPostContents").val();

    if (!title) {
        alert("Please enter a title");
        return false;
    }

    if (!contents) {
        alert("Please enter some contents");
        return false;
    }
    return true;
});


var editingPost = false;
var published = false;
var allowEditingOfSlugUrl = true;
var originalSlugUrl = "";
var originalTitle = "";

$(function() {
    var simplemde = new SimpleMDE({
        element: $("#inputPostContents")[0],
        spellChecker: false,
        forceSync: true,
        placeholder: "Write your blog post here",
        autosave: {
            enabled: true,
            uniqueId: "SteamPress-Create-Post",
            delay: 1000,
        },
        promptURLs: true,
    });
    // SimpleMDE has been initialised so we need to turn off validation for the
    // underlying text area
    $('#inputPostContents').removeAttr('required');
});

{'fraction_non_alphanumeric': 0.13972463029066803, 'fraction_numerical': 0.005099439061703213, 'mean_word_length': 2.478723404255319, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7041172', 'n_tokens_mistral': 556, 'n_tokens_neox': 545, 'n_words': 158}