SpreadJS supports rich text. You can show superscript, subscript and different text styles in one cell. The editor on the right can be used to create text with different styles.
Rich text data is an anonymous object, you should follow the JSON Schema.
You can set the value for the specified cell in the specified sheet area using the following code:
sheet.setValue(0,2,{richText:[{style:{font:'bold 24px Arial'},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.colHeader);
sheet.setValue(2,0,{richText:[{style:{font:'bold 24px Arial'},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.rowHeader);
sheet.setValue(2,0,{richText:[{style:{font:'bold 24px Arial'},text:'SpreadJS'}]}, GC.Spread.Sheets.SheetArea.viewport);
You can get the unformatted data from the specified cell in the specified sheet area using the following code:
sheet.getValue(1, 1, GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.ValueType.richText);
Updated: Rich text now support list
sheet.setValue(3, 0, {
richText:[{
type: GC.Spread.Sheets.ListType.disc,
level: 0,
richText: [{
style:{font:'bold 24px Arial'},
text:'SpreadJS'
}]
}]}, GC.Spread.Sheets.SheetArea.viewport);
Submit and view feedback for