Changeset 5725 in spip-zone
- Timestamp:
- Sep 27, 2006, 10:10:37 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/_dev_/fckeditor/fckeditor2_pipelines.php
r4902 r5725 1 1 <?php 2 3 // ICI : Commenter l'une des deux lignes pour fixer l'éditeur par défaut 4 //define('EDITEUR_PAR_DEFAUT', 'wysiwyg'); 5 define('EDITEUR_PAR_DEFAUT', 'text'); 2 6 3 7 $p=explode(basename(_DIR_PLUGINS)."/",str_replace('\\',/*'*/'/',realpath(dirname(__FILE__)))); … … 6 10 function fckeditor2_header_prive($flux) { 7 11 global $exec; 8 if($exec=='articles') { 9 $code=' 10 <script src="http://www.jquery.info/scripts/jquery-1.0.js" type="text/javascript"></script> 11 <script type="text/javascript"><!-- 12 $(document).ready(function () { 12 13 $code=''; 14 15 if($exec=='articles' || $exec=='breves_voir') { 16 17 if(EDITEUR_PAR_DEFAUT=='text') { 18 $code=' 13 19 $("img[@src=\'img_pack/edit.gif\']").parent().each(function(i){ 14 20 $(this).before(this.cloneNode(true)); 15 21 $(this).attr("href", $(this).attr("href")+"&wysiwyg=oui"); 16 22 $(this).find("span").html(\''.addslashes(_T('fckeditor:icone_modifier_article_fck')).'\'); 17 }); 18 }); 19 // --></script> 20 '; 21 return $flux.$code; 22 } 23 });'; 24 } else { 25 $code=' 26 $("img[@src=\'img_pack/edit.gif\']").parent().each(function(i){ 27 $(this).before(this.cloneNode(true)); 28 $(this).attr("href", $(this).attr("href")+"&wysiwyg=non"); 29 $(this).find("span").html(\''.addslashes(_T('fckeditor:icone_modifier_article_spip')).'\'); 30 });'; 31 } 23 32 24 if($exec=='articles_edit' && $GLOBALS['wysiwyg']=='oui') { 33 } elseif($exec=='articles_edit' && ( $GLOBALS['wysiwyg']=='oui' 34 || (EDITEUR_PAR_DEFAUT=='wysiwyg' && $GLOBALS['wysiwyg']!='non') ) ) { 35 25 36 $code=' 26 <script type="text/javascript" src="'._DIR_PLUGIN_FCKEDITOR.'/FCKeditor/fckeditor.js"></script>27 <script type="text/javascript"><!--28 $(document).ready(function () {29 30 37 var oFCKeditor = new FCKeditor( \'text_area\' ) ; 31 38 oFCKeditor.BasePath = "'._DIR_PLUGIN_FCKEDITOR.'/FCKeditor/" ; … … 34 41 35 42 $(".spip_barre").remove(); 43 '; 44 45 } elseif($exec=='breves_edit' && ( $GLOBALS['wysiwyg']=='oui' 46 || (EDITEUR_PAR_DEFAUT=='wysiwyg' && $GLOBALS['wysiwyg']!='non') ) ) { 47 48 $code=' 49 var oFCKeditor = new FCKeditor( \'texte\' ) ; 50 oFCKeditor.BasePath = "'._DIR_PLUGIN_FCKEDITOR.'/FCKeditor/" ; 51 oFCKeditor.Height = "400"; 52 oFCKeditor.ReplaceTextarea(); 53 54 $(".spip_barre").remove(); 55 '; 56 } 57 58 if(!empty($code)) { 59 $code=' 60 <script src="http://www.jquery.info/scripts/jquery-1.0.js" type="text/javascript"></script> 61 <script type="text/javascript" src="'._DIR_PLUGIN_FCKEDITOR.'/FCKeditor/fckeditor.js"></script> 62 <script type="text/javascript"><!-- 63 $(document).ready(function () { 64 '.$code.' 36 65 }); 37 66 //--> 38 67 39 </script> 40 '; 68 </script>'; 41 69 return $flux.$code; 42 70 }
Note: See TracChangeset
for help on using the changeset viewer.