I have added tinyMCE editor in Order status history for comment field, the issue is when i get ajax response, editor disappears instead its showing normal textarea field, please find below screenshots of tinyMce editor field and ajax response field respectively:

order history on landing page

order history while ajax comment

I have used below code in this page to use tinyMCE editor:

<textarea name="history[comment]"  id="history_comment" class="textarea" cols="80" rows="20"></textarea>
                ], function(jQuery){

                var config = {}, 

                jQuery.extend(config, {
                    settings: {
                        theme_advanced_buttons1 : 'bold,italic,|,justifyleft,justifycenter,justifyright,|,' +
                        theme_advanced_buttons2: null,
                        theme_advanced_buttons3: null,
                        theme_advanced_buttons4: null
                editor = new tinyMceWysiwygSetup(
  • Please share your ajax code
    – kunj
    Oct 18, 2018 at 4:13
  • Actually, this is default magento ajax request/response used for adding comment on order view page Oct 18, 2018 at 9:40
  • Most probably your DOM is getting reset after the ajax call. Hope you have found the issue till now Oct 22, 2018 at 12:57
  • @AshwaniShukla. Thanks for your reply. Yes, you got it right that DOM is being reset after ajax call. I have tried so many solutions till date but nothing worked unfortunately. You may guide me if you know any proper solution. Oct 22, 2018 at 13:50
  • try to bind the editor using jquery "on" ( api.jquery.com/on ). And I will be able to help you more if you could please let me know the purpose of ajax and it's code. Oct 22, 2018 at 14:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.