I am looking to customize the functionality of the ENTER key in ng2-ckeditor. I have read about a config option that can help with this on this site.
It seems that custom CSS is recommended for making these changes:
To adjust paragraph spacing, it is suggested to utilize stylesheets instead. By editing the contents.css file and defining an appropriate margin value for
<p>
elements, such as:
p { margin: 0; }
Based on information from this question on Stack Overflow, it is possible to load a custom CSS file by using a config option, like so:
config.contentsCss = 'mystyles.css'
I attempted to include a single file in my project and set up the configuration in an Angular 2 component, but unfortunately, the file does not seem to be loading.
private setConfig(): void {
this.ckConfig = {
height: '250',
extraPlugins: 'divarea',
contentsCss: '/theme/styles/ckeditor.css',
toolbar: [... toolbar configurations ...]
};
}
So, how do I ensure that ng2-ckeditor loads this file correctly?