code: function () {
              var me = this;
              function optimze( range ) {
                  var child = me.document.body.firstChild,
                      collapsed = range.collapsed;
                  while ( child && child.firstChild ) {
                      range.setStart( child, 0 );
                      child = child.firstChild;
                  }
                  if ( !range.startContainer ) {
                      range.setStart( me.document.body, 0 )
                  }
                  if ( collapsed ) {
                      range.collapse( true );
                  }
              }
  
              if ( me._cachedRange != null ) {
                  return this._cachedRange;
              }
              var range = new baidu.editor.dom.Range( me.document );
  
              if ( browser.ie9below ) {
                  var nativeRange = me.getIERange();
                  if ( nativeRange ) {
                      //备份的_bakIERange可能已经实效了，dom树发生了变化比如从源码模式切回来，所以try一下，实效就放到body开始位置
                      try{
                          transformIERangeToRange( nativeRange, range );
                      }catch(e){
                          optimze( range );
                      }
  
                  } else {
                      optimze( range );
                  }
              } else {
                  var sel = me.getNative();
                  if ( sel && sel.rangeCount ) {
                      var firstRange = sel.getRangeAt( 0 );
                      var lastRange = sel.getRangeAt( sel.rangeCount - 1 );
                      range.setStart( firstRange.startContainer, firstRange.startOffset ).setEnd( lastRange.endContainer, lastRange.endOffset );
                      if ( range.collapsed && domUtils.isBody( range.startContainer ) && !range.startOffset ) {
                          optimze( range );
                      }
                  } else {
                      //trace:1734 有可能已经不在dom树上了，标识的节点
                      if ( this._bakRange && domUtils.inDoc( this._bakRange.startContainer, this.document ) ){
                          return this._bakRange;
                      }
                      optimze( range );
                  }
              }
              return this._bakRange = range;
          }
docs: 获取选区对应的Range
  @method getRange
  @return { Object } 得到Range对象
  @example
  ```javascript
  editor.selection.getRange();
  ```