3

I have an RTE which can have different font family, font size and font colors. If a user selects text from this RTE which has different font styles, it need to provide all the font family, font size and font colors list.

I'm using window.getComputedStyle() method, from which I'm getting fontFamily property that includes a list of fonts been used. But fontSize and color are not list and returns just one value.

Is there any way apart from using third party libs to identify all the possible font size and colors in the selected text?

https://jsfiddle.net/sajus/b42Lzoza/

Saju
  • 31
  • 6

0 Answers0