Skip to content

Disappearing images in markdown widget #7575

@KevinEtchells

Description

@KevinEtchells

Describe the bug
When I add an image to a markdown widget and then edit as Markdown. Switching back to "Rich Text" means the image disappears. This seems to have crept in in release 3.8.0. 3.7.2 is fine.

To Reproduce

  1. Add an image to a markdown widget
  2. Switch from "Rich Text" mode to "Markdown" mode
  3. Add some text in Markdown mode
  4. Switch back to Rich Text mode

Expected behavior
To still see the image in the editor, along with the Alt Text and Title fields

Screenshots
Markdown mode:
Image

Rich Text mode after adding some markdown:
Image

Applicable Versions:
v3.8.0 onwards

CMS configuration
Here's a simplified config I have replicated the issue with:

backend:
  name: test-repo
  repo: *****
  use_graphql: true
  squash_merges: true
publish_mode: editorial_workflow
media_folder: "static/images/uploads"
public_folder: "/images/uploads"

collections:
      
  - label: "Use cases"
    name: "use_cases"
    folder: "content/use_cases"
    create: true
    slug: "{{title}}"
    fields: 
      - label: "Title"
        name: "title"
        widget: "string"
      - label: "Challenge"
        name: "challenge"
        widget: "markdown"
        buttons: ["bold", "italic", "code", "link", "quote", "bulleted-list", "numbered-list"]
        required: false

Additional context
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions