djangocms-text-ckeditor
djangocms-text-ckeditor copied to clipboard
TextPlugin removes source code HTML on save
I have had something similar occur in two separate projects.
In one, I was making modifications to the source HTML, like adding another style attribute to a tag, and my new attribute would be gone on save, leaving only the previous state of the tag.
In the current one, all tag attributes are getting purged on TextPlugin save.
In both these cases the TextPlugins were created within placeholder fields in the following manner:
block_text_plugin: TextPlugin = add_plugin(
placeholder=subsection_placeholder,
plugin_type=text_plugin,
language="en-us",
target=block_plugin,
body=block["body"],
)
Where block['body']
contains HTML elements, including some <ol style="list-style-type:lower-alpha">
.
Before: <ol style="list-style-type:lower-roman">
After: <ol>
djangocms-text-ckeditor 5.1.5