chinalwb / Android-Rich-text-Editor

Android Rich Text Editor With customized spans - 富文本编辑器 - Don't miss this one :)
Apache License 2.0
841 stars 169 forks source link

Color does not change #145

Open eucliddelphi opened 3 years ago

eucliddelphi commented 3 years ago

Let's say I have a text "My Text" wich is in black color and it is represented like this:

<html>
    <body>
        <p>
            <span style="font-size: 18px;" ;><span style="color: #000000;">My Text</span></span>
        </p>
    </body>
</html> 

where the line ...span style="color: #000000;"... is responsible for that black color. Now I change the color to red by selecting the text and try to show it on TextView, which, by the way, looks in HTML like this:

<html>
    <body>
        <p>
            <span style="font-size: 18px;" ;>
                <span style="color: #000000;"><span style="color: #ff0000;">My Text</span></span>
            </span>
        </p>
    </body>
</html>

As you can see, the previous (black) color will not be overwritten or replaced by the new (red) color. Rather simply added new span. One more thing is that after changing the color and tiring to show it on TextView, the new color is not rendered. Please help. Thanks!