howto: enable plugins in ckeditor

although this will work for any plugin, this howto is geared towards enabling the tables plugin for ckeditor in Xibo. this will allow you to create tables in the text editor.

open a terminal and navigate to /path/to/webserver/xibo/3rdparty/ckeditor

cd /path/to/webserver/xibo/3rdparty/ckeditor

use nano or your favorite text editor to open config.js

sudo nano config.js

the config file should default to the following in xibo:

/*
Copyright (c) 2003-2010, CKSource – Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = ‘fr’;
// config.uiColor = ‘#AADC6E’;
CKEDITOR.config.toolbar_Full =
[
['Source','-','Cut','Copy','Paste','PasteText','PasteFromWord'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
‘/’,
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
‘/’,
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];

config.removePlugins = ‘scayt’;
};

now simply add a spacer in one of the lines using this ‘-’, and the table tag at the end ‘Table’. now your file should look similar to this:

/*
Copyright (c) 2003-2010, CKSource – Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = ‘fr’;
// config.uiColor = ‘#AADC6E’;
CKEDITOR.config.toolbar_Full =
[
['Source','-','Cut','Copy','Paste','PasteText','PasteFromWord'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat','-','Table'],
‘/’,
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
‘/’,
['Styles','Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks','-','About']
];

config.removePlugins = ‘scayt’;
};

write the file by pressing ctrl + o and then exit nano by pressing ctrl + x. reload your xibo page and add text to a layout; you should now see a table button.

Related posts:

  1. howto: change upload limit in php
Tagged: , ,

Discussion

No comments yet, be the first.

Add a Comment

*

*