The solution is to add display and text-align to 'RICHTEXT_ALLOWED_STYLES'
in your settings.py.
RICHTEXT_ALLOWED_STYLES = (
"margin-top",
"margin-bottom",
"margin-left",
"margin-right",
"float",
"vertical-align",
"border",
"margin",
"text-align",
"display",
)
I think they should go into the default as they are used by the buttond of
tinymce.
Some thoughts?
Am Sonntag, 25. Oktober 2015 16:19:15 UTC+1 schrieb henri:
>
> For me it's not only the image. Also if I want to center text or a header*
> text-align:
> center**;* is stripped out after saving.
>
>
> Am Sonntag, 25. Oktober 2015 15:56:52 UTC+1 schrieb henri:
>>
>> Here the same.
>>
>> This behaviour was also reported in issue #705
>> <https://github.com/stephenmcd/mezzanine/issues/705> from yltang52
>> commented on 3 July.
>>
>> Regards,
>> Henri
>>
>>
>> Am Montag, 14. September 2015 05:42:04 UTC+2 schrieb Matt Hughes:
>>>
>>> Ive added an image to a blog post content, and set it to center, but
>>> when I save, the stye is stripped out.
>>>
>>> The style being applied to the image is "margin-left: auto;
>>> margin-right: auto; display: block;"
>>>
>>> I found a reference to a setting 'RICHTEXT_ALLOWED_STYLES'
>>> which allows the following styles to be used "margin-top",
>>> "margin-bottom", "margin-left", "margin-right", "float", "vertical-align",
>>> "border", "margin"
>>>
>>> So if "margin-left", "margin-right" are allowed why are they being
>>> stripped out?
>>>
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.