I''m curious if anyone else has a need to disable *convertHTMLLineBreaks*. I actually need to show the <p>''s and <br>''s in the editor and browsing the source code, see that this isn''t configurable. Jamie
On 3/27/06, Jamie Orchard-Hays <jamie-fswG1Ka7Iew@public.gmane.org> wrote:> I''m curious if anyone else has a need to disable > *convertHTMLLineBreaks*. I actually need to show the <p>''s and <br>''s > in the editor and browsing the source code, see that this isn''t > configurable. > > JamieME! I just monkey patched it at one time, but I think I updated scriptaculous and lost it :) It''s a trivial fix to make. Just find where it strips html tags and stop it. -- Rick Olson http://techno-weenie.net
Yes, that should obviously be configurable. Submit a patch and I''m sure you''ll get it committed. On 3/28/06, Jamie Orchard-Hays <jamie-fswG1Ka7Iew@public.gmane.org> wrote:> I''m curious if anyone else has a need to disable > *convertHTMLLineBreaks*. I actually need to show the <p>''s and <br>''s > in the editor and browsing the source code, see that this isn''t > configurable. > > Jamie > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
thanks guys. I''ll whip up a patch. In the meantime, I just rewrote the method in my own javascript file: //Need to override the default behavior of the InPlaceEditor to not convert <p> and <br> tags Object.extend(Ajax.InPlaceEditor.prototype, { convertHTMLLineBreaks: function(string) { return string; } }); On Mar 27, 2006, at 2:35 PM, Jon Tirsen wrote:> Yes, that should obviously be configurable. Submit a patch and I''m > sure you''ll get it committed. > > On 3/28/06, Jamie Orchard-Hays <jamie-fswG1Ka7Iew@public.gmane.org> wrote: >> I''m curious if anyone else has a need to disable >> *convertHTMLLineBreaks*. I actually need to show the <p>''s and <br>''s >> in the editor and browsing the source code, see that this isn''t >> configurable. >> >> Jamie >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Can someone explain what *convertHTMLLineBreaks* does? I could not find it in the docs! Does this actually take line breaks that you type into the text area and convert them?? Deco On Mar 27, 2006, at 12:27 PM, Jamie Orchard-Hays wrote:> I''m curious if anyone else has a need to disable > *convertHTMLLineBreaks*. I actually need to show the <p>''s and > <br>''s in the editor and browsing the source code, see that this > isn''t configurable. > > Jamie > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
It''s not in the docs as it''s not really part of the API. It converts <br>''s to line breaks before it displays the textarea. It does not convert back again as this is the responsibility of the server. This seems to be the desired behaviour a lot of times, but not always. Hence it should be configurable. To be honest, this feature has caused quite a bit of confusion and maybe there should be a better way of doing it. Cheers, Jon On 3/28/06, Deco Rior <decorior-w9xKMqPX1QdNhnlO7+U8Og@public.gmane.org> wrote:> Can someone explain what *convertHTMLLineBreaks* does? I could not > find it in the docs! > > Does this actually take line breaks that you type into the text area > and convert them?? > > Deco > > On Mar 27, 2006, at 12:27 PM, Jamie Orchard-Hays wrote: > > > I''m curious if anyone else has a need to disable > > *convertHTMLLineBreaks*. I actually need to show the <p>''s and > > <br>''s in the editor and browsing the source code, see that this > > isn''t configurable. > > > > Jamie > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >