Changeset 5331


Ignore:
Timestamp:
01/09/12 16:27:47 (12 years ago)
Author:
niltonneto
Message:

Ticket #663 - Alterado editor WYSIWYG para utilizar CKEditor da lib da API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/smarty/wf_plugins/function.wf_fckeditor.php

    r795 r5331  
    5858 
    5959        // BasePath must be specified once. 
    60     $base_arguments['BasePath'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'workflow' . SEP . 'js' . SEP . 'fckeditor' . SEP; 
     60    $base_arguments['BasePath'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'library' . SEP . 'ckeditor' . SEP; 
    6161 
    6262        $base_arguments['InstanceName'] = $params['InstanceName']; 
     
    7777        if($init) 
    7878        { 
    79                 $out .= '<script type="text/javascript" src="' . $base_arguments['BasePath'] . 'fckeditor.js"></script>'; 
     79                $out .= '<script type="text/javascript" src="' . $base_arguments['BasePath'] . 'ckeditor.js"></script>'; 
    8080        } 
     81        $out .= '<textarea cols="80" id="'.$base_arguments['InstanceName'].'" name="'.$base_arguments['InstanceName'].'" rows="10">'.$base_arguments['Value'].'</textarea>'; 
    8182 
    82         $out .= "\n<script type=\"text/javascript\">\n"; 
    83         $out .= "var oFCKeditor = new FCKeditor('" . $base_arguments['InstanceName'] . "');\n"; 
     83        $out .= '<script type="text/javascript">'. 
     84                                'CKEDITOR.replace( \''.$base_arguments['InstanceName'].'\',{'. 
     85                                        'removePlugins : \'elementspath\','. 
     86                                        'skin : \'office2003\','. 
     87                                        'toolbar : \'Full\''. 
     88                                        '}'. 
     89                                ');'; 
    8490 
    8591        foreach($base_arguments as $key => $value) 
     
    9096                        $value = '"' . preg_replace("/[\r\n]+/", '" + $0"', addslashes($value)) . '"'; 
    9197                } 
    92                 $out .= "oFCKeditor.$key = $value; "; 
     98                $out .= "CKEDITOR.$key = $value; "; 
    9399        } 
    94100 
     
    99105                        $value = '"' . preg_replace("/[\r\n]+/", '" + $0"', addslashes($value)) . '"'; 
    100106                } 
    101                 $out .= "oFCKeditor.Config[\"$key\"] = $value; "; 
     107                $out .= "CKEDITOR.config[\"$key\"] = $value; "; 
    102108        } 
    103109 
    104         $out .= "\noFCKeditor.Create();\n"; 
    105110        $out .= "</script>\n"; 
    106111 
Note: See TracChangeset for help on using the changeset viewer.