<commit_before>"use strict";

$(function ()
{
    var ue = UE.getEditor('container', 
    {
        serverUrl: "/admin/edit/control", 
        initialFrameHeight: 300
    });
    console.log(ue.getOpt("serverUrl")); 
    ue.on("serverConfigLoaded", function(){console.log(ue.getOpt("imageActionName"));});
    
    $("#publishBtn").bind("click", function()
        {
            console.log("click Publish button " + ue.getContent());
            $(".alert.alert-info").hide();
            $(".alert.alert-info").slideDown("slow");
            $.ajax("/admin/edit/store", 
            {
                method: "post",
                contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                data: {content: ue.getContent()}
            }).done(function(data)
            {
                $(".alert.alert-info").hide();
                $(".alert.alert-success").slideDown("slow");
            }).fail(function(xhr, status)
            {
                $(".alert.alert-info").hide();
                $(".alert.alert-danger").slideDown("slow");
            }).always(function()
            {
                console.log("click Publish button always");
            });
        }
    );
}
);<commit_msg>modify the ajax data<commit_after>"use strict";

$(function ()
{
    var ue = UE.getEditor('container', 
    {
        serverUrl: "/admin/editor/control",    // request ueditor config.json
        initialFrameHeight: 300
    });
    
    console.log(ue.getOpt("serverUrl")); 
    ue.on("serverConfigLoaded", function(){console.log("Ueditor config.json loaded");});
    
    $("#publishBtn").bind("click", function()
        {
            $(".alert.alert-info").hide();
            $(".alert.alert-info").slideDown("slow");
            
            var blog = {};
            blog.title = $("#titleInput").val();
            blog.content = ue.getContent();
            console.log("click Publish button " + blog.title);   
            
            // post the blog
            $.ajax("/admin/editor/store", 
            {
                method: "post",
                contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                data: blog
            }).done(function(data)
            {
                $(".alert.alert-info").hide();
                $(".alert.alert-success").slideDown("slow");
            }).fail(function(xhr, status)
            {
                $(".alert.alert-info").hide();
                $(".alert.alert-danger").slideDown("slow");
            }).always(function()
            {
                console.log("click Publish button always");
            });
        }
    );
    
}
);
{'fraction_non_alphanumeric': 0.17890772128060264, 'fraction_numerical': 0.0030131826741996233, 'mean_word_length': 1.603921568627451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6618426', 'n_tokens_mistral': 746, 'n_tokens_neox': 710, 'n_words': 100}