1
Skype-Fr
replace Fckeditor by CKeditor
  • 2014/5/6 21:19

  • Skype-Fr

  • Just popping in

  • Posts: 28

  • Since: 2006/4/27


Hi all,

I 'm needing to use CKeditor into this code (eguide mod) :
"admin.html"

<script type="text/javascript" src="<{$xoops_url}>/class/xoopseditor/fckeditor/fckeditor.js"></script>
<
script type="text/javascript">
function 
fckeditor_exec(targetwidthheighturl) {
    var 
area_width width;
    var 
area_height height;
    var 
xoops_url url;
    var 
oFCKeditor = new FCKeditortargetarea_widtharea_height, ("<{$use_fckeditor}>"=="Basic")?"Default":"Basic" );
    
oFCKeditor.BasePath xoops_url "/class/xoopseditor/fckeditor/";
    
oFCKeditor.Config["CustomConfigurationsPath"] = xoops_url "/class/xoopseditor/fckeditor/fckconfig.js" ;
    
oFCKeditor.ReplaceTextarea();
}
fckeditor_exec("summary""98%""450""<{$xoops_url}>");
</
script>


Could you help me ...

Gilles

2
Skype-Fr
Re: replace Fckeditor by CKeditor
  • 2014/5/10 21:11

  • Skype-Fr

  • Just popping in

  • Posts: 28

  • Since: 2006/4/27


All right !

It is very easy :

<script type="text/javascript" src="<{$xoops_url}>/class/xoopseditor/ckeditor/ckeditor.js"></script>

<
textarea id="summary" name="summary" wrap="virtual" cols="60" rows="40"><{$summary|escape}></textarea>

<
script type="text/javascript">
CKEDITOR.replace'summary' );
</
script>


Here, my config file [config.js]

CKEDITOR.editorConfig = function( config ) {
    
// Define changes to default configuration here. For example:
    
config.language 'fr';
    
config.uiColor '#888888';
    
config.height 550;
    
//config.width = 540;

    // Toolbar configuration generated automatically by the editor based on config.toolbarGroups.
    
config.toolbar = [
        { 
name'document'groups: [ 'mode''document''doctools' ], items: [ 'Source''-''Save''Preview''Print' ] },
        { 
name'clipboard'groups: [ 'clipboard''undo' ], items: [ 'Cut''Copy''Paste''PasteText''PasteFromWord''-''Undo''Redo' ] },
        
'/',
        { 
name'editing'groups: [ 'find''selection''spellchecker' ], items: ['SelectAll''-''Scayt' ] },
        { 
name'insert'items: [ 'Image''Flash''Table''HorizontalRule''Smiley' ] },
        { 
name'links'items: [ 'Link''Unlink''Anchor' ] },
        
'/',
        { 
name'basicstyles'groups: [ 'basicstyles''cleanup' ], items: [ 'Bold''Italic''Underline''Strike''-''RemoveFormat' ] },
        { 
name'paragraph'groups: [ 'list''indent''blocks''align''bidi' ], items: [ 'NumberedList''BulletedList''-''Outdent''Indent''-''CreateDiv''-''JustifyLeft''JustifyCenter''JustifyRight''JustifyBlock' ] },
        
'/',
        { 
name'styles'items: [ 'Styles''Format''Font''FontSize' ] },
        { 
name'colors'items: [ 'TextColor''BGColor' ] },
        { 
name'tools'items: [ 'Maximize''ShowBlocks' ] },
        { 
name'others'items: [ '-' ] },
    ];
    
    
// Toolbar groups configuration.
    
config.toolbarGroups = [
        { 
name'document'groups: [ 'mode''document''doctools' ] },
        { 
name'clipboard'groups: [ 'clipboard''undo' ] },
        { 
name'editing'groups: [ 'find''selection''spellchecker' ] },
        { 
name'forms' },
        
'/',
        { 
name'basicstyles'groups: [ 'basicstyles''cleanup' ] },
        { 
name'paragraph'groups: [ 'list''indent''blocks''align''bidi' ] },
        { 
name'links' },
        { 
name'insert' },
        
'/',
        { 
name'styles' },
        { 
name'colors' },
        { 
name'tools' },
        { 
name'others' },
        { 
name'about' }
    ];
};


Regards
Gilles

3
Skype-Fr
Re: replace Fckeditor by CKeditor
  • 2014/5/13 11:15

  • Skype-Fr

  • Just popping in

  • Posts: 28

  • Since: 2006/4/27


my previous config.js is not compatible with IE8.

Good config is :

CKEDITOR.editorConfig = function( config ) {
    
config.language 'fr'// your country
    
config.uiColor '#888888';
    
//config.extraPlugins = 'autogrow';
    
config.height 550;
    
//config.width = 540;
    
config.skin 'kama';
    
//config.skin = 'office2013';

config.toolbar = [
    [ 
'mode''document''doctools' ],  [ 'Source''-''Save''Preview''Print' ],
    [ 
'clipboard''undo' ],['Undo''Redo' ],[ 'Cut''Copy''Paste''PasteText''PasteFromWord'],
    
'/',
    [ 
'find''selection''spellchecker' ],['SelectAll''-''Scayt' ],
    [ 
'Image''Flash''Table''HorizontalRule''Smiley' ],
    [ 
'Link''Unlink''Anchor' ],
    
'/',
    [ 
'basicstyles''cleanup' ],[ 'Bold''Italic''Underline''Strike''-''RemoveFormat' ],
    [ 
'list''indent''blocks''align''bidi' ],[ 'NumberedList''BulletedList''-''Outdent''Indent''-''CreateDiv''-''JustifyLeft''JustifyCenter''JustifyRight''JustifyBlock' ],
    
'/',
    [ 
'Styles''Format''Font''FontSize' ],
    [ 
'TextColor''BGColor' ],
    [ 
'Maximize''ShowBlocks' 
];

};

4
Cesagonchu
Re: replace Fckeditor by CKeditor

Thank you for sharing!

Login

Who's Online

198 user(s) are online (117 user(s) are browsing Support Forums)


Members: 0


Guests: 198


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits