Ckeditor5-angular: Integration with Angular Material

Created on 16 Aug 2018  路  24Comments  路  Source: ckeditor/ckeditor5-angular

Is there a way to support matInput in angular material, so it can work like a normal textarea with material design?

Update:
https://github.com/wynfred/mat-contenteditable now has a directive that interacts with ckeditor5

feature integrations

Most helpful comment

I'm not sure if that can be easily achieved right now.

I've found this guide - https://material.angular.io/guide/creating-a-custom-form-field-control, but it'd require few changes in the <ckeditor> component.

I'll try to dig more into this issue later.

If someone is interested in that too, please, give a 馃憤.

All 24 comments

I'm not sure if that can be easily achieved right now.

I've found this guide - https://material.angular.io/guide/creating-a-custom-form-field-control, but it'd require few changes in the <ckeditor> component.

I'll try to dig more into this issue later.

If someone is interested in that too, please, give a 馃憤.

@ma2ciek Thanks!

I've created a POC on the t/21 branch - you can see how it's implemented. But we won't be able to ship with the current solution as it depends directly on the Material library.

IMO it'd be the best to create a wrapper for the <ckeditor> component and export it as e.g. <mat-ckeditor> component as the Material design is not the only one and people will have different requirements. It could proxy <ckeditor> events and properties and implements the MatFormFieldControl, so the Material lib could handle it.

OTOH there aren't many integrations implementing this feature and Material Design is the most popular styling in the Angular ecosystem so IMO it's worth investing in this topic as there's interest.

@ma2ciek Thanks for the POC!
I just found ckeditor supports a tagName so it is able to create a