• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Render (activate) XenForo redactor

#1
Hello guys, i'm noob in JS and don't know how to render redactor in js.

I try load page (page contains redactor) via AJAX, but redactor don't display.
I use such construction:

Code:
var $destinationContainer = $($input.data('destination'));
        var handleAjaxResponse = function (ajaxData, textStatus){
                if (ajaxData.error) {
                    XenForo.hasResponseError(ajaxData, textStatus);
                }
                else {                   
                    $destinationContainer.html(ajaxData.templateHtml);
                    new XenForo.ExtLoader(ajaxData);
                    $destinationContainer.xfActivate();
                }
                
        }
        
        $input.click(function() {
            if ($destinationContainer.html().length === 0)
            {
                XenForo.ajax($(this).data('loadurl'), {}, handleAjaxResponse);
            }
        });
Do Somebody knows how to display redactor?