code: function (node, keepChildren) {
          node = this.$$(node);
  
          if (keepChildren) {
            node.each(function () {
              var child;
  
              while ((child = this.firstChild)) {
                if (child.nodeType == 3 && child.data.length === 0) {
                  this.removeChild(child);
                } else {
                  this.parentNode.insertBefore(child, this);
                }
              }
            }).remove();
          } else {
            node.remove();
          }
  
          return node.length > 1 ? node.toArray() : node[0];
        }
docs: Removes/deletes the specified element(s) from the DOM.
  
  @method remove
  @param {String/Element/Array} node ID of element or DOM element object or array containing multiple elements/ids.
  @param {Boolean} keepChildren Optional state to keep children or not. If set to true all children will be
  placed at the location of the removed element.
  @return {Element/Array} HTML DOM element that got removed, or an array of removed elements if multiple input elements
  were passed in.
  @example
  // Removes all paragraphs in the active editor
  tinymce.activeEditor.dom.remove(tinymce.activeEditor.dom.select('p'));
  
  // Removes an element by id in the document
  tinymce.DOM.remove('mydiv');