SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Apr 11, 2004, 22:39 #1
- Join Date
- May 2000
- Location
- Honolulu, Hawaii, USA
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
script to set text background color
I'm putting together a browser-based WYSIWYG editor. I need a script that will open a javascript color palette and then set text background color onclick of the selected color. Any ideas where I might look? I tried IE's execCommand function, but that only opens a prompt to write in a color and users hate that.
-
Apr 12, 2004, 11:30 #2
- Join Date
- Mar 2004
- Location
- D-Town
- Posts
- 369
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why don't you check out how sitepoint do it in their advanced editor, they have something that sounds exactly like what you're trying to do.
-
Apr 12, 2004, 15:37 #3
- Join Date
- May 2000
- Location
- Honolulu, Hawaii, USA
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by streetlife
-
Apr 13, 2004, 06:17 #4
- Join Date
- Mar 2004
- Location
- D-Town
- Posts
- 369
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, I wasn't specifically refering to exactly what you want. But if you go into the advanced editor on this forum and you hit the color picker, then a color menu pops up. Seems like that's more or less what you wanted. I imagine they use a hidden layer. Then you refer to the DOM to change the background color.
-
Apr 13, 2004, 08:39 #5
- Join Date
- May 2003
- Posts
- 1,843
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks