SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js

Home Page:https://adminjs.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Image in Rich Text Editor not showing when I try re-editing

fzerman opened this issue · comments

Contact Details

I will watch this issue

What happened?

Adding images via rich text input is working and adding images to content via data URL. And in the record view page, I can see it.

After adding an image via rich text input:
image

When I click the "Edit", it disappears
image

Also when I see the current HTML code on edit page, there is no image
image

Bug prevalence

Image in Rich Text Editor not showing when I try re-editing

AdminJS dependencies version

"@adminjs/design-system": "^4.0.3",
"@adminjs/express": "^6.0.1",
"@adminjs/sequelize": "^4.0.0",
"@adminjs/upload": "^4.0.2",
"adminjs": "^7.3.0",

What browsers do you see the problem on?

No response

Relevant log output

All logs are relevant with i18next issues not any relevant log

Relevant code that's giving you issues

// BLOG NAVIGATION
    {
      resource: Post,
      options: {
        navigation: blogNavigation,
        properties: {
          content: {
            type: "richtext",
          },
          // thumbnail: {
          //   isVisible: false,
          // },
          createdAt: {
            isVisible: {
              edit: false,
              show: true,
            },
          },
          updatedAt: {
            isVisible: {
              edit: false,
              show: true,
            },
          },
        },
      },
      features: [
        uploadFileFeature({
          provider: {
            //@ts-ignore
            local: {
              bucket: "public/uploads",
              opts: {
                baseUrl: BASE_URL + "public/uploads",
              },
            },
          },
          uploadPath(record, filename) {
            return `blog/${record.id()}/${filename.replaceAll(" ", "-")}`;
          },
          properties: {
            key: "thumbnail",
            mimeType: "thumbnailMimeType",
          },
          componentLoader,
        }),
      ],
    },

Same problem here, any workaround?

in my case I am adding the image without url and it is being saved as base64

I solved this problem by implementing ckeditor with my custom image uploader.