TF-2116 Apply new design for web composer
(cherry picked from commit 1295eb59b2f5abd1095c00ade53c90f7d4f1ecd6)
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:get/get.dart';
|
||||
import 'package:html_editor_enhanced/html_editor.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/code_view_state.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/dropdown_menu_font_status.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/formatting_options_state.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/header_style_type.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/image_source.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/inline_image.dart';
|
||||
@@ -35,6 +36,7 @@ class RichTextWebController extends BaseRichTextController {
|
||||
final focusMenuParagraph = RxBool(false);
|
||||
final menuFontStatus = DropdownMenuFontStatus.closed.obs;
|
||||
final menuHeaderStyleStatus = DropdownMenuFontStatus.closed.obs;
|
||||
final formattingOptionsState = FormattingOptionsState.disabled.obs;
|
||||
|
||||
final menuParagraphController = CustomPopupMenuController();
|
||||
final menuOrderListController = CustomPopupMenuController();
|
||||
@@ -271,6 +273,16 @@ class RichTextWebController extends BaseRichTextController {
|
||||
}
|
||||
}
|
||||
|
||||
void toggleFormattingOptions() {
|
||||
final newState = isFormattingOptionsEnabled
|
||||
? FormattingOptionsState.disabled
|
||||
: FormattingOptionsState.enabled;
|
||||
|
||||
formattingOptionsState.value = newState;
|
||||
}
|
||||
|
||||
bool get isFormattingOptionsEnabled => formattingOptionsState.value == FormattingOptionsState.enabled;
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
menuParagraphController.dispose();
|
||||
|
||||
Reference in New Issue
Block a user