Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Copy Formatter

No security coverage Under active development

The Copy Formatter module adds a "Copy" field formatter to media fields. This allows users to easily copy embed code for various media types like images, videos, audio, and PDFs to use elsewhere.

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.

Ask your assistant about Copy Formatter

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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 PHP Release date
1.0.4-beta1 Pre-release 9–10 Jul 10, 2023
1.0.2-beta1 Pre-release 9–10 Jul 10, 2023
1.0.1-beta1 Pre-release 9–10 Jul 6, 2023
1.0.0-beta1 Pre-release 9–10 Jul 6, 2023