[PR #4157] [CLOSED] Add support to import docx file for page creation #6316

Closed
opened 2026-02-05 10:29:07 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4157
Author: @shankar-d-simform
Created: 4/4/2023
Status: Closed

Base: developmentHead: add-support-to-import-docx-file


📝 Commits (1)

  • 4f007d5 Add support to import docx file for page creation

📊 Changes

50 files changed (+368 additions, -1 deletions)

View changed files

📝 app/Actions/ActivityType.php (+2 -0)
📝 app/Entities/Repos/BookRepo.php (+13 -0)
📝 app/Entities/Tools/TrashCan.php (+12 -0)
📝 app/Http/Controllers/BookController.php (+84 -1)
📝 app/Http/Controllers/Controller.php (+5 -0)
📝 lang/ar/common.php (+4 -0)
📝 lang/bg/common.php (+4 -0)
📝 lang/bs/common.php (+4 -0)
📝 lang/ca/common.php (+5 -0)
📝 lang/cs/common.php (+5 -0)
📝 lang/cy/common.php (+5 -0)
📝 lang/da/common.php (+5 -0)
📝 lang/de/common.php (+5 -0)
📝 lang/de_informal/common.php (+5 -0)
📝 lang/el/common.php (+5 -0)
📝 lang/en/common.php (+5 -0)
📝 lang/es/common.php (+5 -0)
📝 lang/es_AR/common.php (+5 -0)
📝 lang/et/common.php (+5 -0)
📝 lang/eu/common.php (+5 -0)

...and 30 more files

📄 Description

  • Added a feature to import DOCX files for page creation. We will count the number of heading tags (H1) to determine the page titles, and the content within each tag's child elements will become the respective page's content. For example, if there are 7 heading tags, we will create 7 pages for the corresponding book.

  • When editing a book, if we upload a new DOCX file, we have two options: create new pages or append to the existing ones. If we select 'create new pages', we will delete all the existing pages of the respective book and create new ones. If we choose the second option, we will simply append the new pages to the existing ones.

image

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/4157 **Author:** [@shankar-d-simform](https://github.com/shankar-d-simform) **Created:** 4/4/2023 **Status:** ❌ Closed **Base:** `development` ← **Head:** `add-support-to-import-docx-file` --- ### 📝 Commits (1) - [`4f007d5`](https://github.com/BookStackApp/BookStack/commit/4f007d56100ec20a3aa3caab045cd40432654cd6) Add support to import docx file for page creation ### 📊 Changes **50 files changed** (+368 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Actions/ActivityType.php` (+2 -0) 📝 `app/Entities/Repos/BookRepo.php` (+13 -0) 📝 `app/Entities/Tools/TrashCan.php` (+12 -0) 📝 `app/Http/Controllers/BookController.php` (+84 -1) 📝 `app/Http/Controllers/Controller.php` (+5 -0) 📝 `lang/ar/common.php` (+4 -0) 📝 `lang/bg/common.php` (+4 -0) 📝 `lang/bs/common.php` (+4 -0) 📝 `lang/ca/common.php` (+5 -0) 📝 `lang/cs/common.php` (+5 -0) 📝 `lang/cy/common.php` (+5 -0) 📝 `lang/da/common.php` (+5 -0) 📝 `lang/de/common.php` (+5 -0) 📝 `lang/de_informal/common.php` (+5 -0) 📝 `lang/el/common.php` (+5 -0) 📝 `lang/en/common.php` (+5 -0) 📝 `lang/es/common.php` (+5 -0) 📝 `lang/es_AR/common.php` (+5 -0) 📝 `lang/et/common.php` (+5 -0) 📝 `lang/eu/common.php` (+5 -0) _...and 30 more files_ </details> ### 📄 Description - Added a feature to import DOCX files for page creation. We will count the number of heading tags (H1) to determine the page titles, and the content within each tag's child elements will become the respective page's content. For example, if there are 7 heading tags, we will create 7 pages for the corresponding book. - When editing a book, if we upload a new DOCX file, we have two options: create new pages or append to the existing ones. If we select 'create new pages', we will delete all the existing pages of the respective book and create new ones. If we choose the second option, we will simply append the new pages to the existing ones. ![image](https://user-images.githubusercontent.com/128118386/229775625-093d2c89-b7cb-4c90-b6f5-758986ecc79c.png) ![image](https://user-images.githubusercontent.com/128118386/229776132-6a51aab4-cfd1-428a-a9d5-d0f75451af6b.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:29:07 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6316