Skip to content

how to export image(it's invalid when I imported by editorRef.current.activeEditor.commands.insertContent(<img src=${base64}>)) #790

Closed

Description

@rex-0085

image export not working when I use editorRef.current.activeEditor.commands.insertContent(<img src=${base64}>)

rendering was normal, I saw the image when insertContent

when I open the docx file, I found this and I clicked yes

ps:

  1. no error occur when I insertContent or export
  2. I tried to upload manual by toolbar Image item, which is exported normally
    3.superdoc 0.14.15

Activity

  1. jelkes1 commented on Aug 20, 2025

    @jelkes1
    Collaborator

    Thanks for flagging! @johanneswilm can you please take a look at this? Feel free to ask any follow-ups needed.

  2. johanneswilm commented on Aug 27, 2025

    @johanneswilm

    Confirmed.

    In addition to the above described case, this also happens when pasting the image into the editor. The fundamental issue is that images that are inserted this way do not go through the media registration and verification process processUploadedImage. Just registering the image in the right place would be a relatively simple addition. However, the verification process also ensures things like maximum image size with a potential image resizing. This is an asynchronous process, which requires a bit more consideration in how it's implemented than the purely synchronous registration.

    I'm on it.

  3. rex-0085 commented on Aug 28, 2025

    @rex-0085
    Author

    thanks for your feedback.

    Is there a temporary code method we can implement for now? users have already started using this application. thanks

    @johanneswilm

  4. johanneswilm commented on Aug 28, 2025

    @johanneswilm

    I cannot really think of a simple way of doing this just with client side code.

    I'll try to have a fix by tonight.

  5. johanneswilm commented on Aug 28, 2025

    @johanneswilm

    I've gotten quite far, but unfortunately not entirely there yet. I'll need to continue working on this tomorrow.

  6. rex-0085 commented on Aug 28, 2025

    @rex-0085
    Author

    Got it, it's ok in about a week. thank you so much

  7. added a commit that references this issue on Sep 1, 2025
    ba46c18
  8. harbournick commented on Sep 23, 2025

    @harbournick
    Collaborator

    🎉 This issue has been resolved in version 0.20.0-next.5 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  9. added 2 commits that reference this issue on Sep 23, 2025
    b444138
    70e5955
  10. harbournick commented on Sep 24, 2025

    @harbournick
    Collaborator

    🎉 This issue has been resolved in version 0.21.0-next.1 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  11. added a commit that references this issue on Sep 24, 2025
  12. harbournick commented on Sep 24, 2025

    @harbournick
    Collaborator

    🎉 This issue has been resolved in version 0.21.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions