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.
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)
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