Skip to content

Enable alignment toolbar for verse block #2037

@guarani

Description

@guarani

Description

On mobile, the verse block (which is currently only enabled for debug builds) does not display text alignment options.

Steps to Reproduce

  1. Add a verse block to a post
  2. Observe the that the toolbar (located above the keyboard) does not display alignment options

Expected Behavior

Text alignment options should be displayed for the verse block, similar to how they are displayed for other blocks such as the paragraph block.

Screenshots

iOS Android

Additional Information

To do this, first wordpress-mobile/AztecEditor-Android#899 will need to be merged and the following modification made to verse/edit.js:

...
+import { Platform } from '@wordpress/element';
 ...
+ const isAlignmentToolbarCollapsed = Platform.select( {
+   web: true,
+   native: false,
+ } );
...
+         isCollapsed={ isAlignmentToolbarCollapsed }
...
+       textAlign={ textAlign }
...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions