Thanks, I'll check it out. I've turned up similar in Google, and they are really YMMV solutions. I'll try to get a somewhat general solution and post it somewhere. My Moz implementation is to create a TextArea class to encapsulate this with the control as an instance variable. Does this make sense or should I be extending something?
Thx On Nov 12, 2007, at 11:49 AM, Brian Williams wrote: > ah, ok... > > quick googling found > > http://www.webdeveloper.com/forum/showthread.php?t=118115 > > which lead to http://parentnode.org/javascript/working-with-the- > cursor-position/ > > good luck and make sure you read through the comments and don't > just carbon copy the code > cause its "wrong" but the code in the comments evidently make it > much easier > > > > On Nov 12, 2007 2:36 PM, s.ross <[EMAIL PROTECTED]> wrote: > I want to create a special-purpose editor that does live > previewing. It's kind of UBB, but of course, all UBBs have their > own peculiar syntaxes and use cases. > > Sample: > > - user selects text in textarea > - user presses bold button in interface > - text -> [b]text[/b] > > Nothing too fancy, just different in IE and the documentation is > very sparse. Thought if someone on this list had some code lying > around it would be worth knowing before I write it myself. > > Thx > > On Nov 12, 2007, at 11:21 AM, Brian Williams wrote: > >> selection to what end? >> >> >> On Nov 12, 2007 2:17 PM, s.ross <[EMAIL PROTECTED]> wrote: >> >> I'm struggling a bit with the disparity between how Moz and IE handle >> selection in textarea objects. Does anyone have any prototype- >> leveraging code that encapsulates this kind of thing? The Moz part is >> pretty straightforward and I have it working. The IE stuff is a bit >> of a mystery to me. >> >> TIA, >> >> -s >> >> > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
