SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    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.

  2. #2
    SitePoint Addict streetlife's Avatar
    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.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2000
    Location
    Honolulu, Hawaii, USA
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by streetlife
    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.
    I searched the forum for "SitePoint advanced editor" and found nothing but my own posting and two off-topic results. Do you have a URL?

  4. #4
    SitePoint Addict streetlife's Avatar
    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.

  5. #5


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •