-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
In older Plone-Versions it was the default by TinyMCE to style bold or italic text like this:
<p>Normal Text <span style="font-weight: bold;">Bold Text</span> more normal text</p>Converting this results in:
{'@type': 'slate',
'plaintext': 'Normal Text Bold Text more normal text',
'value': [{'children': [{'children': [{'text': 'Normal Text '}], 'type': 'span'},
{'children': [{'text': 'Bold Text'}], 'type': 'span'},
{'children': [{'text': ' more normal text'}], 'type': 'span'}],
'type': 'p'}]}
- All three text-parts are turned into spans which leads to ugly line-breaks in Volto.
- The styling is gone
It would be better to create this:
{'@type': 'slate',
'plaintext': 'Normal Text Bold Text more normal text',
'value': [{'children': [{'text': 'Normal Text '},
{'children': [{'text': 'Bold Text'}], 'type': 'strong'},
{'text': ' more normal text'}],
'type': 'p'}]}
The same goes for <span style="font-style: italic">Italic text</span> which should get 'type': 'em'.
Metadata
Metadata
Assignees
Labels
No labels