[web2py] Re: Display Image in text

2012-09-11 Thread BlueShadow
thanks Massimo. that works. Is it also possible to make the image float:left or right So the text flowes around the image. I tried adding float:left; to the _style but it doesnt have any effect. On Tuesday, September 11, 2012 8:50:56 PM UTC+2, Massimo Di Pierro wrote: > > You should be able to do

[web2py] Re: Display Image in text

2012-09-11 Thread Massimo Di Pierro
You should be able to do: {{ if Article.InTextImage.thumb: src = URL('download',args=Article.InTextImage.thumb) content = Article.Content.replace('<>',IMG(_src=src,_style='display:block;').xml()) else: content = Article.Content.replace('<>','') pass =XML(content, sanitize=True) # saniti

[web2py] Re: Display Image in text

2012-09-11 Thread BlueShadow
It does I display it by this line to be exact: {{=XML(Artical.Content)}} On Tuesday, September 11, 2012 6:49:40 PM UTC+2, Massimo Di Pierro wrote: > > It depends. Does content contain HTML? > > On Tuesday, 11 September 2012 11:36:02 UTC-5, BlueShadow wrote: >> >> So what is the right way to do it?

[web2py] Re: Display Image in text

2012-09-11 Thread Massimo Di Pierro
It depends. Does content contain HTML? On Tuesday, 11 September 2012 11:36:02 UTC-5, BlueShadow wrote: > > So what is the right way to do it? > > On Tuesday, September 11, 2012 6:15:29 PM UTC+2, Massimo Di Pierro wrote: >> >> You should not do it that way because the value of content would be >>

[web2py] Re: Display Image in text

2012-09-11 Thread BlueShadow
So what is the right way to do it? On Tuesday, September 11, 2012 6:15:29 PM UTC+2, Massimo Di Pierro wrote: > > You should not do it that way because the value of content would be > escaped. > > --

[web2py] Re: Display Image in text

2012-09-11 Thread Massimo Di Pierro
You should not do it that way because the value of content would be escaped. On Tuesday, 11 September 2012 10:53:18 UTC-5, BlueShadow wrote: > > Hi I like to have an Image Displayed within the Content of an Article. The > Content ist stored in a db table. > Up till now I simply displayed the cont