Ticket #4934: 4934.patch

File 4934.patch, 898 bytes (added by Frederico Caldeira Knabben, 14 years ago)
  • _source/plugins/preview/plugin.js

     
    2929                        else
    3030                        {
    3131                                var bodyHtml = '<body ',
    32                                                 body = editor.document.getBody();
     32                                                body = editor.document && editor.document.getBody();
    3333
    34                                 if ( body.getAttribute( 'id' ) )
    35                                         bodyHtml += 'id="' + body.getAttribute( 'id' ) + '" ';
    36                                 if ( body.getAttribute( 'class' ) )
    37                                         bodyHtml += 'class="' + body.getAttribute( 'class' ) + '" ';
     34                                if ( body )
     35                                {
     36                                        if ( body.getAttribute( 'id' ) )
     37                                                bodyHtml += 'id="' + body.getAttribute( 'id' ) + '" ';
     38                                        if ( body.getAttribute( 'class' ) )
     39                                                bodyHtml += 'class="' + body.getAttribute( 'class' ) + '" ';
     40                                }
     41
    3842                                bodyHtml += '>';
    3943
    4044                                sHTML =
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy