neos-simple-editor-extend icon indicating copy to clipboard operation
neos-simple-editor-extend copied to clipboard

Allow choosing the style from a dropdown

Open Sebobo opened this issue 6 years ago • 11 comments

The are use cases where you should be able to select from a list of styles for the same piece of text. The current mechanism would generate a button for each style and they might stack, when an editor presses several buttons.

With a dropdown it could be enforced that one of a set of styles is only selected. This would also use less space in cases where more than 3 styles are available.

I just started working on a time critical custom implementation and would try to create a PR for this package when I'm done.

Sebobo avatar Jun 25 '19 12:06 Sebobo

We actually don't need so much. My first implementation mostly works and I was able to use the SelectBox from Neos and the Highlight plugin from CK5 https://ckeditor.com/docs/ckeditor5/latest/features/highlight.html#demo

I would prefer to use the Neos StyleSelect component, but it might need to be extended to give all the options.

@breadlesscode it could make sense to use the Highlight Plugin also for the normal buttons at some point. But it's not urgent.

Sebobo avatar Jun 26 '19 12:06 Sebobo

Thanks Seb for your support :)

Yes I think the StyleSelect should be fine. But atm I have no time to dive deeper in this component. I'm really curious to see what you implement :+1:

breadlesscode avatar Jun 28 '19 09:06 breadlesscode

I'm actually finished with the clients implementation, just having a problem with CK and Neos itself. When you include plugins that have dependencies on the CK core, you get errors and warnings in the backend. Everything still seems to work, but I wouldn't put it into production this way. Will have a discussion with other UI people next week on how to solve this.

Sebobo avatar Jun 28 '19 16:06 Sebobo

@Sebobo Any progress here? If not I will have a look at this issue :)

That would be an awesome feature.

breadlesscode avatar Sep 02 '19 08:09 breadlesscode

Just came back from holiday and was focused on the RedirectHandler. Can start on this topic next week :) Maybe I'll just start a draft PR with some code and we can work on it together.

Sebobo avatar Sep 02 '19 08:09 Sebobo

@breadlesscode finally took some time ;) You can already check out my draft PR #9 if you like.

Sebobo avatar Sep 25 '19 13:09 Sebobo

Thank you :)

I will check that tomorrow

breadlesscode avatar Sep 25 '19 14:09 breadlesscode

Open todos:

  • [ ] (Optionally) Make it possible to select style options instead of just css classes
  • [x] Enable previous button plugin again (disabled because of some CK duplicate import error)
  • [ ] More testing

Sebobo avatar Sep 27 '19 09:09 Sebobo

Sorry to keep you waiting. I did not forget you :)

This week I will have a look at your PR and hopefully fix the open Todos :+1:

breadlesscode avatar Sep 30 '19 11:09 breadlesscode

Oh I can also do that, but was sick last week. But feel free to change stuff if you are faster than me ;)

Sebobo avatar Sep 30 '19 12:09 Sebobo

Any update on this?

Benjamin-K avatar Jan 07 '22 16:01 Benjamin-K