[ Index ]
 

Code source de FCKeditor 2.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/editor/_source/classes/ -> fckdocumentfragment_ie.js (source)

   1  /*
   2   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
   3   * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   4   * 
   5   * == BEGIN LICENSE ==
   6   * 
   7   * Licensed under the terms of any of the following licenses at your
   8   * choice:
   9   * 
  10   *  - GNU General Public License Version 2 or later (the "GPL")
  11   *    http://www.gnu.org/licenses/gpl.html
  12   * 
  13   *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  14   *    http://www.gnu.org/licenses/lgpl.html
  15   * 
  16   *  - Mozilla Public License Version 1.1 or later (the "MPL")
  17   *    http://www.mozilla.org/MPL/MPL-1.1.html
  18   * 
  19   * == END LICENSE ==
  20   * 
  21   * File Name: fckdocumentfragment_ie.js
  22   *     This is a generic Document Fragment object. It is not intended to provide 
  23   *     the W3C implementation, but is a way to fix the missing of a real Document
  24   *     Fragment in IE (where document.createDocumentFragment() returns a normal
  25   *     document instead), giving a standard interface for it.
  26   *     (IE Implementation)
  27   * 
  28   * File Authors:
  29   *         Frederico Caldeira Knabben (www.fckeditor.net)
  30   */
  31  
  32  var FCKDocumentFragment = function( parentDocument )
  33  {
  34      this._Document = parentDocument ;
  35      this.RootNode = parentDocument.createElement( 'div' ) ;
  36  }
  37  
  38  // Append the contents of this Document Fragment to another node.
  39  FCKDocumentFragment.prototype = 
  40  {
  41  
  42      AppendTo : function( targetNode )
  43      {
  44          FCKDomTools.MoveChildren( this.RootNode, targetNode ) ;
  45      },
  46  
  47      AppendHtml : function( html )
  48      {
  49          var eTmpDiv = this._Document.createElement( 'div' ) ;
  50          eTmpDiv.innerHTML = html ;
  51          FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ;
  52      },
  53  
  54      InsertAfterNode : function( existingNode )
  55      {
  56          var eRoot = this.RootNode ;
  57          var eLast ;
  58          
  59          while( ( eLast = eRoot.lastChild ) )
  60              FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ;
  61      }
  62  } ;


Généré le : Sun Feb 25 15:28:05 2007 par Balluche grâce à PHPXref 0.7