function() {
      var that = this,
          oldHtml,
          cleanHtml;

      if (wysihtml5.browser.supportsModenPaste()) {
        this.on("paste:composer", function(event) {
          event.preventDefault();
          oldHtml = wysihtml5.dom.getPastedHtml(event);
          if (oldHtml) {
            that._cleanAndPaste(oldHtml);
          }
        });

      } else {
        this.on("beforepaste:composer", function(event) {
          event.preventDefault();
          wysihtml5.dom.getPastedHtmlWithDiv(that.composer, function(pastedHTML) {
            if (pastedHTML) {
              that._cleanAndPaste(pastedHTML);
            }
          });
        });

      }
    }
function() {
      var that = this,
          oldHtml,
          cleanHtml;

      if (wysihtml5.browser.supportsModenPaste()) {
        this.on("paste:composer", function(event) {
          event.preventDefault();
          oldHtml = wysihtml5.dom.getPastedHtml(event);
          if (oldHtml) {
            that._cleanAndPaste(oldHtml);
          }
        });

      } else {
        this.on("beforepaste:composer", function(event) {
          event.preventDefault();
          wysihtml5.dom.getPastedHtmlWithDiv(that.composer, function(pastedHTML) {
            if (pastedHTML) {
              that._cleanAndPaste(pastedHTML);
            }
          });
        });

      }
    }
function ( ) { var that = this , oldHtml , cleanHtml ; if ( wysihtml5 . browser . supportsModenPaste ( ) ) { this . on ( "paste:composer" , function ( event ) { event . preventDefault ( ) ; oldHtml = wysihtml5 . dom . getPastedHtml ( event ) ; if ( oldHtml ) { that . _cleanAndPaste ( oldHtml ) ; } } ) ; } else { this . on ( "beforepaste:composer" , function ( event ) { event . preventDefault ( ) ; wysihtml5 . dom . getPastedHtmlWithDiv ( that . composer , function ( pastedHTML ) { if ( pastedHTML ) { that . _cleanAndPaste ( pastedHTML ) ; } } ) ; } ) ; } }
Prepare html parser logic
- Observes for paste and drop
Prepare html parser logic - Observes for paste and drop
This function is called by the paste event handler. It is called by the paste event handler. It is also called by the paste event handler.