1.0.17 • Published 3 years ago

samushi-clipboard-react v1.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

React copy clipboard code

Syntax highlighting your code on the blog and make it easy to copy with just one click

How to install

npm i samushi-clipboard-react

Example

import React from 'react';
import ReactDOM from 'react-dom';
import {Copyclipboard} from 'samushi-clipboard-react';

const code = `
const javascriptVariable = "this code need to work";
console.log(javascriptVariable);
`;

class App extends React.Component {
  render() {
    return (
      <div>
        <Copyclipboard copyText={code}/>
      </div>
    );
  }
}

How to use

How to use

Options

copyText: String

Highlighted code text

language: String

Which code language is used in copyText

showLines: Boolean

Show or hide line numbers

Supported Language

  • JavaScript - javascript, js
  • CSS - css
  • Markup - markup, html, xml, svg, mathml, ssml, atom, rss
  • PHP - php
  • PHPDoc - phpdoc
  • YAML - yaml, yml
  • Go - go
  • React JSX - jsx
  • React TSX - tsx
  • etc.

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago