How Do I Set a Specific Dialog Window Tab to Open by Default?

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

If you want to change your CKEditor configuration to show a different tab on opening a dialog window, you can hook into the onShow event of the dialog window.

Firstly, you will need to know the names of the dialog window and the tab that you want to set as default, so use the Developer Tools plugin to get these.

Once you have the names you can add the following code either in the <script> element inserted into the page that contains your CKEditor instance or into the config.js file. The example below sets the Image Properties dialog window to open the Advanced tab by default.

CKEDITOR.on('dialogDefinition', function(ev) {
	// Take the dialog window name and its definition from the event data.
	var dialogName = ev.data.name;
	var dialogDefinition = ev.data.definition;

	if (dialogName == 'image') {
		dialogDefinition.onShow = function () {
			// This code will open the Advanced tab.
			this.selectPage('advanced');
		};
	}
});

If, for example, you want to open the Upload tab first to make it more convenient for your users to use the (existing and previously integrated) file uploader, change the code in the following way:

// This code will open the Upload tab.
this.selectPage('Upload');
This page was last edited on 6 July 2011, at 14:29.