insertNegatedAttributes = (transaction, parent, currPos, negatedAttributes) => {
  // check if we really need to remove attributes
  while (currPos.right !== null && (currPos.right.deleted === true || currPos.right.content.constructor === ContentFormat && equalAttrs(negatedAttributes.get(
  /** @type {ContentFormat} */
  currPos.right.content.key),
  /** @type {ContentFormat} */
  currPos.right.content.value))) {
    if (!currPos.right.deleted) {
      negatedAttributes.delete(
      /** @type {ContentFormat} */
      currPos.right.content.key);
    }

    currPos.forward();
  }

  const doc = transaction.doc;
  const ownClientId = doc.clientID;
  negatedAttributes.forEach((val, key) => {
    const left = currPos.left;
    const right = currPos.right;
    const nextFormat = new Item(createID(ownClientId, getState(doc.store, ownClientId)), left, left && left.lastId, right, right && right.id, parent, null, new ContentFormat(key, val));
    nextFormat.integrate(transaction, 0);
    currPos.right = nextFormat;
    currPos.forward();
  });
}
Negate applied formats

@param {Transaction} transaction
@param {AbstractType<any>} parent
@param {ItemTextListPosition} currPos
@param {Map<string,any>} negatedAttributes

@private
@function