nl_tokens: 页面滚动时工具栏的固定定位 Set toolbar in window scroll auto fixed position
pl_tokens: function ( fixed ) { var state = this . state ; var editor = this . editor ; var toolbar = this . toolbar ; var settings = this . settings ; if ( typeof fixed !== "undefined" ) { settings . toolbarAutoFixed = fixed ; } var autoFixedHandle = function ( ) { var $window = $ ( window ) ; var top = $window . scrollTop ( ) ; if ( ! settings . toolbarAutoFixed ) { return false ; } if ( top - editor . offset ( ) . <mask> > 10 && top < editor . height ( ) ) { toolbar . css ( { position : "fixed" , width : editor . width ( ) + "px" , left : ( $window . width ( ) - editor . width ( ) ) / 2 + "px" } ) ; } else { toolbar . css ( { position : "absolute" , width : "100%" , left : 0 } ) ; } } ; if ( ! state . fullscreen && ! state . preview && settings . toolbar && settings . toolbarAutoFixed ) { $ ( window ) . bind ( "scroll" , autoFixedHandle ) ; } return this ; }