Commit 6127adf6 authored by Romain Courteaud's avatar Romain Courteaud

Use portal_transform to convert html to plain text, in order to improve the ODT rendering.

Instead of adding this in the page template, it could be better to handle this convertion directly in the field.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26814 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2e535942
...@@ -382,7 +382,7 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value> ...@@ -382,7 +382,7 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value>
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: (not (same_type(value,[]) or same_type(value,()) )) and (value != None)">\n <tal:block tal:condition="python: (not (same_type(value,[]) or same_type(value,()) )) and (value != None)">\n
<tal:block tal:condition="python: field_type==\'EditorField\' and field.get_value(\'text_editor\')==\'fck_editor\'">\n <tal:block tal:condition="python: field_type==\'EditorField\' and field.get_value(\'text_editor\')==\'fck_editor\'">\n
<tal:block tal:content="structure python: field.render_pdf(value)" />\n <text:p text:style-name=\'field-content-center\' tal:content="structure python: str(field.render_pdf(field.portal_transforms.convertToData(\'text/plain\', value))).replace(\'&amp;\', \'&amp;amp;\').replace(\'&gt;\', \'&amp;gt;\').replace(\'&lt;\', \'&amp;lt;\').replace(\'\\n\', \'&lt;text:line-break/&gt;\')" />\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: field_type in (\'EditorField\',) and field.get_value(\'text_editor\')==\'text_area\'">\n <tal:block tal:condition="python: field_type in (\'EditorField\',) and field.get_value(\'text_editor\')==\'text_area\'">\n
<text:p text:style-name=\'field-content-center\'\n <text:p text:style-name=\'field-content-center\'\n
......
72 73
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment