[web2py] Re: links in texts stoded in a database

2013-12-24 Thread 黄祥
i think you can achieve it with put the rich text editor in your form input ref: https://groups.google.com/forum/#!topic/web2py/OoZ1EI8OOmw another way is with put the html code in your input text area form or either use markmin. the first is the easiest. best regards, stifan -- Resources: - h

Re: [web2py] Re: links in texts stoded in a database

2013-12-27 Thread Jonas Fredriksson
I tried ckeditor and I've got an editor in admin so I can insert links, so far so good. but the text is still rendered plain with html tags visible. my function and db in db.py: (text field is the field I want to insert links into) def advanced_editor(field,text): return TEXTAREA(_id = str(te

Re: [web2py] Re: links in texts stoded in a database

2013-12-29 Thread Jonas Fredriksson
just to clarify, my problem is that html tags in my input text area is just rendered as tags, naturally because the field is classified as text and nothing else. I need to render the html elements when displaying text. On Fri, Dec 27, 2013 at 10:01 PM, Jonas Fredriksson wrote: > I tried ckeditor

Re: [web2py] Re: links in texts stoded in a database

2013-12-29 Thread 黄祥
if that the case please use XML() function on your view. e.g. {{for i, row in enumerate(rows):}} {{=DIV(XML(T(row.table_field), sanitize = True) ) }} {{pass}} best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: links in texts stoded in a database

2013-12-29 Thread 黄祥
another way around is define it on the represent for your table text field. e.g. table.table_field.represent = lambda v, r: XML(v, sanitize = True) the difference for previous code in this one you can use it for grid without define it again on your view. if you use string type field, yet it can

Re: [web2py] Re: links in texts stoded in a database

2013-12-30 Thread Jonas Fredriksson
the XML function solved the problem: {{for i, row in enumerate(rows):}} {{=DIV(XML(T(row.table_field), sanitize = True) ) }} {{pass}} thanks. On Mon, Dec 30, 2013 at 3:29 AM, 黄祥 wrote: > another way around is define it on the represent for your table text field. > e.g. > table.table_field.re