Commit 7f21834d authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_core: use preferred source code editor for non html documents

parent eca32661
......@@ -63,12 +63,12 @@ if not content_type:\n
if getattr(context, \'getContentType\', None) is not None:\n
content_type = context.getContentType() or \'text/html\'\n
\n
# If this is not HTML, fallback to TextArea\n
if content_type != \'text/html\':\n
return \'text_area\'\n
# If this is HTML, use preferred HTML editor or fallback to Textarea\n
if content_type == \'text/html\':\n
return context.portal_preferences.getPreferredTextEditor() or \'text_area\'\n
\n
# Else return preferred value or TextArea if nothing defined\n
return context.portal_preferences.getPreferredTextEditor() or \'text_area\'\n
# Else use preferred source code editor or fallback to Textarea\n
return context.portal_preferences.getPreferredSourceCodeEditor() or \'text_area\'\n
</string> </value>
</item>
<item>
......
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