Skip to content

BJDev95/CopyToClipboard_Syntax_Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example for copying to Clipboard using Javascript with user input and syntax highlighting (mostly using Prism)

When creating 'clickable text' USE onClick="copyToClipboard(document.getElementById(this.id).innerHTML)"

By using 'this.id' you don't need to always change for matching ids!

Functions:

  • copy to clipboard with javascript (requires user input)
  • copy several bash cmds at once
  • syntax highlighting
  • OS detection

See: Prism.js and SyntaxHighlightGenerator

About

CopyToClipboard using javascript and user input (without flash) and syntax highliting (with prism.js)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors