code: function (elm) {
          var ctrl, lookup = this.getRoot().controlIdLookup;
  
          while (elm && lookup) {
            ctrl = lookup[elm.id];
            if (ctrl) {
              break;
            }
  
            elm = elm.parentNode;
          }
  
          return ctrl;
        }
docs: Returns a control instance for the current DOM element.
  
  @method getParentCtrl
  @param {Element} elm HTML dom element to get parent control from.
  @return {tinymce.ui.Control} Control instance or undefined.