index.md - v3.0.0

clipboard-parser

A tool to read the clipboard and parse out the table data. Support for parsing @RequestParam/@ApiModelProperty interfaces to define code, Word, Excel and other form-like data

[![NPM version][npm-image]][npm-url] [![Codacy Badge][codacy-image]][codacy-url] [![Test coverage][codecov-image]][codecov-url] [![npm download][download-image]][download-url] [![gzip][gzip-image]][gzip-url] [![License][license-image]][license-url]

[![Sonar][sonar-image]][sonar-url]

DocumentationChange Log

Installing

# use pnpm
$ pnpm install clipboard-parser

# use npm
$ npm install clipboard-parser --save

# use yarn
$ yarn add clipboard-parser

Usage

<!-- demo.vue -->
<template>
<textarea @paste="handlePaste"></textarea>
</template>

<script>
import clipboardParser from 'clipboard-parser'

export default {
methods: {
handlePaste(e) {
const result = clipboardParser(e)
// ...
}
}
}
</script>

Using unpkg CDN:

<body>
<textarea onpaste="handlePaste"></textarea>
</body>
<script src="https://unpkg.com/clipboard-parser@3.0.0/dist/index.global.prod.js"></script>
<script>
function handlePaste(event) {
const data = clipboardParser(event)
}
</script>

Demos

1. Parsing JAVA code containing the interface definition of

Generated using TypeDoc