Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add help-text in rich-text editor

Marcin Gębala1e6174815946
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.py
index 41c59fd733..95e220530e 100644
--- a/saleor/dashboard/product/forms.py
+++ b/saleor/dashboard/product/forms.py
@@ -21,6 +21,12 @@ class RichTextField(forms.CharField):
widget = RichTextEditorWidget
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ self.help_text = pgettext_lazy(
+ 'Help text in rich-text editor field',
+ 'Select text to enable text-formatting tools.')
+
def to_python(self, value):
tags = settings.ALLOWED_TAGS or bleach.ALLOWED_TAGS
attributes = settings.ALLOWED_ATTRIBUTES or bleach.ALLOWED_ATTRIBUTES