Title: Copy paragraphs · Issue #28 · Skelmis/python-docx · GitHub
Open Graph Title: Copy paragraphs · Issue #28 · Skelmis/python-docx
X Title: Copy paragraphs · Issue #28 · Skelmis/python-docx
Description: How can I copy the paragraphs of one document to another document or e.g. into a table cell? This was my current code, but always something is missing. Now the bullet list styles and the hyperlinks are gone. @staticmethod def docx_copy_p...
Open Graph Description: How can I copy the paragraphs of one document to another document or e.g. into a table cell? This was my current code, but always something is missing. Now the bullet list styles and the hyperlinks...
X Description: How can I copy the paragraphs of one document to another document or e.g. into a table cell? This was my current code, but always something is missing. Now the bullet list styles and the hyperlinks...
Opengraph URL: https://github.com/Skelmis/python-docx/issues/28
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Copy paragraphs","articleBody":"How can I copy the paragraphs of one document to another document or e.g. into a table cell?\n\nThis was my current code, but always something is missing. Now the bullet list styles and the hyperlinks are gone. \n\n```python\n @staticmethod\n def docx_copy_paragraph(source_paragraph: Paragraph, target_paragraph: Paragraph) -> None:\n \"\"\"\n Copy the content and formatting from source_paragraph to target_paragraph.\n\n Args:\n source_paragraph (Paragraph): The source paragraph to copy from.\n target_paragraph (Paragraph): The target paragraph to copy to.\n \"\"\"\n # Copy each run (text with formatting) from the source paragraph\n # to the target paragraph.\n for run in source_paragraph.runs:\n target_run = target_paragraph.add_run(run.text, run.style)\n\n source_run_property = run._r.get_or_add_rPr() # pylint: disable=protected-access\n new_run_property = copy.deepcopy(source_run_property)\n\n target_run._r.replace(target_run._r.get_or_add_rPr(), new_run_property) # pylint: disable=protected-access\n```","author":{"url":"https://github.com/BlueAndi","@type":"Person","name":"BlueAndi"},"datePublished":"2025-10-20T19:29:21Z","url":"https://github.com/Skelmis/python-docx/issues/28"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ece66fd-8aa3-c0cd-89b6-04f15d9fe320 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B422:370317:61251:7EA14:6AFF7C4E |
| html-safe-nonce | dfba18ec1da1e2fc7457ef7bb715ccae56efa78de3385631f8027b3f2a030512 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDIyOjM3MDMxNzo2MTI1MTo3RUExNDo2QUZGN0M0RSIsInZpc2l0b3JfaWQiOiIzNDM1OTA5MDk2MjU4MTA4NDk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 96e06da1399f3d3a63b63cc0afa25b4dc21af6b13b6ea1c8d780836a519ad052 |
| hovercard-subject-tag | issue:3533657045 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Skelmis/python-docx/28/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1ef5f697b6799582ae5dd84e1d22534638fbf9734a197243f3bf824b1b3d74b/Skelmis/python-docx/issues/28 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1ef5f697b6799582ae5dd84e1d22534638fbf9734a197243f3bf824b1b3d74b/Skelmis/python-docx/issues/28 |
| og:image:alt | How can I copy the paragraphs of one document to another document or e.g. into a table cell? This was my current code, but always something is missing. Now the bullet list styles and the hyperlinks... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BlueAndi |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5a2047dbbde77e0ba2f8dfd78621e8a7313a105f7437ca693fcccd16cd137ee |
| turbo-cache-control | no-preview |
| go-import | github.com/Skelmis/python-docx git https://github.com/Skelmis/python-docx.git |
| octolytics-dimension-user_id | 47520067 |
| octolytics-dimension-user_login | Skelmis |
| octolytics-dimension-repository_id | 842909080 |
| octolytics-dimension-repository_nwo | Skelmis/python-docx |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842909080 |
| octolytics-dimension-repository_network_root_nwo | Skelmis/python-docx |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83e3dfa4de364d61589204ed35e53b2b7f77fba2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width