If you have html in in a record.body you should display it with
{{=XML(record.body)}}
or better, to avoid XSS Injections
{{=XML(record.body,sanitize=True)}}
You can also specify which tags are allowed and which attributes
{{=XML(record.body,sanitize=True, permittied_tags=
['a'],allowed_attributes={'a':['href']})}}
When creating a record with SQLFORM(db.mock) or editing with SQLFORM
(db.mock,record), the body, by default is rendered by
<textarea name="body" id="mock_body"></textarea>
You can enable nicedit with the followin javascript (assuming you have
nicedit.* files in the static folder):
<script src="/{{=request.application}}/static/nicEdit.js"
type="text/javascript"></script>
<script><!--
$(document).ready(function(){
new nicEditor({fullPanel : true, iconsPath : '/
{{=request.application}}/static/nicEditorIcons.gif'}).panelInstance
('mock_body');
});
//--></script>
Massimo