tinymce.full.js
function (container) {
        var matches = [], i, l, selectors = this._selectors;

        function collect(items, selector, index) {
          var i, l, fi, fl, item, filters = selector[index];

          for (i = 0, l = items.length; i < l; i++) {
            item = items[i];

            // Run each filter against the item
            for (fi = 0, fl = filters.length; fi < fl; fi++) {
              if (!filters[fi](item, i, l)) {
                fi = fl + 1;
                break;
              }
            }

            // All filters matched the item
            if (fi === fl) {
              // Matched item is on the last expression like: panel toolbar [button]
              if (index == selector.length - 1) {
                matches.push(item);
              } else {
                // Collect next expression type
                if (item.items) {
                  collect(item.items(), selector, index + 1);
                }
              }
            } else if (filters.direct) {
              return;
            }

            // Collect child items
            if (item.items) {
              collect(item.items(), selector, index);
            }
          }
        }

        if (container.items) {
          for (i = 0, l = selectors.length; i < l; i++) {
            collect(container.items(), selectors[i], 0);
          }

          // Unique the matches if needed
          if (l > 1) {
            matches = unique(matches);
          }
        }

        // Fix for circular reference
        if (!Collection) {
          // TODO: Fix me!
          Collection = Selector.Collection;
        }

        return new Collection(matches);
      }
function (container) {
        var matches = [], i, l, selectors = this._selectors;

        function collect(items, selector, index) {
          var i, l, fi, fl, item, filters = selector[index];

          for (i = 0, l = items.length; i < l; i++) {
            item = items[i];

            // Run each filter against the item
            for (fi = 0, fl = filters.length; fi < fl; fi++) {
              if (!filters[fi](item, i, l)) {
                fi = fl + 1;
                break;
              }
            }

            // All filters matched the item
            if (fi === fl) {
              // Matched item is on the last expression like: panel toolbar [button]
              if (index == selector.length - 1) {
                matches.push(item);
              } else {
                // Collect next expression type
                if (item.items) {
                  collect(item.items(), selector, index + 1);
                }
              }
            } else if (filters.direct) {
              return;
            }

            // Collect child items
            if (item.items) {
              collect(item.items(), selector, index);
            }
          }
        }

        if (container.items) {
          for (i = 0, l = selectors.length; i < l; i++) {
            collect(container.items(), selectors[i], 0);
          }

          // Unique the matches if needed
          if (l > 1) {
            matches = unique(matches);
          }
        }

        // Fix for circular reference
        if (!Collection) {
          // TODO: Fix me!
          Collection = Selector.Collection;
        }

        return new Collection(matches);
      }
function ( container ) { var matches = [ ] , i , l , selectors = this . _selectors ; function collect ( items , selector , index ) { var i , l , fi , fl , item , filters = selector [ index ] ; for ( i = 0 , l = items . length ; i < l ; i ++ ) { item = items [ i ] ; // Run each filter against the item for ( fi = 0 , fl = filters . length ; fi < fl ; fi ++ ) { if ( ! filters [ fi ] ( item , i , l ) ) { fi = fl + 1 ; break ; } } // All filters matched the item if ( fi === fl ) { // Matched item is on the last expression like: panel toolbar [button] if ( index == selector . length - 1 ) { matches . push ( item ) ; } else { // Collect next expression type if ( item . items ) { collect ( item . items ( ) , selector , index + 1 ) ; } } } else if ( filters . direct ) { return ; } // Collect child items if ( item . items ) { collect ( item . items ( ) , selector , index ) ; } } } if ( container . items ) { for ( i = 0 , l = selectors . length ; i < l ; i ++ ) { collect ( container . items ( ) , selectors [ i ] , 0 ) ; } // Unique the matches if needed if ( l > 1 ) { matches = unique ( matches ) ; } } // Fix for circular reference if ( ! Collection ) { // TODO: Fix me! Collection = Selector . Collection ; } return new Collection ( matches ) ; }
Returns a tinymce.ui.Collection with matches of the specified selector inside the specified container.

@method find
@param {tinymce.ui.Control} container Container to look for items in.
@return {tinymce.ui.Collection} Collection with matched elements.
Returns a tinymce . ui . Collection with matches of the specified selector inside the specified container .