Rich text with text and icon in one line?

Is there a way using CSS to have a rich text component with some text that is aligned left and an icon which is aligned right, both in one line?
The idea is to use this rich text instead of the favorites component to finally store the favorites selection to google sheet.