A standalone example of a "Copy to clipboard" button

View the source (press CTRL+U in Chrome) of the page to get the code.

// Some text that is purely present in order to increase the size of the pre tags' content and force a horizontal scrollbar to be present. This way you can scroll left and right and the Copy button will stay where it is
new RGraph.Bar({
    id: 'cvs',
    data: [4,8,5,2,9,6,5,4,7,5,3,1],
    options: {
        colors: ['green']
    }
}).draw();
Copy