|
|
@ -113,10 +113,11 @@ class Carbon extends React.PureComponent {
|
|
|
|
onSelectionChange = changes => {
|
|
|
|
onSelectionChange = changes => {
|
|
|
|
if (this.state.selectionAt) {
|
|
|
|
if (this.state.selectionAt) {
|
|
|
|
const css = [
|
|
|
|
const css = [
|
|
|
|
changes.bold && `font-weight: ${changes.bold ? 'bold' : 'initial'}`,
|
|
|
|
changes.bold != null && `font-weight: ${changes.bold ? 'bold' : 'initial'}`,
|
|
|
|
changes.italics && `font-style: ${changes.italics ? 'italic' : 'initial'}`,
|
|
|
|
changes.italics != null && `font-style: ${changes.italics ? 'italic' : 'initial'}`,
|
|
|
|
changes.underline && `text-decoration: ${changes.underline ? 'underline' : 'initial'}`,
|
|
|
|
changes.underline != null &&
|
|
|
|
changes.color && `color: ${changes.color} !important`
|
|
|
|
`text-decoration: ${changes.underline ? 'underline' : 'initial'}`,
|
|
|
|
|
|
|
|
changes.color != null && `color: ${changes.color} !important`
|
|
|
|
]
|
|
|
|
]
|
|
|
|
.filter(Boolean)
|
|
|
|
.filter(Boolean)
|
|
|
|
.join('; ')
|
|
|
|
.join('; ')
|
|
|
|