SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Location
    San Francisco Bay Area
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating a UI Text Formatter

    Is anyone aware of a tutorial, book, or anyother resource that talks about how to do text formating such as making text bold or italics etc via a UI similarly to the way vbulletin does it? I'm designing a content management system for people who don't know a lick of html and want them to be able to con control of the formating of the content with out having to worry about learning basic html.

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Webpenner,

    Offhand, no; however, you might go to google and search for 'HTML editors' -- the kind written in HTML to create HTML.

    Basically, though, you need to create your UI ( images, buttons, or selection lists) form and upon firing an event (onClick, onChange, etc) insert the appropriate code at the cursor position (difficult, but possible) or the end of the input (easier, like what vBulletin does with the smilies on the left). By the way you might want to make the UI form a 'floating' div, and the area where the user enters the text another div (if you want the formatting to be reflected immediately)

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Webpenner,

    Maybe the following javascript forms tutorial will help you on your way:

    http://hotwired.lycos.com/webmonkey/...tw=programming

    I've learned a lot from it.

    I haven't found a tutorial which handles the html formatting topic explicitly.

    If you need more examples though, you can go to www.hotscripts.com and browse through the content management category, I remember seeing text formatting similar to sitepoint there.

    Vincent,

    How can the position of the cursor be determined?

    It would be more convenient if the formatted text would be inserted at the position of the cursor instead of the end of the text.


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
  •