Update prism js version
Use latest version of prism, add json formatter, copy to clipboard plugin, and line-numbers. Now the clipboard js is automatically loaded by prism it it not included and the buttons are automatically initialized. Though I added some css to match the previous style.
This commit is contained in:
@@ -7,19 +7,6 @@
|
||||
.replace(/=+$/, ``);
|
||||
}
|
||||
|
||||
var htmlClipboard = new Clipboard('#copy-html-button');
|
||||
htmlClipboard.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
});
|
||||
var jsClipboard = new Clipboard('#copy-js-button');
|
||||
jsClipboard.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
});
|
||||
var pkgClipboard = new Clipboard('#copy-pkg-button');
|
||||
pkgClipboard.on('success', function(e) {
|
||||
e.clearSelection();
|
||||
});
|
||||
|
||||
function fetchResource(resource) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const isImage = /\.(png|jpe?g|gif|tiff)$/.test(resource);
|
||||
|
||||
Reference in New Issue
Block a user