Author Topic: Customizing Ckeditor  (Read 5720 times)

bala

  • Newbie
  • *
  • Posts: 5
    • View Profile
Customizing Ckeditor
« on: August 25, 2011, 12:10:12 pm »
HI All,

I am working on fengoffice latest version.

1. What is the current version of Ckedior was used in Fengoffice
2. How i can customize the ckeditor toolbars - I was trying to add the "styles" drop down - but it was not success.

I was unable to find few plugins of ckeditor "stylescomobo" "XML" etc in the plugin folder - how do i add and customize ckeditor in fengoffice.

fengoffice\public\assets\javascript\ckeditor\plugins


Any help would be greatful.

Thanks,
Bala.

bala

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Customizing Ckeditor
« Reply #1 on: August 26, 2011, 10:16:05 am »
HI All,

Any help would be greatly appreciated.

Thanks,
Bala


bala

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Customizing Ckeditor
« Reply #2 on: August 27, 2011, 03:03:23 am »
HI All,

Any help would be greatly appreciated.
Thanks,
Bala

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Customizing Ckeditor
« Reply #3 on: September 05, 2011, 03:02:42 pm »
Welcome to Feng Office Forums!
This is a question which has been asked several times before, but only been  properly answered in the French section so I will let you - and everyone else - know about it here.
You would need to tweak the code in the following files:
application/views/mail/add_mail.php (about ln 331)
application/views/files/add_document.php (about ln 57)

Regarding the names of the actual buttons, you would have to look for those as I do not know them by heart, but their names usually can be guessed by intuition.

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

Reza Faghihi

  • Freshman
  • *
  • Posts: 48
    • View Profile
    • Email
Re: Customizing Ckeditor
« Reply #4 on: September 11, 2011, 03:35:00 pm »
hi as Fransisco said
you can edit those 2 files in views you here is example of changes that we have done
    /* change color reza ?*
    // TODO make this configurable
     */
   uiColor: '',
   height: (h-60) + 'px',
   enterMode: CKEDITOR.ENTER_P,
   shiftEnterMode: CKEDITOR.ENTER_BR,
   disableNativeSpellChecker: false,
   language: 'fa',
    contentsLangDirection:'rtl',
   customConfig: '',
   
   toolbar: [
            ['Source','-','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt','-',
            'Undo','Redo','-','Find','Replace','-','SelectAll', '-',
            'Format','Font','FontSize'],
            '/',
         
            [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ,'-','Maximize', 'ShowBlocks','-','CreateDiv'],
            '/',
            ['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-',
            'NumberedList','BulletedList','-','Outdent','Indent','Blockquote','-',
            'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl','-',
            'Link','Unlink','-','Maximize','-',
            'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','-',
            'TextColor','BGColor','RemoveFormat','Indent1', 'Indent2', 'Indent3']
         ],

   skin: 'kama',
   keystrokes: [
      [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],
      [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ],

      [ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ],

      [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ],
      [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ],
      [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ],

      [ CKEDITOR.CTRL + 76 /*L*/, 'link' ],

      [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ],
      [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ],
      [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ],

      [ CKEDITOR.CTRL + 83 /*S*/, 'save' ],

      [ CKEDITOR.ALT + 109 /*-*/, 'toolbarCollapse' ]
   ],
   filebrowserImageUploadUrl : '<?php echo ROOT_URL ?>/public/assets/javascript/ckeditor/ck_upload_handler.php',
   on: {
      instanceReady: function(ev) {
         og.adjustCkEditorArea('<?php echo $genid ?>');
         editor.resetDirty();
      },
      selectionChange: function(ev) {
         var p = og.getParentContentPanel(Ext.get('<?php echo $genid ?>ckeditor'));
         Ext.getCmp(p.id).setPreventClose(editor.checkDirty());
      }
   },
   entities_additional : '#39,#336,#337,#368,#369'
});

you can change skin and localization for more info u can see
h**p://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbar