Link to home
Start Free TrialLog in
Avatar of sabecs
sabecs

asked on

Need to add a color button to CKEditor in order to alter a table cells background color?

Hi,
I am trying to work out how to add a color button to CKEditor in order to alter a table cells background color?

Any ideas on how to do this?

http://sdk.ckeditor.com/samples/table.html
http://ckeditor.com/addon/tabletools

My setup is as below but no button appears?

<script>
CKEDITOR.replace( 'content' );
CKEDITOR.config.width ='<?php echo $ck_width; ?>';
CKEDITOR.config.height='500px';
CKEDITOR.config.skin = 'moonocolor';
CKEDITOR.config.extraPlugins = 'colordialog';
CKEDITOR.config.allowedContent = true;
CKEDITOR.config.filebrowserBrowseUrl = "/admin/ckeditor/plugins/kfm/";

CKEDITOR.config.toolbar = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source','-','Save','Maximize','ShowBlocks' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Table', 'BGColor', 'HorizontalRule', 'SpecialChar' ] },
{ name: 'imamges', items: [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'] },
{ name: 'others', items: [ '-' ] },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ '-', 'RemoveFormat','BidiLtr','BidiRtl','TextColor','BGColor' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ], items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] },
{ name: 'styles', items: [ 'Styles','Format','Font','FontSize','Bold','Italic','Underline','Strike','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },
{ name: 'about', items: [ 'About' ] }
];
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Peter Hart
Peter Hart
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial