example/public/ueditor/third-party/SyntaxHighlighter/shCore.js
function(code)
        {
            if (code === null)
                code = '';

            this.code = code;

            var div = this.create('div');

            // create main HTML
            div.innerHTML = this.getHtml(code);

            // set up click handlers
            if (this.getParam('toolbar'))
                attachEvent(findElement(div, '.toolbar'), 'click', sh.toolbar.handler);

            if (this.getParam('quick-code'))
                attachEvent(findElement(div, '.code'), 'dblclick', quickCodeHandler);

            return div;
        }
function(code)
        {
            if (code === null)
                code = '';

            this.code = code;

            var div = this.create('div');

            // create main HTML
            div.innerHTML = this.getHtml(code);

            // set up click handlers
            if (this.getParam('toolbar'))
                attachEvent(findElement(div, '.toolbar'), 'click', sh.toolbar.handler);

            if (this.getParam('quick-code'))
                attachEvent(findElement(div, '.code'), 'dblclick', quickCodeHandler);

            return div;
        }
function ( code ) { if ( code === null ) code = '' ; this . code = code ; var div = this . create ( 'div' ) ; // create main HTML div . innerHTML = this . getHtml ( code ) ; // set up click handlers if ( this . getParam ( 'toolbar' ) ) attachEvent ( findElement ( div , '.toolbar' ) , 'click' , sh . toolbar . handler ) ; if ( this . getParam ( 'quick-code' ) ) attachEvent ( findElement ( div , '.code' ) , 'dblclick' , quickCodeHandler ) ; return div ; }
Highlights the code and returns complete HTML.
@param {String} code     Code to highlight.
@return {Element}        Returns container DIV element with all markup.
Highlights the code and returns complete HTML .