4a Developer
4a Developer

Reputation: 11

How to delete all instance of wysihtml5 editor

I have an editor input for adding resume.When user click edit button the editor is loaded via ajax.Here is the code for loading editor:-

    jQuery('#resumeEditor').wysihtml5();

When the user clicks the cancel button and again tries to edit the resume, multiple editor toolbar appears. I think I have to delete all instance of editor.But I dont know how!

Any help appreciated.....

Upvotes: 1

Views: 1388

Answers (2)

Annapurna
Annapurna

Reputation: 549

This worked for me. Try it out:

    $('.wysihtml5-sandbox, .wysihtml5-toolbar').remove();
    $('#resumeEditor').show();

It removes the wysihtml5 and shows the textarea as it was before initializing.

Upvotes: 1

BasicSide
BasicSide

Reputation: 97

I had à similar problem and resolved with this code

  $("textarea").next().next().remove();
  $("textarea").prev().remove();
  $("textarea").css('display', 'block');

removing the HTML tags by hand, I tried to find some kind of function to remove and have not had succeed

Upvotes: 0

Related Questions