yabab-dev / ng2-ckeditor

Angular2 CKEditor component
MIT License
358 stars 96 forks source link

ng2-ckeditor - format_tags style #319

Closed vimal-darji-ifour closed 3 years ago

vimal-darji-ifour commented 3 years ago

Hello, I want to customize, format_tag . I can able to add new format_tag but somehow css class is not being applied here is an example : this.config = { format_span : { element: 'span', name: 'ClientNotation', attributes: { class: 'custClass' }} }

link : https://stackblitz.com/edit/ng2-ckeditor-ysbmhg?file=src/app/app.component.ts

how can I inject css style in ckeditor?

kzimny commented 3 years ago

https://stackblitz.com/edit/ng2-ckeditor-cmqpmd?file=src/index.html

https://stackblitz.com/edit/ng2-ckeditor-cmqpmd?file=src/app/app.component.ts

https://ckeditor.com/docs/ckeditor4/latest/guide/dev_howtos_styles.html

vimal-darji-ifour commented 3 years ago

Hi kzimny, Thanks for the reply. Actually I don't want it in style tags. this is working with jquery. but not working with Angular. Actually what happens, there is a configuration to inject css class/file into CKEditor iframe, but some how its not working in Angular but it works perfectly with jQuery.

kzimny commented 3 years ago

Please see the angular stackblitz example above.

vimal-darji-ifour commented 3 years ago

It has been resolved by injecting external css(class) to iframe.