在 config.js 中添加如下代码
CKEDITOR.on( 'dialogDefinition', function( ev ){ // Take the dialog name and its definition from the event data. var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; // Check if the definition is from the dialog window you are interested in (the "Link" dialog window). if ( dialogName == 'link' ) { // Get a reference to the "Link Info" tab. var infoTab = dialogDefinition.getContents( 'info' ); // Set the default value for the URL field. // var urlField = infoTab.get( 'url' ); // urlField['default'] = 'www.example.xxxcom'; var protocolField = infoTab.get( 'protocol' ); protocolField['default'] = ""; }});
参考: