Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Not able to populate image on editor #5020

Closed
1 of 2 tasks
paraslamsong opened this issue Mar 31, 2024 · 3 comments
Closed
1 of 2 tasks

[Bug]: Not able to populate image on editor #5020

paraslamsong opened this issue Mar 31, 2024 · 3 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@paraslamsong
Copy link

paraslamsong commented Mar 31, 2024

Which packages did you experience the bug in?

Image

What Tiptap version are you using?

2.2.4

What’s the bug you are facing?

  const editor = useEditor({
    extensions: editorExtensions,
    content: data?.content?? "",
    enablePasteRules: true,
    parseOptions: { preserveWhitespace: true },
    editorProps: {
      markViews: {},
    },
  });

Here I am pre populating editor with html, I am using base64 image, but while the html is rendering but any image on the content is not displaying. PS: There is also no img tag on html inspection

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

I need to render all of the prepopulated data , including image and styling

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@paraslamsong paraslamsong added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Mar 31, 2024
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Mar 31, 2024
@henryStelle
Copy link
Contributor

Does your editorExtensions include something like:

image

Note: the allowBase64 is disabled by default.

@bdbch
Copy link
Member

bdbch commented Apr 6, 2024

Could you please give us more information about your editor setup? As @henryStelle already pointed out base64 images should work fine. I'll close for now until more information is provided.

@bdbch bdbch closed this as completed Apr 6, 2024
@github-project-automation github-project-automation bot moved this from Triage open to Done in Tiptap Apr 6, 2024
@uccmen
Copy link

uccmen commented Aug 8, 2024

what worked for me was I needed to set allowInline: true as well

Image.configure({ inline: true, allowBase64: true })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants