public/be-assets/node_modules/@yaireo/tagify/dist/tagify.esm.js
/**
   * Replaces an exisitng tag with a new one. Used for updating a tag's data
   * @param {Object} tagElm  [DOM node to replace]
   * @param {Object} tagData [data to create new tag from]
   */
Replaces an exisitng tag with a new one. Used for updating a tag's data
@param {Object} tagElm  [DOM node to replace]
@param {Object} tagData [data to create new tag from]
Replaces an exisitng tag with a new one . Used for updating a tag ' s data @param { Object } tagElm [ DOM node to replace ] @param { Object } tagData [ data to create new tag from ]
replaceTag(tagElm, tagData) {
    if (!tagData || !tagData.value) tagData = tagElm.__tagifyTagData; 
    if (tagData.__isValid && tagData.__isValid != true) extend(tagData, this.getInvalidTagAttrs(tagData, tagData.__isValid));
    var newTagElm = this.createTagElem(tagData); 
    tagElm.parentNode.replaceChild(newTagElm, tagElm);
    this.updateValueByDOMTags();
    return newTagElm;
  }
replaceTag ( tagElm , tagData ) { if ( ! tagData || ! tagData . value ) tagData = tagElm . __tagifyTagData ; if ( tagData . __isValid && tagData . __isValid != true ) extend ( tagData , this . getInvalidTagAttrs ( tagData , tagData . __isValid ) ) ; var newTagElm = this . createTagElem ( tagData ) ; tagElm . parentNode . replaceChild ( newTagElm , tagElm ) ; this . updateValueByDOMTags ( ) ; return newTagElm ; }
Replaces an exisitng tag with a new one.
Replaces an exisitng tag with a new one .
// if tag is invalid, make the according changes in the newly created element // update DOM