Closed (won't fix)
Project:
Markdownify Content
Version:
1.1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2025 at 18:24 UTC
Updated:
22 Mar 2026 at 16:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jiisuominen commentedHey!
I liked this idea, but the patch didn't apply properly. So I rerolled this and made some minor improvements. Namely to add dropdown list for selecting view mode.
Comment #3
slattery commentedI made a sub module that uses the
hook_markdownify_entity_build_alterhook exposed by the markdownify api, with form alter functions that manage third party settings for view mode overrides globally per entity type, then down per bundle type if wanted.I will work more on this, including on getting into the normal gitlab/drupal cycle, either as a standalone, or if desirable, this could be a submodule next to file_attachment to be distributed with markdownify.
https://github.com/slattery/markdownify_viewmodes
Comment #6
medha kumariHi, I create MR for this. Please check and review. Thanks!
Comment #8
christophweber commentedMerged, thank you!
Comment #10
mxr576The new view_mode property could have been required at the config schema level, since it is required at the form level.
An update hook should have been also added to initialize this new property on existing sites.
These two together could eliminate this unnecessary nullability check in the code.
Btw, this could be only me, but the
// Use configured view mode if not explicitly provided.does not seems to be aligned with the surrounding code logic.Comment #12
christophweber commentedComment #15
christophweber commentedI reverted the commit and am closing this issue, because Drupal view modes as of today do not include page titles.
The original issue https://www.drupal.org/project/markdownify/issues/3512571 can remain as a roadmap item.
Page titles are important in 99% of all use cases for MarkDown output (or any Drupal output).
People wishing to have view mode support can still use the code from the MR fork https://git.drupalcode.org/issue/markdownify-3543406/-/tree/view_mode in conjunction with a contrib module such as Manage Display or Show Title.
Supporting view modes in Markdownify without additional dependencies will require deeper work in the original issue, or perhaps a change in Drupal Core.