From 2b28f0ac610bf11427b729ba370443b73270363d Mon Sep 17 00:00:00 2001 From: MrTango Date: Mon, 25 Apr 2022 20:15:46 +0300 Subject: [PATCH] add imageCaptioningEnabled param to TinyMCE settings --- Products/CMFPlone/patterns/settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Products/CMFPlone/patterns/settings.py b/Products/CMFPlone/patterns/settings.py index 96b7210ac3..cb7a236ead 100644 --- a/Products/CMFPlone/patterns/settings.py +++ b/Products/CMFPlone/patterns/settings.py @@ -83,6 +83,12 @@ def image_srcsets(self): editor_srcsets[k] = srcset return editor_srcsets + @property + def image_captioning(self): + registry = getUtility(IRegistry) + settings = registry.forInterface(IImagingSchema, prefix="plone", check=False) + return settings.image_captioning + def tinymce(self): """ data-pat-tinymce : JSON.stringify({ @@ -135,6 +141,7 @@ def tinymce(self): "base_url": self.context.absolute_url(), "imageTypes": image_types, "imageSrcsets": self.image_srcsets, + "imageCaptioningEnabled": self.image_captioning, "linkAttribute": "UID", # This is for loading the languages on tinymce "loadingBaseUrl": "{}/++plone++static/components/tinymce-builded/"