padenc2001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Dec-07 16:31 UTC
Scriptaculous AJAX.EditInPlace Doesnt intrepret html
Whenever i do a editinplace field and the returning information has html in it say a bold tag instead of showing bold text it shows the code. Whenever i refresh the page it shows fine just not when using the editinplace. Any ideas on how to fix this? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Gregory
2006-Dec-07 17:02 UTC
Re: Scriptaculous AJAX.EditInPlace Doesnt intrepret html
If you look in Trac, you''ll find several bugs on the subject. What the field really needs is a parameter telling whether it should preserve HTML or convert from entities--this because there are two use cases: Those wishing to enter HTML, and those who may use the < > " & characters as part of normal text. The handling of the two is different, yet the current code tries to handle them both without distinction. TAG On Dec 7, 2006, at 9:31 AM, padenc2001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > Whenever i do a editinplace field and the returning information has > html in it say a bold tag instead of showing bold text it shows the > code. Whenever i refresh the page it shows fine just not when using > the > editinplace. > > Any ideas on how to fix this? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
padenc2001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Dec-07 17:09 UTC
Re: Scriptaculous AJAX.EditInPlace Doesnt intrepret html
is there a way to leave it up to the server, my script is designed to use a function to determine what is allowed and uses bbcode for html --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tom Gregory
2006-Dec-07 17:28 UTC
Re: Scriptaculous AJAX.EditInPlace Doesnt intrepret html
If for some reason your displayed version of your content differs from the editable version of your content (using wiki-code or bbcode, for example), you can always use the "loadTextURL" option, which requests the editable version of the text from your server. http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor TAG On Dec 7, 2006, at 10:09 AM, padenc2001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > is there a way to leave it up to the server, my script is designed to > use a function to determine what is allowed and uses bbcode for html > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
padenc2001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Dec-07 18:26 UTC
Re: Scriptaculous AJAX.EditInPlace Doesnt intrepret html
hmm i see that it loads the text from the server for editing, but
whenever i press ok and it goes back to text, i see my html tags
instead of the text becoming bold.
heres my JS:
new Ajax.InPlaceEditor(''9_text'',
''updatecomment.php?action=updatecomment&id=9'',
{rows:8,cols:50,loadTextURL:''updatecomment.php?action=getcommenttext&id=9''});
My PHP just takes the id and selects the text from the db, converts
bbcode to html and spits it out
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---