LocaleConfig
interface
The locale configuration.
ClassicEditor
.create( {
locale: {
// The localization configuration.
}
} )
.then( ... )
.catch( ... );
Properties
-
dateTimeFormat : ( date: Date, t: LocaleTranslate ) => string | undefined
module:collaboration-core/config~LocaleConfig#dateTimeFormat
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 { DateTime } from 'luxon'; ClassicEditor .create( document.querySelector( '#editor' ), { toolbar: { items: [ 'bold', 'italic', '|', 'comment' ] }, sidebar: { container: document.querySelector( '#sidebar' ) }, locale: { dateTimeFormat: date => DateTime.fromJSDate( date ).toFormat( 'dd/LL/yyyy' ) } } ) .catch( error => console.error( error ) );