tinymce.full.js
function (name, attrs, html) {
        var outHtml = '', key;

        outHtml += '<' + name;

        for (key in attrs) {
          if (attrs.hasOwnProperty(key) && attrs[key] !== null && typeof attrs[key] != 'undefined') {
            outHtml += ' ' + key + '="' + this.encode(attrs[key]) + '"';
          }
        }

        // A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime
        if (typeof html != "undefined") {
          return outHtml + '>' + html + '</' + name + '>';
        }

        return outHtml + ' />';
      }
function (name, attrs, html) {
        var outHtml = '', key;

        outHtml += '<' + name;

        for (key in attrs) {
          if (attrs.hasOwnProperty(key) && attrs[key] !== null && typeof attrs[key] != 'undefined') {
            outHtml += ' ' + key + '="' + this.encode(attrs[key]) + '"';
          }
        }

        // A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime
        if (typeof html != "undefined") {
          return outHtml + '>' + html + '</' + name + '>';
        }

        return outHtml + ' />';
      }
function ( name , attrs , html ) { var outHtml = '' , key ; outHtml += '<' + name ; for ( key in attrs ) { if ( attrs . hasOwnProperty ( key ) && attrs [ key ] !== null && typeof attrs [ key ] != 'undefined' ) { outHtml += ' ' + key + '="' + this . encode ( attrs [ key ] ) + '"' ; } } // A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime if ( typeof html != "undefined" ) { return outHtml + '>' + html + '</' + name + '>' ; } return outHtml + ' />' ; }
Creates HTML string for element. The element will be closed unless an empty inner HTML string is passed in.

@method createHTML
@param {String} name Name of new element.
@param {Object} attrs Optional object name/value collection with element attributes.
@param {String} html Optional HTML string to set as inner HTML of the element.
@return {String} String with new HTML element, for example: <a href="#">test</a>.
@example
// Creates a html chunk and inserts it at the current selection/caret location
tinymce.activeEditor.selection.setContent(tinymce.activeEditor.dom.createHTML('a', {href: 'test.html'}, 'some line'));
Creates HTML string for element . The element will be closed unless an empty inner HTML string is passed in .