CaseChangeTitleCaseConfig
interface
Title case configuration. It allows setting words that should not be capitalized when formatted as title case.
ClassicEditor
.create( editorElement, {
caseChange: {
titleCase {
excludeWords: [ 'a', 'an', 'the' ]
}
}
} )
.then( /* ... */ )
.catch( /* ... */ );
ClassicEditor
.create( editorElement, {
caseChange: {
titleCase {
excludeWords: ( word ) => [ 'a', 'an', 'the' ].includes( word )
}
}
} )
.then( /* ... */ )
.catch( /* ... */ );
ClassicEditor
.create( editorElement, {
caseChange: {
titleCase {
excludeWords: ( word, { wordIndex } ) => wordIndex > 0 && [ 'a', 'an', 'the' ].includes( word )
}
}
} )
.then( /* ... */ )
.catch( /* ... */ );
See all editor options.
Properties
-
excludeWords : Array<string> | CaseChangeExcludeWordsCallback | undefined
module:case-change/casechange~CaseChangeTitleCaseConfig#excludeWords
Words which should not be capitalized.