Skip to content

Commit

Permalink
add imageCaptioningEnabled param to TinyMCE settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed May 17, 2022
1 parent 15ba17e commit 2b28f0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Products/CMFPlone/patterns/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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/"
Expand Down

0 comments on commit 2b28f0a

Please sign in to comment.