Skip to content

Markdown / HTML exporter and hidden blocks #434

Closed

Description

@YousefED

Perhaps the "default" exporter should skip hidden / invisible blocks:

          Shouldn't this be a paragraph with "Add image"? I guess it's probably because the markdown conversion prioritizes the `img` element even if it has `display: none`. Worth changing to unmount instead of using `display: none`?

Originally posted by @matthewlipski in #428 (comment)

Activity

  1. self-assigned this
    on May 28, 2024
  2. added
    needs-triage
    on Feb 3, 2026
  3. woutervroege commented on Feb 10, 2026

    @woutervroege
    Contributor

    @YousefED If still relevant, could you clarify what's broken here?

  4. added
    needs-triage
    and removed
    needs-triage
    on Feb 10, 2026
  5. YousefED commented on Feb 10, 2026

    @YousefED
    CollaboratorAuthor

    Currently, when you add an image, an Image placeholder with "Add Image" is added to the document. When converting to markdown, this now shows "Add Image" as paragraph". I think at the time of creating this issue the export would be "placeholder", so "Add Image" is an improvement imo. We could argue the text "Add Image" should also not occur in the export.

    https://playground.blocknotejs.org/interoperability/converting-blocks-to-md:

    Image
  6. woutervroege commented on Feb 10, 2026

    @woutervroege
    Contributor

    Thanks for clarifying. I'd consider this to be a placeholder value and should therefore not be rendered in the exported markdown.

  7. added
    bug:P3
    and removed
    needs-triage
    on Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions