mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 01:13:22 +08:00
Added strikethrough on text
This commit is contained in:
@ -24,6 +24,11 @@ class EditTextController extends Component {
|
||||
api.asc_setCellUnderline(value);
|
||||
};
|
||||
|
||||
toggleStrikethrough(value) {
|
||||
const api = Common.EditorApi.get();
|
||||
api.asc_setCellStrikeout(value);
|
||||
}
|
||||
|
||||
onParagraphAlign(type) {
|
||||
const api = Common.EditorApi.get();
|
||||
let value = AscCommon.align_Left;
|
||||
@ -103,6 +108,7 @@ class EditTextController extends Component {
|
||||
toggleBold={this.toggleBold}
|
||||
toggleItalic={this.toggleItalic}
|
||||
toggleUnderline={this.toggleUnderline}
|
||||
toggleStrikethrough={this.toggleStrikethrough}
|
||||
onParagraphAlign={this.onParagraphAlign}
|
||||
onParagraphValign={this.onParagraphValign}
|
||||
changeFontSize={this.changeFontSize}
|
||||
|
||||
@ -12,6 +12,7 @@ export class storeTextSettings {
|
||||
isBold: observable,
|
||||
isItalic: observable,
|
||||
isUnderline: observable,
|
||||
isStrikethrough: observable,
|
||||
textColor: observable,
|
||||
customTextColors: observable,
|
||||
paragraphAlign: observable,
|
||||
@ -53,6 +54,7 @@ export class storeTextSettings {
|
||||
isBold = false;
|
||||
isItalic = false;
|
||||
isUnderline = false;
|
||||
isStrikethrough = false;
|
||||
textColor = undefined;
|
||||
customTextColors = [];
|
||||
paragraphAlign = undefined;
|
||||
@ -79,6 +81,7 @@ export class storeTextSettings {
|
||||
this.isBold = xfs.asc_getFontBold();
|
||||
this.isItalic = xfs.asc_getFontItalic();
|
||||
this.isUnderline = xfs.asc_getFontUnderline();
|
||||
this.isStrikethrough = xfs.asc_getFontStrikeout();
|
||||
|
||||
let color = xfs.asc_getFontColor();
|
||||
// console.log(color);
|
||||
|
||||
@ -39,6 +39,7 @@ const EditText = props => {
|
||||
const isBold = storeTextSettings.isBold;
|
||||
const isItalic = storeTextSettings.isItalic;
|
||||
const isUnderline = storeTextSettings.isUnderline;
|
||||
const isStrikethrough = storeTextSettings.isStrikethrough;
|
||||
const paragraphAlign = storeTextSettings.paragraphAlign;
|
||||
const paragraphValign = storeTextSettings.paragraphValign;
|
||||
|
||||
@ -58,6 +59,7 @@ const EditText = 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"}}>S</a>
|
||||
</div>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textTextColor} link="/edit-text-font-color/" routeProps={{
|
||||
|
||||
Reference in New Issue
Block a user