Yello, I have a textarea where the user can write a paragraph. I want to be able to let them highlight some of their text and then hit a "URL" button which will insert "[LINK]" before the highlighted text and "[/LINK]" after the text. Does anyone know how to do this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 18, 2007, at 2:01 PM, Joe Peck wrote:> > Yello, > > I have a textarea where the user can write a paragraph. I want to be > able to let them highlight some of their text and then hit a "URL" > button which will insert "[LINK]" before the highlighted text and > "[/LINK]" after the text. > > Does anyone know how to do this?http://www.google.com/search?q=tiny+mce Or use something like RedCloth (textile) to do the markup. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
While it''s going to be a little bit of overkill you can check out our Textile Editor Helper plugin to learn how to do what you''re asking. The javascript is pretty simple and straightforward. http://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper On 6/18/07, Joe Peck <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Yello, > > I have a textarea where the user can write a paragraph. I want to be > able to let them highlight some of their text and then hit a "URL" > button which will insert "[LINK]" before the highlighted text and > "[/LINK]" after the text. > > Does anyone know how to do this? > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Proud supporter of DC United --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---