Interface

LocaleConfig (collaboration-core)

@ckeditor/ckeditor5-collaboration-core/src/config

interface

The locale configuration.

ClassicEditor
	.create( {
		locale: {
			// The localization configuration.
		}
	} )
	.then( ... )
	.catch( ... );

See all editor configuration options.

Filtering

Properties

  • dateTimeFormat : ( Date ) => string | undefined

    A function that formats date to the custom format. It is used in dates in annotations (balloons) displaying comments and suggestions details.

    The default formatting can be changed by setting a custom formatting function to config.locale.dateTimeFormat.

    import format from 'date-fns/format';
    
    ClassicEditor
    	.create( document.querySelector( '#editor' ), {
    		toolbar: {
    			items: [ 'bold', 'italic', '|', 'comment' ]
    		},
    		sidebar: {
    			container: document.querySelector( '#sidebar' )
    		},
    		locale: {
    			dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
    		}
    	} )
    	.catch( error => console.error( error ) );