Skip to content

Instantly share code, notes, and snippets.

@aaronrussell
Created January 12, 2010 17:57
Show Gist options
  • Save aaronrussell/275410 to your computer and use it in GitHub Desktop.
Save aaronrussell/275410 to your computer and use it in GitHub Desktop.
/*
Copyright (c) 2003-2009, 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';
config.toolbar = 'MyToolbarSet';
config.toolbar_MyToolbarSet = [
['Cut','Copy','Paste','PasteFromWord'],
['Bold','Italic','Blockquote','RemoveFormat'],
['JustifyLeft','JustifyCenter','JustifyRight'],
['NumberedList','BulletedList','Outdent','Indent'],
['Link','Unlink'],
['uploader'],
'/',
['Format'],
['Source']
]
config.width = 600;
config.resize_minWidth = 600;
config.resize_maxWidth = 600;
config.docType = '<!DOCTYPE html>';
config.extraPlugins = "uploader";
};
CKEDITOR.on('instanceReady', function(ev)
{
var tags = ['p', 'ol', 'ul', 'li']; // etc.
for (var key in tags){
ev.editor.dataProcessor.writer.setRules(tags[key], {
indent : true,
breakBeforeOpen : true,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : true
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment