[PR #908] [CLOSED] [WIP] Fixes the video export in PDF, HTML and Text #5736

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/908
Author: @Abijeet
Created: 7/1/2018
Status: Closed

Base: masterHead: fix/video-export


📝 Commits (6)

  • 0d1db98 Fixes issues with video tags in PDF, HTML and Text exports.
  • 5bee25d Fixes a few comments.
  • 27954d6 Added test to cover HTML export re-write
  • 5f113f3 Simplified code a little and renamed dynamicText variable
  • 8a2c137 Merge branch 'master' into fix/video-export
  • cc275c0 Refactored the code for ExportService to use DomDocument.

📊 Changes

6 files changed (+197 additions, -39 deletions)

View changed files

📝 app/Entities/ExportService.php (+129 -36)
app/Exceptions/ExportException.php (+6 -0)
📝 app/Http/Controllers/PageController.php (+4 -2)
📝 resources/lang/en/entities.php (+7 -1)
📝 resources/lang/en/errors.php (+3 -0)
📝 tests/Entity/ExportTest.php (+48 -0)

📄 Description

TinyMCE only fiddles around with certain URLs, see - 0f7a0f1266/src/plugins/media/main/ts/core/UrlPatterns.ts (L22)

For other URLs, TinyMCE just puts a video tag wrapped around a source tag. I handled that in the PDF and Text exports.

See attached files.

Not so sure if the code is very organized. Let's discuss and see if we can make it better.

I think we can also fix issues that might come if user's add an iframe.


🔄 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/908 **Author:** [@Abijeet](https://github.com/Abijeet) **Created:** 7/1/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/video-export` --- ### 📝 Commits (6) - [`0d1db98`](https://github.com/BookStackApp/BookStack/commit/0d1db982891da7861bb90d4928be59cb43b26f84) Fixes issues with video tags in PDF, HTML and Text exports. - [`5bee25d`](https://github.com/BookStackApp/BookStack/commit/5bee25d651db47cef1d2b14614a00bfadb6092a9) Fixes a few comments. - [`27954d6`](https://github.com/BookStackApp/BookStack/commit/27954d6bc625377da2ac70ad2d9dbe37b4561e59) Added test to cover HTML export re-write - [`5f113f3`](https://github.com/BookStackApp/BookStack/commit/5f113f3f528449eff4685a76dfb07d5af5d0c4c2) Simplified code a little and renamed dynamicText variable - [`8a2c137`](https://github.com/BookStackApp/BookStack/commit/8a2c13729e6ee72ef9b2e6c6523c435026e3933a) Merge branch 'master' into fix/video-export - [`cc275c0`](https://github.com/BookStackApp/BookStack/commit/cc275c0b53dea10c079f8df5cfd1863f2a29e4c3) Refactored the code for ExportService to use DomDocument. ### 📊 Changes **6 files changed** (+197 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `app/Entities/ExportService.php` (+129 -36) ➕ `app/Exceptions/ExportException.php` (+6 -0) 📝 `app/Http/Controllers/PageController.php` (+4 -2) 📝 `resources/lang/en/entities.php` (+7 -1) 📝 `resources/lang/en/errors.php` (+3 -0) 📝 `tests/Entity/ExportTest.php` (+48 -0) </details> ### 📄 Description TinyMCE only fiddles around with certain URLs, see - https://github.com/tinymce/tinymce/blob/0f7a0f12667bde6eae9377b50b797f4479aa1ac7/src/plugins/media/main/ts/core/UrlPatterns.ts#L22 For other URLs, TinyMCE just puts a `video` tag wrapped around a `source` tag. I handled that in the PDF and Text exports. See attached files. - Text - [tinymce-testing.txt](https://github.com/BookStackApp/BookStack/files/2153118/tinymce-testing.txt) - HTML - [tinymce-testing-html.txt](https://github.com/BookStackApp/BookStack/files/2153121/tinymce-testing-html.txt) - Github doesn't allow me to attach HTML file. - PDF - [tinymce-testing.pdf](https://github.com/BookStackApp/BookStack/files/2153116/tinymce-testing.pdf) Not so sure if the code is very organized. Let's discuss and see if we can make it better. I think we can also fix issues that might come if user's add an iframe. --- <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:15:40 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5736