SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Tools Script

  1. #1
    SitePoint Guru SharifTK's Avatar
    Join Date
    Jan 2004
    Location
    New York, NY
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tools Script

    Are there any free scripts out there that act like the tools that this forum use when inserting a message, like to make text bold, or insert link. Any help is appreciated. Thanks.
    SK

  2. #2
    SitePoint Zealot tss68nl's Avatar
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's merely a div for the text, and some divs on the side that act like buttons. When you click it, the active selection gets padded with <b></b> code, or stripped from it.

    You can make selections with a TextRange object, and the functions createRange() and pasteHTML() will allow you to modify the range.
    Additionally, you can use the document.selection property to get the current selection, which is probaly most of use for you.

    Look at http://msdn.microsoft.com/library/ for more info. A couple of searches on the above function names will get you there.

  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 SharifTK
    Are there any free scripts out there that act like the tools that this forum use when inserting a message, like to make text bold, or insert link. Any help is appreciated. Thanks.
    What you want is a browser-based rich text editor. There are a couple free ones on the web, but I lost the links. Search Google for "free online rich text editors."


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
  •