adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

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

Open fzerman opened this issue 1 year ago • 4 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,
        }),
      ],
    },

fzerman avatar Feb 13 '24 10:02 fzerman

Same problem here, any workaround?

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

bitpickle avatar May 21 '24 18:05 bitpickle

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

fzerman avatar May 24 '24 23:05 fzerman

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

could you share your process?

bbjansen avatar Jul 09 '24 09:07 bbjansen

of course, i can share. But i am busy these days. This period a little bit long.

fzerman avatar Jul 11 '24 08:07 fzerman