add rich text style strike through
This commit is contained in:
@@ -514,6 +514,15 @@ class ComposerView extends GetWidget<ComposerController> with AppLoaderMixin, Ri
|
||||
});
|
||||
}
|
||||
),
|
||||
buildIconStyleText(
|
||||
path: RichTextStyleType.strikeThrough.getIcon(imagePaths),
|
||||
isSelected: controller.richTextMobileTabletController.isTextStyleTypeSelected(RichTextStyleType.strikeThrough),
|
||||
onTap: () async {
|
||||
await controller.htmlEditorApi?.formatStrikeThrough().then((value) {
|
||||
controller.richTextMobileTabletController.selectTextStyleType(RichTextStyleType.strikeThrough);
|
||||
});
|
||||
}
|
||||
),
|
||||
buildIconStyleText(
|
||||
path: RichTextStyleType.underline.getIcon(imagePaths),
|
||||
isSelected: controller.richTextMobileTabletController.isTextStyleTypeSelected(RichTextStyleType.underline),
|
||||
|
||||
@@ -20,6 +20,10 @@ class RichTextMobileTabletController extends GetxController {
|
||||
if (formatSettings.isUnderline) {
|
||||
listTextStyleApply.add(RichTextStyleType.underline);
|
||||
}
|
||||
|
||||
if (formatSettings.isStrikeThrough) {
|
||||
listTextStyleApply.add(RichTextStyleType.strikeThrough);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import 'package:core/presentation/resources/image_paths.dart';
|
||||
enum RichTextStyleType {
|
||||
bold,
|
||||
italic,
|
||||
underline;
|
||||
underline,
|
||||
strikeThrough;
|
||||
|
||||
String get commandAction {
|
||||
switch (this) {
|
||||
@@ -14,6 +15,8 @@ enum RichTextStyleType {
|
||||
return 'italic';
|
||||
case underline:
|
||||
return 'underline';
|
||||
case strikeThrough:
|
||||
return 'strikeThrough';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
@@ -27,6 +30,8 @@ enum RichTextStyleType {
|
||||
return imagePaths.icStyleItalic;
|
||||
case underline:
|
||||
return imagePaths.icStyleUnderline;
|
||||
case strikeThrough:
|
||||
return imagePaths.icStyleStrikeThrough;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user