ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Content class support so you can use a CSS class to wrap both your content and ckeditor in

Open robclancy opened this issue 6 years ago • 8 comments

We use a class called content-scope (but for example could be just some resetting class) for styling all the content ckeditor creates. The idea is that we don't want to have a bunch of classes looking for ck-editor__editable. Instead we just want to use the same class so we have a consistent match for accurate WYSIWYG.

Once again we have hacked around this ourselves.

https://github.com/postedin/ember-ckeditor/blob/66d4fbb2d4477d0613cdd2d9dc895ed0d92e74cd/addon/components/ckeditor/component.js#L80-L89

Would be nice to simpy be able to pass in a class for this spot. That hack I have only used on the classic editor so don't know how it will hold up in other builds.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

robclancy avatar Dec 04 '19 23:12 robclancy

Hi, @robclancy!

Thank you for the idea. As for:

Once again we have hacked around this ourselves.

To be frank, it's not a hack. We recommend this approach in our FAQ and it will work in all editor builds.

In theory, we could create a configuration option (<String>|Object.<String,String> for single/multi root editors) but I'm not sure how many people would actually use this.

cc @Reinmar

oleq avatar Dec 16 '19 14:12 oleq

I agree that it's not a hack. You used editor API to achieve exactly the thing that you wanted. Not everything can be done with configuration for many reasons. First reason would be that CKEditor 4 tried to do everything with configuration and it has around 200 config options AFAIR and many things are still not possible. And it's still a simpler case than doing the same in CKEditor 5 where we have many more editor types.

Anyway, I can confirm this as a potential feature and let's gather some feedback.

Reinmar avatar Dec 16 '19 14:12 Reinmar

PS. This is a very similar case to setting the editor height/width which is also not possible via the config.

Reinmar avatar Dec 16 '19 14:12 Reinmar

I used a private thing in what I did, which makes it a hack imo. view._editingView. And to add this class I had to dig deep into the code to find out how to do it, it wasn't something documented for what I did. Which makes me feel like there is a simpler way to do this (the FAQ link is a bit different and doesn't use something private, so there is probably something there I should be doing instead?).

robclancy avatar Dec 16 '19 16:12 robclancy

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 05 '23 05:10 CKEditorBot

Not stale, just ignored.

robclancy avatar Oct 05 '23 06:10 robclancy

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 04 '24 23:10 CKEditorBot

Nah we gave up on CKEditor, just using our hacks for this. Can’t wait to move away and stop spending so much.

On Sat, 5 Oct 2024 at 9:53 AM, CKEditor Bot @.***> wrote:

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

— Reply to this email directly, view it on GitHub https://github.com/ckeditor/ckeditor5/issues/5905#issuecomment-2394798283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRIF7W55BINY7BYRAOPNDZZ4S63AVCNFSM6AAAAABPMYYSYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUG44TQMRYGM . You are receiving this because you were mentioned.Message ID: @.***>

robclancy avatar Oct 04 '24 23:10 robclancy

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 05 '25 23:10 CKEditorBot

Confirmed moving away so not spending thousands a year on something without some basic apis.

On Mon, 6 Oct 2025 at 09:52, CKEditor Bot @.***> wrote:

CKEditorBot left a comment (ckeditor/ckeditor5#5905) https://github.com/ckeditor/ckeditor5/issues/5905#issuecomment-3369526133

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

— Reply to this email directly, view it on GitHub https://github.com/ckeditor/ckeditor5/issues/5905#issuecomment-3369526133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRIF5Z67KYGV75NWMUEP33WGVLDAVCNFSM6AAAAACILJ5QPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRZGUZDMMJTGM . You are receiving this because you were mentioned.Message ID: @.***>

robclancy avatar Oct 06 '25 01:10 robclancy