I''ve built my own Rich Text Editor (more control :-) ). In an old solution in php I think I used a hidden field to take the text before hitting save. Is that actually the way to go? Are there any limits in how much a hidden field can hold? Or how do I otherwise "catch" the text in a save if this is not the way to do it? The rte is using an iframe for editing. -- 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 -~----------~----~----~----~------~----~------~--~---
Hi. I may be way off the mark here, but I figure it couldn''t hurt to have a stab at helping out. You could just have the text bound to a variable, and, given a filename entered on the page, save the variable contents to the file. Not sure if Rails supports on-the-fly creating of files that don''t exist, as is the case with procedural languages such as C. But to answer your question, I can''t see why you couldn''t have the text in a variable somewhere, just as long as that variable was passed through each page that the user passed through until it was either destroyed or the contents saved. Not much of an answer I know, but who knows, maybe someone else has a more err ''explanatory solution. Hussein. -- 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 -~----------~----~----~----~------~----~------~--~---
Hussein Patwa wrote:> Hi. I may be way off the mark here, but I figure it couldn''t hurt to > have a stab at helping out. > > You could just have the text bound to a variable, and, given a filename > entered on the page, save the variable contents to the file. Not sure > if Rails supports on-the-fly creating of files that don''t exist, as is > the case with procedural languages such as C. > > But to answer your question, I can''t see why you couldn''t have the text > in a variable somewhere, just as long as that variable was passed > through each page that the user passed through until it was either > destroyed or the contents saved. > > Not much of an answer I know, but who knows, maybe someone else has a > more err ''explanatory solution. > > Hussein.Thanks. I guess the easiest would be to use a hidden field. I just wonder if it has any limits in terms of character length. I''ll give it a try. -- 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 -~----------~----~----~----~------~----~------~--~---