TF-797 [Web] Fix cursor position should display style of the current position in composer
This commit is contained in:
@@ -48,29 +48,25 @@ class RichTextWebController extends BaseRichTextController {
|
|||||||
|
|
||||||
void onEditorSettingsChange(EditorSettings settings) async {
|
void onEditorSettingsChange(EditorSettings settings) async {
|
||||||
log('RichTextWebController::onEditorSettingsChange():');
|
log('RichTextWebController::onEditorSettingsChange():');
|
||||||
|
listTextStyleApply.clear();
|
||||||
|
|
||||||
if (settings.isBold) {
|
if (settings.isBold) {
|
||||||
listTextStyleApply.add(RichTextStyleType.bold);
|
listTextStyleApply.add(RichTextStyleType.bold);
|
||||||
} else {
|
|
||||||
listTextStyleApply.remove(RichTextStyleType.bold);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.isItalic) {
|
if (settings.isItalic) {
|
||||||
listTextStyleApply.add(RichTextStyleType.italic);
|
listTextStyleApply.add(RichTextStyleType.italic);
|
||||||
} else {
|
|
||||||
listTextStyleApply.remove(RichTextStyleType.italic);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.isUnderline) {
|
if (settings.isUnderline) {
|
||||||
listTextStyleApply.add(RichTextStyleType.underline);
|
listTextStyleApply.add(RichTextStyleType.underline);
|
||||||
} else {
|
|
||||||
listTextStyleApply.remove(RichTextStyleType.underline);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.isStrikethrough) {
|
if (settings.isStrikethrough) {
|
||||||
listTextStyleApply.add(RichTextStyleType.strikeThrough);
|
listTextStyleApply.add(RichTextStyleType.strikeThrough);
|
||||||
} else {
|
|
||||||
listTextStyleApply.remove(RichTextStyleType.strikeThrough);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log('RichTextWebController::onEditorSettingsChange(): $listTextStyleApply');
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyRichTextStyle(BuildContext context, RichTextStyleType textStyleType) {
|
void applyRichTextStyle(BuildContext context, RichTextStyleType textStyleType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user