How do I programmatically set default table properties for CKEditor?

Here you go. dialogDefinition event solves the problem: CKEDITOR.on( ‘dialogDefinition’, function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == ‘table’ ) { var info = dialogDefinition.getContents( ‘info’ ); info.get( ‘txtWidth’ )[ ‘default’ ] = ‘100%’; // Set default width to 100% info.get( ‘txtBorder’ )[ ‘default’ ] = ‘0’; … Read more

How do I customize a ckeditor 4.2 builtin plugin like links?

You got to observe dialogDefinition event to do this: CKEDITOR.on( ‘dialogDefinition’, function( evt ) { var dialog = evt.data; if ( dialog.name == ‘link’ ) { // Get dialog definition. var def = evt.data.definition; // Add some stuff to definition. def.addContents( { id: ‘custom’, label: ‘My custom tab’, elements: [ { id: ‘myField1’, type: ‘text’, … Read more

How to configure ckeditor to not wrap content in block?

Add the following to your config.js file for CKEditor: config.enterMode = CKEDITOR.ENTER_BR; Example: … CKEDITOR.editorConfig = function (config) { config.enterMode = CKEDITOR.ENTER_BR; … }; Details The configuration setting that controls this behavior is based on what you want to happen when the user presses Enter. Just in case someone who’s new to working with HTML … Read more

How can you integrate a custom file browser/uploader with CKEditor?

Start by registering your custom browser/uploader when you instantiate CKEditor. You can designate different URLs for an image browser vs. a general file browser. <script type=”text/javascript”> CKEDITOR.replace(‘content’, { filebrowserBrowseUrl : ‘/browser/browse/type/all’, filebrowserUploadUrl : ‘/browser/upload/type/all’, filebrowserImageBrowseUrl : ‘/browser/browse/type/image’, filebrowserImageUploadUrl : ‘/browser/upload/type/image’, filebrowserWindowWidth : 800, filebrowserWindowHeight : 500 }); </script> Your custom code will receive a GET … Read more