On 16/6/04 8:00 pm, "Matt Wells" <[EMAIL PROTECTED]> wrote:
> I want to read a couple of paragraphs from a database. (So this project > would be a shockwave project.) Into a editable text field. What I need > to do is highlight a specified word(s) in the text field and insert an > html tag on the front and back of the highlighted text by pressing a > button. Here would be an exsample! > > Hi my name is Matt! > > I would highlight name in the above text line and press a button. The > result Im looking for would be. > > Hi my <b>name<b> is Matt! Hi Matt, Here's a very simple behavior for your button that will do more or less what you ask for: on mouseUp me tMember = member(1) -- use a softcoded reference to your text member tText = tMember.text tSelection = tMember.selection tTag = "<b>" put tTag after char tSelection[2] of tText put tTag after char tSelection[1] of tText put tText end This assumes that you are happy to let the user select any chunk of text, not just entire words. It also simply puts the result into the Message window, whereas you want to send it back to the database. Cheers, James [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
