[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/public_html/javascript/ -> staticpages_fckeditor.js (source)

   1  // +---------------------------------------------------------------------------+
   2  // | Copyright (C) 2003,2004 by the following authors:                         |
   3  // | Version 1.0    Date: Jun 4, 2005                                          |
   4  // | Authors:   Blaine Lang - blaine@portalparts.com                           |
   5  // |                                                                           |
   6  // | Javascript functions for FCKEditor Integration into Geeklog               |
   7  // |                                                                           |
   8  // +---------------------------------------------------------------------------+
   9  
  10  
  11      window.onload = function() {
  12          var oFCKeditor1 = new FCKeditor( 'sp_content' ) ;
  13          oFCKeditor1.BasePath = geeklogEditorBasePath;
  14          oFCKeditor1.Config['CustomConfigurationsPath'] = geeklogEditorBaseUrl + '/fckeditor/myconfig.js';
  15          oFCKeditor1.ToolbarSet = 'editor-toolbar2' ;
  16          oFCKeditor1.Height = 200 ;
  17          oFCKeditor1.AutoGrowMax = 1200        
  18          oFCKeditor1.ReplaceTextarea() ;
  19      }
  20  
  21     function changeToolbar(toolbar) {
  22          var oEditor1 = FCKeditorAPI.GetInstance('sp_content');       
  23          oEditor1.ToolbarSet.Load( toolbar ) ;
  24     }
  25     
  26      function change_editmode(obj) {
  27          if (obj.value == 'adveditor') {
  28              document.getElementById('advanced_editarea').style.display='';
  29              document.getElementById('sel_toolbar').style.display='';             
  30              document.getElementById('html_editarea').style.display='none';
  31              swapEditorContent('advanced');
  32          } else {
  33              document.getElementById('advanced_editarea').style.display='none';
  34              document.getElementById('sel_toolbar').style.display='none';             
  35              document.getElementById('html_editarea').style.display='';
  36              swapEditorContent('html');
  37          }
  38      } 
  39  
  40      function swapEditorContent(curmode) {
  41          var content = '';
  42          var oEditor = FCKeditorAPI.GetInstance('sp_content');
  43          if (curmode == 'advanced') {
  44              content = document.getElementById('html_content').value;
  45              oEditor.SetHTML(content);
  46          } else {
  47              content = oEditor.GetXHTML( true );
  48              document.getElementById('html_content').value = content;         
  49         }
  50      }
  51      
  52      function set_postcontent() { 
  53          if (document.getElementById('sel_editmode').value == 'adveditor') {
  54              var oEditor = FCKeditorAPI.GetInstance('sp_content');        
  55              content = oEditor.GetXHTML( true );        
  56              document.getElementById('html_content').value = content;
  57          }
  58      }          


Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics