gabriel66 Posted August 24, 2010 Share Posted August 24, 2010 Dear AllWe are building a Visual Studio app. in which we give the user the ability to change the font color & background color of the HTML pages.the problem is how we can make the user restore the any color to its default -like the automatic color option in front page- we can't use "removeformat" as it removes all formats (super & sub script,...etc.) also we can't asume the default color is a specific one as the user may change the color of normal sytle in the CSS file.for example: <p>Jackdaws love <font size="5" color="#800000"><span style="background-color: #00FFFF">my big sphinx</span></font> of quartz.</p>- remove the font color of the word (big):<p>Jackdaws love <span style="background-color: #00FFFF"><font size="5" color="#800000">my </font><font size="5">big</font><font size="5" color="#800000"> sphinx</font></span> of quartz.</p>-remove the backgrounf color of the word (big):<p>Jackdaws love <span style="background-color: #00FFFF"><font size="5" color="#800000">my </font></span><font size="5">big</font><span style="background-color: #00FFFF"><font size="5" color="#800000"> sphinx</font></span> of quartz.</p> Thanks for your help Link to comment Share on other sites More sharing options...
Ingolme Posted August 24, 2010 Share Posted August 24, 2010 Remove the elements that have that specific styling on them. If you're doing this with programming you either have to work with the DOM tree or do complex string parsing. Link to comment Share on other sites More sharing options...
gabriel66 Posted August 25, 2010 Author Share Posted August 25, 2010 Remove the elements that have that specific styling on them. If you're doing this with programming you either have to work with the DOM tree or do complex string parsing.Dear IngolmeThanks for your reply. But as you can see in the example I've mentioned it's difficult to make the wanted changes.Anyway thanks and havr a nice day. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.