Adding classes for inline elements
Is it possible to add classes to inline elements such as strong / em / a ? I noticed on tables I can select essentially every element in the hierarchy to apply classes, but if I have a strong tag inside a paragraph I can't click within it and see [ p ]> [ strong ]> to apply classes to each.
This would be particularly useful on anchors which could have classes that are styled as buttons.
Hi @mattsah,
Inline elements are not reported within the inspector and the only way to apply/modify the classes of those elements is by;
- selecting the parent block element in the inspector,
- selecting the code tab,
- manually adding/updating the HTML to have the appropriate
classattribute.
This functionality has been discussed previously here: https://github.com/GetmeUK/ContentTools/issues/155
I'm open to adding this feature as an enhancement and implementing myself or finding a volunteer(s) to help contribute a solution, however it's quite a chunk of work as inline tags are not handled in the same way as (inline) block tags (see my final comment on the aforementioned issue for a discussion of what I believe is involved) and my focus currently is on improving the test suite and fixing bugs when there reported - so (in all honesty) it's unlikely to be a feature available in the next few releases.