gongpex Posted November 17, 2011 Share Posted November 17, 2011 Hello everyone, I had tried to create simple HTML editor, but I'm still confuse especially how to make the taqs that can be write code automatically for example : if I need to create "blue text", I had ever create using : function change_color {document.body.color="#FF00FF"} and I put it to<input type="button" onclick="change_color();" value="click to change" /> of course if I click this button, all of text of the page will be changed based on text color, My question : how to made text (particular text) not all of text of the body to become color the color? like this forum posting when we want make, instance :[ text hello ], where we can change the color as our desire please someone answer to me Thank you Link to comment Share on other sites More sharing options...
Ingolme Posted November 17, 2011 Share Posted November 17, 2011 You would have to create a <span> element to surround the text and then give that element color. There's no simple way to make the editor you're looking for. You could look up execCommand() on Google. Link to comment Share on other sites More sharing options...
gongpex Posted November 18, 2011 Author Share Posted November 18, 2011 Hi Ingolme, you right. muchas gracias_________________________________________________________ By the way what season in your place now? (still fall or has been winter)? What's your avatar really? sorry if I asked something that out of school once againthank you very much (muchas gracias) Link to comment Share on other sites More sharing options...
Ingolme Posted November 18, 2011 Share Posted November 18, 2011 Season? Well, it's heading to winter, like anywhere in the northern hemisphere. My avatar is a black fox. Link to comment Share on other sites More sharing options...
gongpex Posted November 19, 2011 Author Share Posted November 19, 2011 Hi Ingolme, Yesterday I looking for execcommand() as your suggestion, But the execcommand() source that I found, only can be run on particular browser,some browser cannot detect it. Can you give me another source besides google, I had look but there is only one tutorial that clear. muchas gracias__________________________________________________________________________ I read on your "interests column" that you interests videogame, that's mean you like to play game, have you ever play "castlevania lord of shadow"? Have you hear artist who named "Juan Antonio Alcázar" and "Jose Luis Vaello" Because I hear from wikipedia that konami create this game involve team or publisher from Spainand the team is "Mercury Steam" Triste(sorry) if ask too much, because you live in Spain and I think you are precise source gracias Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.