diff --git a/CHANGELOG.md b/CHANGELOG.md index af94e4e4..9dff9fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,9 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. -### Bugfixes +### Changes -- Discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This is fixed now. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko +- Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko diff --git a/docs/elements.rst b/docs/elements.rst index eb70f9ad..0b4eb08c 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -84,7 +84,7 @@ Inline style examples: .. code-block:: php $fontStyle = array('name' => 'Times New Roman', 'size' => 9); - $paragraphStyle = array('align' => 'both'); + $paragraphStyle = array('alignment' => 'both'); $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); $textrun = $section->addTextRun(); @@ -100,7 +100,7 @@ Defined style examples: $phpWord->addFontStyle('fStyle', $fontStyle); $text = $section->addText('Hello world!', 'fStyle'); - $paragraphStyle = array('align' => 'center'); + $paragraphStyle = array('alignment' => 'center'); $phpWord->addParagraphStyle('pStyle', $paragraphStyle); $text = $section->addText('Hello world!', 'pStyle'); @@ -130,7 +130,7 @@ Paragraph style Available paragraph styles: -- ``align`` Paragraph alignment, *left*, *right* or *center* +- ``alignment`` Paragraph alignment, *left*, *right* or *center* - ``spaceBefore`` Space before paragraph - ``spaceAfter`` Space after paragraph - ``indent`` Indent by how much diff --git a/docs/src/documentation.md b/docs/src/documentation.md index 36c8ad6b..d4c64051 100644 --- a/docs/src/documentation.md +++ b/docs/src/documentation.md @@ -517,7 +517,7 @@ Inline style examples: ```php $fontStyle = array('name' => 'Times New Roman', 'size' => 9); -$paragraphStyle = array('align' => 'both'); +$paragraphStyle = array('alignment' => 'both'); $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); $textrun = $section->addTextRun(); @@ -533,7 +533,7 @@ $fontStyle = array('color' => '006699', 'size' => 18, 'bold' => true); $phpWord->addFontStyle('fStyle', $fontStyle); $text = $section->addText('Hello world!', 'fStyle'); -$paragraphStyle = array('align' => 'center'); +$paragraphStyle = array('alignment' => 'center'); $phpWord->addParagraphStyle('pStyle', $paragraphStyle); $text = $section->addText('Hello world!', 'pStyle'); ``` @@ -853,7 +853,7 @@ Available font styles: Available paragraph styles: -- `align` Paragraph alignment, *left*, *right* or *center* +- `alignment` Paragraph alignment, *left*, *right* or *center* - `spaceBefore` Space before paragraph - `spaceAfter` Space after paragraph - `indent` Indent by how much