Posted 8 February 2021, 6:04 pm EST
Hi Pawel,
If we set the word for a cell to true then the content which is overflowed from that cell is wrapped and shows inside the cell. Word wrap does not add any break line to the content. it just shows the content inside cell without changing the content.
So controlling the word-wrap point could not be possible because it automatically identifies which word is not inside the boundary of the cell.
so all the space is considered nonbreaking spaces unless it gets overflowed from the cell boundary. You may add the non-breaking space but if it overflowed from the cell wordWrap add that word to the next line.
Please refer to the following code snippet and attached sample that demonstrates the same.
sheet
.getCell(0, 1, GC.Spread.Sheets.SheetArea.viewport)
.text("A\nB C D")
.wordWrap(true);
sheet
.getCell(1, 1, GC.Spread.Sheets.SheetArea.viewport)
.text("A B C D E F")
.wordWrap(true);
sample: https://codesandbox.io/s/elegant-mirzakhani-7je55
Fonts Demo: https://www.grapecity.com/spreadjs/demos/features/cells/font/purejs
Regards
Avinash