mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-04 21:44:44 +00:00
draftail uses 'alignment' property on images instead of 'format'
This commit is contained in:
parent
3d435327b6
commit
0f10d42e92
2 changed files with 2 additions and 2 deletions
|
|
@ -340,7 +340,7 @@ class TestHtmlToContentState(TestCase):
|
|||
],
|
||||
'entityMap': {
|
||||
'0': {
|
||||
'data': {'format': 'left', 'altText': 'an image', 'id': '1'},
|
||||
'data': {'alignment': 'left', 'altText': 'an image', 'id': '1'},
|
||||
'mutability': 'IMMUTABLE', 'type': 'IMAGE'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class ImageElementHandler(AtomicBlockEntityElementHandler):
|
|||
to contentstate
|
||||
"""
|
||||
def create_entity(self, name, attrs, state, contentstate):
|
||||
return Entity('IMAGE', 'IMMUTABLE', {'altText': attrs.get('alt'), 'id': attrs['id'], 'format': attrs['format']})
|
||||
return Entity('IMAGE', 'IMMUTABLE', {'altText': attrs.get('alt'), 'id': attrs['id'], 'alignment': attrs['format']})
|
||||
|
||||
|
||||
ContentstateImageConversionRule = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue