Loading
- The data should be loaded with:
- first paragraph with default (left) alignment,
- second paragraph aligned to right,
- third paragraph should be centered,
- fourth paragraph should be justified,
- an image with caption between first and second paragraphs.
- Toolbar should have four buttons for alignment control: left, right, center and justify.
Testing
You should be able to:
- Change alignment on any paragraph.
- Change alignment on any selection of paragraphs.
You should not be able to change alignment of figcaption by:
- Placing cursor inside caption.
- Selecting image with other paragraphs.
You should be able to create blocks that can be aligned:
- paragraphs
- headings
- lists
Alignment UI should:
- highlight "left" button when selection is inside left aligned block (default one)
- highlight "right" button when selection is inside right aligned block
- highlight "center" button when selection is inside centered block
- highlight "justify" button when selection is inside justified block
- be disabled if in figcaption
- only one button should be active at once