1.0.17 • Published 5 years ago

samushi-clipboard-react v1.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
5 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

5 years ago

1.0.16

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago