nl_tokens: restoreCurrentSelection -----------------------------------------------------------------
pl_tokens: function ( txt ) { var me = this ; var wwg_mode = false ; var ed = tinymce . get ( <mask> . getInputId ( ) ) ; if ( me . wysiwygIntialized ) { if ( ed && ! ed . isHidden ( ) ) { wwg_mode = true ; } } var ctrl = document . getElementById ( me . getInputId ( ) ) ; if ( wwg_mode ) { ed . focus ( ) ; ed . execCommand ( 'mceInsertContent' , 0 , txt ) ; } else if ( ctrl ) { ctrl . focus ( ) ; var start = ctrl . selectionStart + txt . length ; ctrl . value = ctrl . value . slice ( 0 , ctrl . selectionStart ) + txt + ctrl . value . slice ( ctrl . selectionEnd ) ; ctrl . setSelectionRange ( start , start ) ; } }