[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/libraries/ckeditor/_source/plugins/pastetext/dialogs/ -> pastetext.js (source)

   1  /*

   2  Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.

   3  For licensing, see LICENSE.html or http://ckeditor.com/license

   4  */
   5  
   6  (function()
   7  {
   8      CKEDITOR.dialog.add( 'pastetext', function( editor )
   9          {
  10              return {
  11                  title : editor.lang.pasteText.title,
  12  
  13                  minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,
  14                  minHeight : 240,
  15  
  16                  onShow : function()
  17                  {
  18                      // Reset the textarea value.

  19                      this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' );
  20                  },
  21  
  22                  onOk : function()
  23                  {
  24                      // Get the textarea value.

  25                      var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),
  26                          editor = this.getParentEditor();
  27  
  28                      setTimeout( function()
  29                      {
  30                          editor.fire( 'paste', { 'text' : text } );
  31                      }, 0 );
  32                  },
  33  
  34                  contents :
  35                  [
  36                      {
  37                          label : editor.lang.common.generalTab,
  38                          id : 'general',
  39                          elements :
  40                          [
  41                              {
  42                                  type : 'html',
  43                                  id : 'pasteMsg',
  44                                  html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>'
  45                              },
  46                              {
  47                                  type : 'textarea',
  48                                  id : 'content',
  49                                  className : 'cke_pastetext',
  50  
  51                                  onLoad : function()
  52                                  {
  53                                      var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(),
  54                                          input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 );
  55  
  56                                      input.setAttribute( 'aria-labelledby', label.$.id );
  57                                      input.setStyle( 'direction', editor.config.contentsLangDirection );
  58                                  },
  59  
  60                                  focus : function()
  61                                  {
  62                                      this.getElement().focus();
  63                                  }
  64                              }
  65                          ]
  66                      }
  67                  ]
  68              };
  69          });
  70  })();


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7