mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 01:13:22 +08:00
Added strikethrough button
This commit is contained in:
@ -80,6 +80,11 @@ class EditCellController extends Component {
|
||||
api.asc_setCellUnderline(value);
|
||||
}
|
||||
|
||||
toggleStrikethrough(value) {
|
||||
const api = Common.EditorApi.get();
|
||||
api.asc_setCellStrikeout(value);
|
||||
}
|
||||
|
||||
onStyleClick(type) {
|
||||
const api = Common.EditorApi.get();
|
||||
api.asc_setCellStyle(type);
|
||||
@ -238,6 +243,7 @@ class EditCellController extends Component {
|
||||
toggleBold={this.toggleBold}
|
||||
toggleItalic={this.toggleItalic}
|
||||
toggleUnderline={this.toggleUnderline}
|
||||
toggleStrikethrough={this.toggleStrikethrough}
|
||||
onStyleClick={this.onStyleClick}
|
||||
onTextColor={this.onTextColor}
|
||||
onFillColor={this.onFillColor}
|
||||
|
||||
@ -15,6 +15,7 @@ export class storeCellSettings {
|
||||
isBold: observable,
|
||||
isItalic: observable,
|
||||
isUnderline: observable,
|
||||
isStrikethrough: observable,
|
||||
hAlignStr: observable,
|
||||
vAlignStr: observable,
|
||||
isWrapText: observable,
|
||||
@ -62,6 +63,7 @@ export class storeCellSettings {
|
||||
isBold = false;
|
||||
isItalic = false;
|
||||
isUnderline = false;
|
||||
isStrikethrough = false;
|
||||
|
||||
hAlignStr = 'left';
|
||||
vAlignStr = 'bottom';
|
||||
@ -146,6 +148,7 @@ export class storeCellSettings {
|
||||
this.isBold = xfs.asc_getFontBold();
|
||||
this.isItalic = xfs.asc_getFontItalic();
|
||||
this.isUnderline = xfs.asc_getFontUnderline();
|
||||
this.isStrikethrough = xfs.asc_getFontStrikeout();
|
||||
}
|
||||
|
||||
initEditorFonts(fonts, select) {
|
||||
|
||||
@ -73,6 +73,7 @@ const EditCell = props => {
|
||||
const isBold = storeCellSettings.isBold;
|
||||
const isItalic = storeCellSettings.isItalic;
|
||||
const isUnderline = storeCellSettings.isUnderline;
|
||||
const isStrikethrough = storeCellSettings.isStrikethrough;
|
||||
|
||||
const fontColorPreview = fontColor !== 'auto' ?
|
||||
<span className="color-preview" style={{ background: `#${(typeof fontColor === "object" ? fontColor.color : fontColor)}`}}></span> :
|
||||
@ -98,6 +99,7 @@ const EditCell = props => {
|
||||
<a className={'button' + (isBold ? ' active' : '')} onClick={() => {props.toggleBold(!isBold)}}><b>B</b></a>
|
||||
<a className={'button' + (isItalic ? ' active' : '')} onClick={() => {props.toggleItalic(!isItalic)}}><i>I</i></a>
|
||||
<a className={'button' + (isUnderline ? ' active' : '')} onClick={() => {props.toggleUnderline(!isUnderline)}} style={{textDecoration: "underline"}}>U</a>
|
||||
<a className={'button' + (isStrikethrough ? ' active' : '')} onClick={() => {props.toggleStrikethrough(!isStrikethrough)}} style={{textDecoration: "line-through"}}><i>S</i></a>
|
||||
</div>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textTextColor} link="/edit-cell-text-color/" routeProps={{
|
||||
|
||||
Reference in New Issue
Block a user