Skip to content

Commit 9401b6e

Browse files
authored
Merge pull request #222 from wordpress-mobile/issue/5041-disable-toolbar-buttons
Issue/5041 disable toolbar buttons
2 parents 2b941d0 + 678154b commit 9401b6e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/toolbar/AztecToolbar.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,14 @@ class AztecToolbar : FrameLayout, OnMenuItemClickListener {
332332
}
333333
}
334334

335+
fun enableFormatButtons(isEnabled: Boolean) {
336+
ToolbarAction.values().forEach { action ->
337+
if (action != ToolbarAction.HTML) {
338+
toggleButtonState(findViewById(action.buttonId), isEnabled)
339+
}
340+
}
341+
}
342+
335343
private fun showMediaUploadDialog() {
336344
if (!isEditorAttached()) return
337345

0 commit comments

Comments
 (0)