HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

how to reinitialize rich editor

how to reinitialize rich editor, what i am doing is taking the html content from https://dev.vanilla.localhost/vanilla/post/replycomment/7 and putting it under the comment using AJAX but the html is not initializing


$.ajax({

type: "GET",

url: $(btn).attr('href'),

data: `DeliveryType=VIEW&DeliveryMethod=JSON&TransientKey=${$('#Form_TransientKey').val()}&DiscussionID=${$('#Form_DiscussionID').val()}&Format=${$('#Form_Format').val()}`,

dataType: 'json',

error: function(XMLHttpRequest, textStatus, errorThrown) {

// Remove any old popups

$('div.Popup,.Overlay').remove();

$.popup({}, XMLHttpRequest.responseText);

},

success: function(json) {

json = $.postParseJson(json);


// Place the form after the original comment and hide the spinner.

$(msg).after(json.Data);

}

});

Comments

  • Options

    ok i found it thanks, had to look in rich-editor/src/scripts/entities/forum.ts

Sign In or Register to comment.