Commit 43d5c171 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_core: we now have an editor for PDF too

parent 810ce6ca
master ERP5ify-portal_workfow_yusei_20210303 UpdateValidationStateFromConsistency addToDate_implicit_localtime arnau arnau-RD-Components-CacheTool arnau-RD-Components-ERP5Form-ERP5Report arnau-RD-Components-ERP5Form-SelectionTool-MemcachedTool arnau-RD-Components-ERP5OOo arnau-RD-Components-PreferenceTool-Preference arnau-RD-Components-Products-import-compat arnau-RD-Components-astroid_cache_per_component_reset arnau-RD-Components-erp5_crm arnau-RD-Components-erp5_trade-TODO-Interactor arnau-RD-ERP5ify-portal_workflow arnau-RD-ERP5ify-portal_workflow-1-seb-merged-with-recent-master arnau-RD-ERP5ify-portal_workflow-2-do-not-rename-erp5_workflow-portal_types arnau-RD-ERP5ify-portal_workflow-BAK arnau-RD-ERP5ify-portal_workflow-WIP arnau-RD-ERP5ify-portal_workflow-WITHOUT-MIGRATION arnau-RD-ERP5ify-portal_workflow-WORKFLOWS-NOT-MIGRATED arnau-TM-Components-Migrate-PortalTransforms arnau-TM-Components-ModuleSecurityInfo arnau-TM-FEC-output arnau-TM-WIP arnau-TM-isBuildable-with-multiple-BusinessLinks arnau-TM-newContent-temp_object arnau-TM-runUnitTest-clear-previous-execution-catalog arnau-TM-wkhtmltopdf arnau-WIP cache-control-304-response catalog_filter cloud_reliability_test cribjs-bootloader enhance_scalability_testing erp5-component erp5-component-bak erp5-imt erp5-messenger erp5-vifib erp5_corporate_identity erp5_hal_json_style_fix_restricted_access_with_traverse erp5_payslip_migration feat/dms_implicit_predecessor_successor_fields feat/erp5_ide feat/generate_report_ERP5JS feat/inventory_api_group_by_time_interval_list feat/notification-message-ignore-missing feat/python_language_support feat/show_user_on_logout_page feat/zopewsgi-start-timerserver fix-ftp-putFile fix/ZMI_editor_preference fix/advance_ecommerce_coding_crimes fix/business-template-update-tool fix/cmf_activity_global_request fix/getParent fix/support-request-app-empty fix/test_result_after_mep fix/web_page_officejs_duplicate_actions fix/workflow_method_security fix_web_illustration for_testrunner_1 for_testrunner_2 for_testrunner_3 graphic_gadget_js inventory js-ui limit_accelerated_http_cache_manager listbox_url lle-bout/metadata-modules macros_fix master_w mr1362 my2to3 nicolas-slice-price notebook_roque override_cache_control_header_by_caching_policy_manager poc/json-forms-study publish_recursiveReindexObject restore-from-trashbin rjs_listbox_sort_icon scalability-master scalability-run-command scalability_crash_mariadb shop-box-rebase streaming_fix streaming_fix-0 support_relative_url_in_hyperlink_field support_request test-renderjs-float-field-step trustable-x-forwarded-for ttrm unify_predicate_edit valentin_translation_fix wsgi wsgi-gevent wsgi_backport_setbody_lock wsgi_medusa_stream_fix yusei_20210303 0.4.59.1 0.4.59 nexedi-erp5-vifib-20201105 erp5.util-0.4.72 erp5.util-0.4.71 erp5.util-0.4.69 erp5.util-0.4.68 erp5.util-0.4.67 erp5.util-0.4.66 erp5.util-0.4.65 erp5.util-0.4.64 erp5.util-0.4.63 erp5.util-0.4.62 erp5.util-0.4.61 erp5.util-0.4.60 erp5.util-0.4.59.1 erp5.util-0.4.59 erp5.util-0.4.58 erp5.util-0.4.57 erp5.util-0.4.56 erp5.util-0.4.55 erp5.util-0.4.54 erp5.util-0.4.53 erp5.util-0.4.52 erp5-vifib-20210707 erp5-vifib-20201229 erp5-vifib-20200129
No related merge requests found
......@@ -15,5 +15,9 @@ if not content_type:
if content_type == 'text/html':
return context.portal_preferences.getPreferredTextEditor() or 'text_area'
# If this is a PDF, use the default PDF renderer
if content_type == 'application/pdf':
return 'pdf'
# Else use preferred source code editor or fallback to Textarea
return context.portal_preferences.getPreferredSourceCodeEditor() or 'text_area'
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