How to prevent CKEditor from removing content and tags written in source?
I had the same requirement, I followed this tutorial for that, How to Display Icons in Drupal using Icon API.

It needs two modules (1) Fontawesome and its dependencies Library module &amp; Fontawesome Library. (2) Other module you need is Icon API which has sub-module Icon_filter that will convert the icons in the images.

I am afraid that Icon API module will work for D8 or not, but it has D8 version but unstable as you can see on the module page.

I am using this way on D7 site.

Update: Filter setting