Open jqoker opened 5 years ago
I too have just noticed this. Given the draft-js definition below, the space between 'bold' and 'italic' is lost. I have found that the space is retained if you include it in the bold style.
{
"blocks": [
{
"key": "tase",
"text": "this is a bold italic",
"type": "unstyled",
"depth": 0,
"inlineStyleRanges": [
{
"offset": 10,
"length": 4,
"style": "BOLD"
},
{
"offset": 15,
"length": 6,
"style": "ITALIC"
}
],
"entityRanges": [],
"data": {}
}
],
"entityMap": {}
}
Having traced this further it is not an issue in draft-js-utils, it is in draft-js-export-pdfmake where I see the single space being filtered. See https://github.com/datagenno/draft-js-export-pdfmake/issues/3
when using bold style to whitespace, whitespace will lost
for example:
origin: text[whitespace]bold after: textbold
this whitespace between text and bold lost