I''m working with the InPlace editor, with a text field that I want people to be able to put HTML code into. I''m having a problem with the HTML tags - in the data which the loadTextUrl script returns either you don''t encode the tags and then they disappear, or you encode the tags and you get the raw html entities. You can see what I mean at http://testing.oyster-web.co.uk/test.php Is there any solution to this problem? (I''m seeing it on FireFox2.) Thanks in advance, James --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
http://inplacericheditor.box.re/demos On 10/16/07, James <james-QFHlV2VK6MfiZgmEfAV3jg@public.gmane.org> wrote:> > > I''m working with the InPlace editor, with a text field that I want > people to be able to put HTML code into. > > I''m having a problem with the HTML tags - in the data which the > loadTextUrl script returns either you don''t encode the tags and then > they disappear, or you encode the tags and you get the raw html > entities. > > You can see what I mean at http://testing.oyster-web.co.uk/test.php > > Is there any solution to this problem? > > (I''m seeing it on FireFox2.) > > Thanks in advance, > James > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
oops, my bad, i misread what you wanted to do... is the server printing out > and < ? if so that is why they are showing up encoded did you check out the wiki? Using HTML within the In Place Editor If you are using Markdown or Textile, you can include HTML within your text. And if you follow the instructions above, you will be able to load this text in from your database with loadTextURL. But the stripTags function is invoked by the In Place Editor, and that strips out all the code before it can be displayed in the editor field. To get around this, add the following two extensions anywhere after the rest of the library has loaded. I use the extensions.js method noted elsewhere on this site. http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor On 10/16/07, Brian Williams <brianw1975-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > http://inplacericheditor.box.re/demos > > > > On 10/16/07, James < james-QFHlV2VK6MfiZgmEfAV3jg@public.gmane.org> wrote: > > > > > > I''m working with the InPlace editor, with a text field that I want > > people to be able to put HTML code into. > > > > I''m having a problem with the HTML tags - in the data which the > > loadTextUrl script returns either you don''t encode the tags and then > > they disappear, or you encode the tags and you get the raw html > > entities. > > > > You can see what I mean at http://testing.oyster-web.co.uk/test.php > > > > Is there any solution to this problem? > > > > (I''m seeing it on FireFox2.) > > > > Thanks in advance, > > James > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I read the wiki but managed to miss that somehow ... thanks, that''s exactly what I wanted. James On Oct 16, 4:15 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> oops, my bad, i misread what you wanted to do... > > is the server printing out > and < ? if so that is why they are > showing up encoded > > did you check out the wiki? > > Using HTML within the In Place Editor > > If you are using Markdown or Textile, you can include HTML within your text. > And if you follow the instructions above, you will be able to load this text > in from your database with loadTextURL. But the stripTags function is > invoked by the In Place Editor, and that strips out all the code before it > can be displayed in the editor field. > > To get around this, add the following two extensions anywhere after the rest > of the library has loaded. I use the extensions.js method noted elsewhere on > this site. > > http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor > > On 10/16/07, Brian Williams <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > >http://inplacericheditor.box.re/demos > > > On 10/16/07, James < ja...-QFHlV2VK6MfiZgmEfAV3jg@public.gmane.org> wrote: > > > > I''m working with the InPlace editor, with a text field that I want > > > people to be able to put HTML code into. > > > > I''m having a problem with the HTML tags - in the data which the > > > loadTextUrl script returns either you don''t encode the tags and then > > > they disappear, or you encode the tags and you get the raw html > > > entities. > > > > You can see what I mean athttp://testing.oyster-web.co.uk/test.php > > > > Is there any solution to this problem? > > > > (I''m seeing it on FireFox2.) > > > > Thanks in advance, > > > James--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---