GetmeUK / contenttools-2-roadmap

Roadmap for ContentTools 2
MIT License
4 stars 0 forks source link

Improved Text styling support #3

Open kriskenyon opened 4 years ago

kriskenyon commented 4 years ago

It would be helpful to have increased control over Text like being able to change the color within the text string of a specific word, changing fonts on selection and general formatting controls in a more consistent control over the formatting of text. (Leaving this open ended for others to chime in)

anthonyjb commented 4 years ago

@kriskenyon thanks for the input :+1: I've previously written a tools for doing font family variation as a plug-in for a client, I shared my approach and code here: https://anthonyblackshaw.me/2018-01-22/font-family-selector

How do you see font family, size and color being applied, my issue with this has always been a dislike for applying inline styles. However, I would be interested in vastly improving the styles selection area in the properties tool so that you could:

Would that be a suitable approach for the way you work? It would mean defining in advance what styles a user could apply, is that flexible enough?

kriskenyon commented 4 years ago

@anthonyjb I have a client that LOVES color and wants to draw attention to particular words by changing color font etc. I moved from ckeditor to ContentTools and it is better in almost every way but I still hear about that one feature. I did implement block level items via CSS and other tricks but that does not get to the word level. As to the inline markup I had to manually edit everything from ckeditor to remove that and I fully understand the hesitation. I wonder if something could be done with string positions to achieve this but my fear is that the performance would utterly tank and the complexity would get overwhelming quickly.
Even though this feels like "not a feature ContentTools will implement" if you come up with a ah ha moment let me know. Perhaps I can implement a plugin.

anthonyjb commented 4 years ago

@kriskenyon we all have those clients :laughing:

So actually I've written a number of extensions for people which allow you to mark inline sections of text, usually by just extending the bold tool and changing what it applies (to do things like highlight sections of text in a paragraph). Performance wise I don't think you'll have an issue as CT only makes one paragraph block editable at a time. However, building the interface to allow selection of font family, size, style and colour given the very bare bones UI tools available at the moment is another matter.

A new underlying UI will be a freature of ContentTools 2 to make it much easier to extend the UI for your own purposes and to unify the UI across CE, CT and CF (all currently use different approaches). So this should make the creation of such an extension relatively easy.

I'm going to leave this issue open for discussion for now if that's OK, you're not the first person over the years to want this feature for a client and I'm interested to see how others have solved it and if their is better advice on the matter.