Add class to any element with CKEditor Is there a way to add class to any element through CKEditor? 

Here is an example: I create a list with CKEditor and I want to add a class to the ul tag. Or maybe on one of the li.

Everything without opening the source of course.

Is there any way to achieve that? (with CKEditor or with another WYSIWYG)
You can configure custom styles in 'Text formats and editors':


Visit /admin/config/content/formats, and click Configure for any
format using CKEditor
Ensure the 'Styles' button is in your active toolbar 
Click 'Styles dropdown' under CKEditor plugin settings
Add class|style values per the instructions


Using your example, you could add entries like:

ul.myListClass|Special List
li.myItemClass|Special List Item


This would make the styles 'Special List' and 'Special List Item' appear in the styles dropdown anytime the user's cursor is anywhere in an ul or li. If they choose 'Special List', the class 'myListClass' would be added to the nearest ul. If they choose 'Special List Item', 'myItemClass' gets added to the current li.

This assumes current versions of Drupal 8. I'm not sure about Drupal 7, but I assume up-to-date versions would have similar functionality.