public/be-assets/node_modules/@yaireo/tagify/dist/tagify.esm.js
// special proccess is needed for pasted content in order to "clean" it
special proccess is needed for pasted content in order to "clean" it
special proccess is needed for pasted content in order to " clean " it
onPaste(e) {
      e.preventDefault();
      var _s = this.settings,
          selectModeWithoutInput = _s.mode == 'select' && _s.enforceWhitelist;
      if (selectModeWithoutInput || !_s.userInput) {
        return false;
      }
      var clipboardData, pastedText;
      if (_s.readonly) return; 
      clipboardData = e.clipboardData || window.clipboardData;
      pastedText = clipboardData.getData('Text');
      _s.hooks.beforePaste(e, {
        tagify: this,
        pastedText,
        clipboardData
      }).then(result => {
        if (result === undefined) result = pastedText;
        if (result) {
          this.injectAtCaret(result, window.getSelection().getRangeAt(0));
          if (this.settings.mode == 'mix') {
            this.events.callbacks.onMixTagsInput.call(this, e);
          } else if (this.settings.pasteAsTags) {
            this.addTags(this.state.inputText + result, true);
          } else this.state.inputText = result;
        }
      }).catch(err => err);
    }
onPaste ( e ) { e . preventDefault ( ) ; var _s = this . settings , selectModeWithoutInput = _s . mode == 'select' && _s . enforceWhitelist ; if ( selectModeWithoutInput || ! _s . userInput ) { return false ; } var clipboardData , pastedText ; if ( _s . readonly ) return ; clipboardData = e . clipboardData || window . clipboardData ; pastedText = clipboardData . getData ( 'Text' ) ; _s . hooks . beforePaste ( e , { tagify : this , pastedText , clipboardData } ) . then ( result => { if ( result === undefined ) result = pastedText ; if ( result ) { this . injectAtCaret ( result , window . getSelection ( ) . getRangeAt ( 0 ) ) ; if ( this . settings . mode == 'mix' ) { this . events . callbacks . onMixTagsInput . call ( this , e ) ; } else if ( this . settings . pasteAsTags ) { this . addTags ( this . state . inputText + result , true ) ; } else this . state . inputText = result ; } } ) . catch ( err => err ) ; }
special proccess is needed for pasted content in order to "clean" it
special proccess is needed for pasted content in order to " clean " it
// Get pasted data via clipboard API