@@ -104,24 +104,28 @@ internal fun TextFormatting(
104
104
) {
105
105
FormattingOption (
106
106
state = state.actions[ComposerAction .BOLD ].toButtonState(),
107
+ toggleable = true ,
107
108
onClick = { onInlineFormatClick(InlineFormat .Bold ) },
108
109
imageVector = CompoundIcons .Bold (),
109
110
contentDescription = stringResource(R .string.rich_text_editor_format_bold)
110
111
)
111
112
FormattingOption (
112
113
state = state.actions[ComposerAction .ITALIC ].toButtonState(),
114
+ toggleable = true ,
113
115
onClick = { onInlineFormatClick(InlineFormat .Italic ) },
114
116
imageVector = CompoundIcons .Italic (),
115
117
contentDescription = stringResource(R .string.rich_text_editor_format_italic)
116
118
)
117
119
FormattingOption (
118
120
state = state.actions[ComposerAction .UNDERLINE ].toButtonState(),
121
+ toggleable = true ,
119
122
onClick = { onInlineFormatClick(InlineFormat .Underline ) },
120
123
imageVector = CompoundIcons .Underline (),
121
124
contentDescription = stringResource(R .string.rich_text_editor_format_underline)
122
125
)
123
126
FormattingOption (
124
127
state = state.actions[ComposerAction .STRIKE_THROUGH ].toButtonState(),
128
+ toggleable = true ,
125
129
onClick = { onInlineFormatClick(InlineFormat .StrikeThrough ) },
126
130
imageVector = CompoundIcons .Strikethrough (),
127
131
contentDescription = stringResource(R .string.rich_text_editor_format_strikethrough)
@@ -141,49 +145,57 @@ internal fun TextFormatting(
141
145
142
146
FormattingOption (
143
147
state = state.actions[ComposerAction .LINK ].toButtonState(),
148
+ toggleable = true ,
144
149
onClick = { linkDialogAction = state.linkAction },
145
150
imageVector = CompoundIcons .Link (),
146
151
contentDescription = stringResource(R .string.rich_text_editor_link)
147
152
)
148
153
149
154
FormattingOption (
150
155
state = state.actions[ComposerAction .UNORDERED_LIST ].toButtonState(),
156
+ toggleable = true ,
151
157
onClick = { onToggleListClick(ordered = false ) },
152
158
imageVector = CompoundIcons .ListBulleted (),
153
159
contentDescription = stringResource(R .string.rich_text_editor_bullet_list)
154
160
)
155
161
FormattingOption (
156
162
state = state.actions[ComposerAction .ORDERED_LIST ].toButtonState(),
163
+ toggleable = true ,
157
164
onClick = { onToggleListClick(ordered = true ) },
158
165
imageVector = CompoundIcons .ListNumbered (),
159
166
contentDescription = stringResource(R .string.rich_text_editor_numbered_list)
160
167
)
161
168
FormattingOption (
162
169
state = state.actions[ComposerAction .INDENT ].toButtonState(),
170
+ toggleable = false ,
163
171
onClick = { onIndentClick() },
164
172
imageVector = CompoundIcons .IndentIncrease (),
165
173
contentDescription = stringResource(R .string.rich_text_editor_indent)
166
174
)
167
175
FormattingOption (
168
176
state = state.actions[ComposerAction .UNINDENT ].toButtonState(),
177
+ toggleable = false ,
169
178
onClick = { onUnindentClick() },
170
179
imageVector = CompoundIcons .IndentDecrease (),
171
180
contentDescription = stringResource(R .string.rich_text_editor_unindent)
172
181
)
173
182
FormattingOption (
174
183
state = state.actions[ComposerAction .INLINE_CODE ].toButtonState(),
184
+ toggleable = true ,
175
185
onClick = { onInlineFormatClick(InlineFormat .InlineCode ) },
176
186
imageVector = CompoundIcons .InlineCode (),
177
187
contentDescription = stringResource(R .string.rich_text_editor_inline_code)
178
188
)
179
189
FormattingOption (
180
190
state = state.actions[ComposerAction .CODE_BLOCK ].toButtonState(),
191
+ toggleable = true ,
181
192
onClick = { onCodeBlockClick() },
182
193
imageVector = CompoundIcons .Code (),
183
194
contentDescription = stringResource(R .string.rich_text_editor_code_block)
184
195
)
185
196
FormattingOption (
186
197
state = state.actions[ComposerAction .QUOTE ].toButtonState(),
198
+ toggleable = true ,
187
199
onClick = { onQuoteClick() },
188
200
imageVector = CompoundIcons .Quote (),
189
201
contentDescription = stringResource(R .string.rich_text_editor_quote)
0 commit comments