Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Release: Mautic Audiences 1.1.5 — Minor update available for module mautic_audiences (1.1.5). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: RightUp 1.0.2 — Minor update available for module rightup (1.0.2). Release: CronWatch 0.12.1 — Minor update available for module cronwatch (0.12.1). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Copy Formatter module provides a copy field formatter for media referenced fields in Drupal 9/10. It allows users to copy the embedded media code with a single click and use it in other parts of their website or external applications. The module supports various media types, including images, videos, audios, PDFs, and remote videos.

Features

  • Provides a field formatter named "Copy" for media referenced fields.
  • Allows users to copy the embed code of the media.
  • Supports media types such as images, videos, audios, PDFs, and remote videos.
  • Renders the embed code in a format that can be easily copied and used.

Installation

  • Install and enable the Media module if it's not already enabled.
  • Install the Copy Formatter module.
  • Enable the module either through the Drupal administration interface or by using Drush:

drush en copy_formatter

Post-Installation

  • After enabling the module, navigate to the "Manage Display" page of the content type or entity bundle where you have media reference fields.
  • Select the "Copy" formatter for the desired media referenced fields.
  • Save the display settings.
  • When viewing a media entity with the selected formatter, users will see a copy button and on clicking the copy button, the embed code for that media will get copied.
  • Users can copy the embed code and use it in other parts of the website or external applications.

Additional Requirements

  • Drupal 9 / 10
  • Media module

Supported Media Types

The Copy Formatter module supports the following media types out of the box:

  • Image: Renders the image as an HTML img tag.
  • Video: Renders the video as an HTML video tag.
  • Audio: Renders the audio as an HTML audio tag.
  • PDF: Renders the PDF as an HTML iframe tag.
  • Remote Video: Renders the remote video URL as an HTML iframe tag.

Compatibility

The Copy Formatter module is compatible with Drupal's Entity Reference field and works with media reference fields on entities such as nodes, paragraphs, or custom entities.

Supporting this Module

If you encounter any issues or have questions about the module, please create an issue in the module's issue queue on drupal.org.

Community Documentation

Contributions to the module in the form of bug reports, patches, feature requests, translations, etc., are welcome. Please submit them via the module's issue queue on drupal.org.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jul 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.4-beta1 Pre-release Jul 10, 2023
1.0.2-beta1 Pre-release Jul 10, 2023
1.0.1-beta1 Pre-release Jul 6, 2023
1.0.0-beta1 Pre-release Jul 6, 2023