Created
August 4, 2014 20:26
-
-
Save BrendonKoz/df1e0fefedd237120872 to your computer and use it in GitHub Desktop.
Simple CKEditor custom load (with jQuery)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('textarea').ckeditor({ | |
contentsCss: '/css/ckeditor_custom.css', //external CSS to set body{margin:0;} | |
uiColor: '#FFFFFF', | |
scayt_autoStartup: true, //spellcheck auto-enabled | |
autoGrow_onStartup: true, | |
enterMode: CKEDITOR.ENTER_BR, //I hate this but our users request it | |
removePlugins: 'elementspath, resize', | |
extraPlugins: 'autogrow,confighelper', //confighelper allows HTML5-like placeholder text | |
extraAllowedContent: 'img[alt,dir,id,lang,longdesc,!src,title]{*}(*)', //needed to allow image pasting without an image button | |
toolbar: [ //no groups, I want to specify which buttons show | |
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline' ] }, | |
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'PasteFromWord', 'Undo', 'Redo' ] }, | |
{ name: 'links', items: [ 'Link', 'Unlink' ] }, | |
{ name: 'editing', groups: [ 'spellchecker' ], items: [ 'Scayt' ] }, | |
{ name: 'tools', items: [ 'Maximize' ] } | |
] | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment