function stripFormatting (divElement) {
  const childs = divElement.childNodes
  for (let i = 0, iMax = childs.length; i < iMax; i++) {
    const child = childs[i]

    // remove the style
    if (child.style) {
      // TODO: test if child.attributes does contain style
      child.removeAttribute('style')
    }

    // remove all attributes
    const attributes = child.attributes
    if (attributes) {
      for (let j = attributes.length - 1; j >= 0; j--) {
        const attribute = attributes[j]
        if (attribute.specified === true) {
          child.removeAttribute(attribute.name)
        }
      }
    }

    // recursively strip childs
    stripFormatting(child)
  }
}
Strip the formatting from the contents of a div
the formatting from the div itself is not stripped, only from its childs.
@param {Element} divElement