Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref field support #2207

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

crystoline
Copy link

@crystoline crystoline commented Mar 23, 2022

Description

PHPOffice/PHPWord currently does not support adding the field of type REF.
I would like to add a field to reference a bookmark

Fixes # (issue)

  • Add REF options to $fieldsArray in PhpOffice\PhpWord\Element\Field.php
  • Added writeRef method to Handle REF options
$textRun->addField('REF', [
      'name' => 'my-bookmark'
  ], [
      'InsertParagraphNumberRelativeContext',
      'CreateHyperLink',
  ]);

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

@crystoline crystoline marked this pull request as ready for review March 24, 2022 09:31
@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:08
@waltertamboer
Copy link
Contributor

@PowerKiKi Would you be willing to review this PR? That would be much appreciated 👍

@Progi1984 Progi1984 force-pushed the master branch 3 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
@Progi1984 Progi1984 added this to the 2.0.0 milestone Nov 30, 2023
@coveralls
Copy link

Coverage Status

coverage: 96.658% (-0.6%) from 97.217%
when pulling 195a326 on crystoline:ref-field-support
into 8b891bb on PHPOffice:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants