Skip to content

gpsblues/Publii-Plugin-Copy-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Publii Plugin: Copy Text

This plugin adds a copy feature to HTML text elements.

publii plugin

Features

The plugin adds a copy function to HTML elements with a custom class, featuring a small clickable icon in the top right corner. After copying, a brief popup notifies the user that the text has been copied to the clipboard. Various customizations are available.

Publii plugin screenshot

Installation and Usage

  • Download the .zip file of the latest plugin version from the release page.
  • Open Publii CMS and install the plugin.
  • Enable the plugin.
  • Set plugin options by clicking on its name.
  • Save, Preview, or Sync your website to see it in action.

In the plugin settings, define a custom class name (default is 'copy-text'). To enable the copy function, add this class to the HTML tag. The element with the applied class will display a copy icon in the top right corner.

<p class="copy-text">Lorem Ipsum is simply dummy text ...</p>

Copy text

Copy text

Copy text

The plugin allows for basic customizations, such as:

  • Icon type
  • Icon size
  • Text label
  • Copy confirmation message
  • Simple style adjustments

Be aware that existing theme styles might override the plugin settings. For greater control over these settings, you can use the Custom CSS section in Publii.

Note

If you want to enable the copy function for code snippets, I recommend using the official Syntax Highlighter plugin.

Disclaimer

This plugin is an unofficial extension for the Publii CMS. I do not assume any responsibility for potential issues or malfunctions that may occur while using this plugin. Additionally, support for this plugin is not guaranteed.

For official Publii resources, please visit the Publii CMS Official Repository.