mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-05 00:29:48 +03:00
Copy Paste Page with Multiple Images #382
Open
opened 2026-02-04 19:15:41 +03:00 by OVERLORD
·
33 comments
No Branch/Tag Specified
development
l10n_development
further_theme_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
No Label
🛠️ Enhancement
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#382
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @s0n- on GitHub (Jul 25, 2017).
For Feature Requests
Desired Feature:
When Copy pasting pages or word documents, images do not paste over, only text. Images have to be copied one by one.
https://github.com/BookStackApp/BookStack/search?utf8=%E2%9C%93&q=paste+images&type=
Here I see there is some javascript that sets enable data paste to false, could this be a setting to fix it?
For Bug Reports
Expected Behavior
Entire documents paste with multiple images
Actual Behavior
Only text pastes
@s0n- commented on GitHub (Aug 15, 2017):
I have tested with the latest version .17.4 and multiple image pasting does not work as well.
@s0n- commented on GitHub (Aug 15, 2017):
Changing that to true on that page worked and now I can paste multiple images
Closing and leaving comment
@s0n- commented on GitHub (Aug 16, 2017):
This did not fix the issue, it was a user error and I was copy pasting images from a website so it took it pointed to the URLS.
I can do this in other platforms, not sure why it wont work here.
@ssddanbrown commented on GitHub (Aug 17, 2017):
@s0n- There's code built in to specifically handle image paste, It's not an in-built feature of browsers or anything, So It's likely the code needs to be updated to handle this.
I'd prefer to leave data paste disabled as It can make pages extremely large since images become embedded in the HTML of the page.
@paraiciam commented on GitHub (Aug 22, 2017):
I would really like to add my support for this enhancement. The beauty of enabling this is that migration from multiple Word doc repos is made so much easier. We have hundreds of Word docs we would love to migrate to Bookstack and this feature is holding us back.
Otherwise great app.
@paraiciam commented on GitHub (Aug 22, 2017):
Or maybe you can allow a configurable setting for those who do want it.
@s0n- commented on GitHub (Sep 25, 2017):
Just wanted to come back and touch on this request. Migrating from word documents or other sites is tedious and holding back my team from fully committing to bookstack.
@paraiciam commented on GitHub (Oct 19, 2017):
Any feedback on this request?
@s0n- commented on GitHub (Oct 19, 2017):
yeah, i think this is super important to create pages from other docs..
@Beinish commented on GitHub (Jan 9, 2018):
Did you find a solution to this?
@s0n- commented on GitHub (Jan 9, 2018):
I did not, it is rather frustrating creating and migrating docs into Bookstack. It is definitely the largest hurdle I face getting the team completely bought in.
@paraiciam commented on GitHub (Jan 9, 2018):
Hi
yeah I agree. It is a killer missing feature.
We will probably drop it for now until it gets fixed.
Rgds
Paraic
On Tue, Jan 9, 2018 at 2:44 PM, s0n- notifications@github.com wrote:
@Abijeet commented on GitHub (Jan 9, 2018):
Can you guys give a sample doc file? I put images in a doc file and pasted it, and it works as expected but then I'm on a Linux machine.
@Beinish commented on GitHub (Jan 11, 2018):
I installed the app using the script for Ubuntu.
I have MHT, word, rich text files with text and images in them and it just won't work no matter what I try. So really any doc wouldn't work for me. Should I try to reinstall it or something?
@ptitboogy commented on GitHub (Jan 11, 2018):
Hello,
I also have the same behaviour.
I did a lot of test :
OS : Windows 7 and Windows 10
Browser : IE, Edge and Firefox
Source copy : Microsoft Word 2016, LibreOffice, MHTML file opened from Edge.
Each time, the images are not copied to BookStack.
As the other people, this problem is blocking us to migrate from our current documentation repository to Bookstack.
Regards,
@paraiciam commented on GitHub (Jan 11, 2018):
Hi
I just did a test and have the same result - I click Ctrl-A and copy all
content and then do a Paste in a New Page and only text gets transferred.
Word 2013 and Word 2010 with latest bookstack.
I can individually copy each image in a doc file and that will paste fine
and no problems pasting.
Copying from a html page with images is hit and miss - some images copy but
the page is not well formatted.
Paraic
On Thu, Jan 11, 2018 at 10:42 AM, ptitboogy notifications@github.com
wrote:
@paraiciam commented on GitHub (Jan 15, 2018):
Some text.docx
Sample file attached which is not working. On ly the words "Some text" get copied. The images can be copied afterwards by selecting them one by one and pasting them in.
Paraic
@Abijeet commented on GitHub (Jan 15, 2018):
I unfortunately do not have access to MS-Office. I'm unable to reproduce this using LibreOffice. When I try to copy from Google Drive, I do see an error.
Are you guys seeing that error when you try to upload?
@ssddanbrown - If they are not getting an error, my guess would be with this line of code,
5b075aa9bd/resources/assets/js/pages/page-form.js (L14)I guess the way we are checking for image files may need to be tweaked.
@paraiciam commented on GitHub (Jan 16, 2018):
Hi Abijeet
No I don't see an error when pasting - it just ignores the images and
pastes the text..
Rgds
Paraic
On Mon, Jan 15, 2018 at 4:22 PM, Abijeet Patro notifications@github.com
wrote:
@Beinish commented on GitHub (Jan 16, 2018):
I also do not see an error. The images simply do not paste. Tried MHTML, word, rich text.
@ssddanbrown commented on GitHub (Jan 17, 2018):
@Abijeet Don't think it's necessarily that line of code. That simply skips past non-image clipboard data since the code below it is only for images.
I've had a play about with this. For reference I'm using LibreOffice on Ubuntu 17.10 and chrome for testing.
Upon paste, the data is exposed to JavaScript in three formats:
So RTF contains the data but is the most awkward format to process to get the target HTML output. Parsing the RTF data will be a tricky task and there's not many mature RTF to HTML libraries out there.
Even then, this may be different on word and other browsers may handle this differently, RTF is not a required format in the ClipboardAPI spec so other browsers may not expose this, Will need to check.
Think there's a reason why TinyMCE has advanced word-pasting as a premium plugin. That said, From their plugin demo the same output occurred, No images.
@paraiciam commented on GitHub (Jan 17, 2018):
thanks for the update Dan.
Will this be flagged an an upcoming feature? It would be a gamechanger for sure for html editors to have this feature.
paraic
@Abijeet commented on GitHub (Jan 17, 2018):
Hey @ssddanbrown,
The reason I thought that line might need to change is because when copy pasting from Google Docs, the type for images was reported as
application/x-vnd.google-docs-image-clip+wrappedbutitems[i].getAsFile();returned null which caused that error to appear.Since copy pasting from doc file copy was not triggering an error for the others, I figured that we could try tweaking the type to see if we were able to extract the image from it.
@Beinish commented on GitHub (Mar 18, 2018):
Hey guys, any update on this issue?
@ssddanbrown commented on GitHub (Mar 18, 2018):
No, Not really. Blocked by being a technically very difficult.
There is a new browser ClipBoard API in draft that will start to be implemented in browsers soon but no guarantees this will make things easier.
@Zyzto commented on GitHub (Oct 7, 2020):
is there any update regarding this as all editors on web browsers can do this.
@ssddanbrown commented on GitHub (Oct 7, 2020):
No update, have not spent time re-checking the state of this since. Any insight or examples would be appreciated.
@Zyzto commented on GitHub (Oct 14, 2020):
I see bookstack using tinyMCE there's' plugin powerPaste it's premium ik, do they not provide free license for opensource projects?
there's CKEditor that provide that : https://ckeditor.com/wysiwyg-editor-open-source/index.html
@kirillnad commented on GitHub (Dec 15, 2020):
Paid plugin for TinyMCE "Paste from Word":
https://www.tiny.cloud/docs-4x/enterprise/paste-from-word/
@EvoXCX commented on GitHub (May 6, 2024):
Issue still open since 2017 no progress on this side ?
It's a basic feature (basic doesn't mean easy to setup), so it's very tedious to migrate documentation to Bookstack.
Is there plan to support this feature or this is a "abandoned issue" ?
Thanks 😄
@ssddanbrown commented on GitHub (May 6, 2024):
@EvoXCX No, I personally haven't dug back into this since my previous comments above.
If you're mainly working with docx files then this hack may help during the migration process: https://www.bookstackapp.com/hacks/wysiwyg-docx-import/
@spoonerarthur commented on GitHub (Jun 16, 2024):
I'm searching for a OpenSource Wiki and found BookStack.
At the moment I have a OneNote 2016 Wiki in local Database / notebook.
I can export the notebook to MHT Files.
Is it possible to import this files to BookStack?
@likwid101 commented on GitHub (Jan 1, 2026):
Wondering if the ability to change from a linked image to a downloaded image can be an "in between" solution... meaning, if the process stays with the current pasted solution auto linking to the source content and then allowing the user to edit the image and click on a download button that then saves it local and replaces the URL with the saved image. I'll paste an image of where I'm speaking about. This would be huge in allowing for the current system to exist but allow users to save the images