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.
To enable or disable the copy code feature:
-
Select Layout in the top menu.
-
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.