Copy Code to Clipboard
Paligo has a Copy to Clipboard feature that you can use with your code samples.
When the feature is enabled, a copy button appears for each programlisting element, and your readers can use it to copy the code sample inside the element to their computer's clipboard. This makes it easier for your readers to use the exact code from your samples as a starting point for their own programs.
![A section of a topic in an HTML output. There is a code sample in the content, and to the right of the code, a copy to clipboard icon.](image/uuid-97d840d9-e4dc-2733-f69d-04a9320bd9ec.jpg)
Copy button for all programlisting
elements.
To enable or disable the copy code feature:
-
Select Layout in the top menu.
Paligo displays a list of Layouts. The list is empty if there are no custom Layouts in your Paligo instance.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Analytics and other integrations in the sidebar.
-
Disable Enable MathJax equation rendering.
-
Select Verbatim (code and software) in the sidebar.
-
Use the Add copy to clipboard button to all programlistings to control whether the copy button is included:
-
Set it to 1 to include the copy button for every
programlisting
element in your HTML5 output. -
Set it to 0 or default if you do not want to include it.
-
-
Select Save.
When you publish your content using this layout, the programlisting
s will have a copy button if you chose to enable the feature.