SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    inserting <font size> tags with selection

    Code:
    <form>
    
    <select name='size'>   
       <option value='size1'>size1</option>
       <option value='size2'>size2</option>
       <option value='size3'>size3</option>
       <option value='size4'>size4</option>
    </select><br>
    
    <textArea name='textArea' style='width:500;height:150'>
    target text
    </textArea>
    
    </form>
    I have a selection and textArea like the above.

    I like to make it like the following.

    (1) A user puts the cursur in fron of target text with his or her mouse.
    (2) He or she drags the cursur to the end of target text.
    (3) He or she selects size3 using the selection box.

    Then,

    "target text" becomes "<font size='3'>target text</font3>."

    I hope I make it with your help.

  2. #2
    code ninja hamstu's Avatar
    Join Date
    Nov 2002
    Location
    Montrťal, Canada
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems to me that you're looking for some type of WYSIWYG editor. You could write it yourself, but there are already tons out there.

    Here's a nice simple one: http://www.themaninblue.com/experiment/widgEditor/

    But if you need something with a little more oomph, try FCKEditor.

  3. #3
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hamstu View Post
    It seems to me that you're looking for some type of WYSIWYG editor. You could write it yourself, but there are already tons out there.

    Here's a nice simple one: http://www.themaninblue.com/experiment/widgEditor/

    But if you need something with a little more oomph, try FCKEditor.
    Thank you.
    You suggest good links.


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
  •