tinyMCE.init({
    setupcontent_callback: "customSetupContent",
    theme: "advanced",
    mode: "specific_textareas",
    editor_selector: "SocialSquaredRTE",
    //elements : "content",
    //content_css : "./css/tiny_mce.css",

    plugins: "emotions, fullscreen, contextmenu, advimage, advlink, media, paste, preview",

    theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,",
    theme_advanced_buttons2: ",cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,preview,|,forecolor,backcolor,|,hr,|,sub,sup,|,emotions,media,|,fullscreen",
    theme_advanced_buttons3: "",

    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    theme_advanced_path_location: "bottom",
    theme_advanced_resizing: true,
    content_css: "css/content.css",

    setup: function (ed) {
        ed.onInit.add(function (ed, evt) {
            var doc = ed.getWin();

            tinymce.dom.Event.add(doc, 'focus', function (e) {
                if (document.location.toString().indexOf("EditPost") == -1) {
                  //  ed.contentDocument.body.style.fontSize = "15px";
                }
            });

        });
    }

});

function customSetupContent(editor_id, body, doc) {

    var rte = tinyMCE.getInstanceById(editor_id);

    // forum reply
    if (editor_id.indexOf("txtPostContentReply") != -1) {
        rte.focus();
    }
}
