Markdown and Media/image usage

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Stolzenhain's picture

Hello!
This post is just me trying to assemble some knowledge and best practice on using WYSIWYG alternatives (namely Markdown) without sacrificing regular content creation strategies like image inserts.

Obviously, as this is non-WYSIWYG, if someone proposes a group or documentation page that suits this topic better, I'll glady move this info someplace else.

WYIWYG approach: Media Module + WYSIWYG

  • This has been well documented and is the proposed approach

cons

  • for content-heavy sites I found this approach to make content creation harder for less experienced editors
  • relies on external libraries + WYSIWYG framework

Method 1: Image Fields + Insert

setup

pros

  • dead simple
  • no additional libraries / editors needed
  • possibly better integration with existing image fields

cons

  • images can't be handled via media module, meaning
  • method is constrained to file usage (e.g. no video inserts)
  • raw HTML gets inserted in Markdown content (instead of tokens or Markdown image tags)
  • images get inserted with ?itok hash which break when using CDNs / different hosts (e.g. on test installations or domain changes)
  • Javascript-dependent

Method 2: Media Module + BU Editor

setup

pros

  • integration with media system: better UI, future-proof
  • possibly better integration with existing media fields
  • use all media types, including videos
  • token system makes media links more flexible (e.g. host changes work flawlessly, images can be exchanged on the fly)
  • tokens are potentially more readable in content

cons

  • dependency on BUEditor
  • button solution currently only via custom module
  • Javascript-dependent

Wysiwyg

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: