Coder Social home page Coder Social logo

table-copy-vanilla's Introduction

table-copy-vanilla

Allows users to select a portion of html tables and copy the content. The contents can be pasted in excel or excel compatible softwares.

Demo

Final.mp4

Installation

npm

npm i table-copy-vanilla

yarn

yarn add table-copy-vanilla

CDN

Dev Usage

import {tableCopy} from 'table-copy-vanilla'
import 'table-copy-vanilla/dist/style.css' // For default styling

tableCopy();

User Usage

  1. Ctrl+Click on a table cell to begin
  2. Move with Arrow keys to select cells
  3. CTRL+C to copy data
  4. Esc to remove selection
  5. Mouse click without CTRL key inside the table also removes selection

Tips

  1. Press CTRL + ArrowKeys to select 100 row/columns at a time
  2. Press Shift + ArrowKeys to select 10 rows/columns at a time
  3. Press CTRL + Shift + ArrowKeys to select 1000 row/columns at a time

Focused Element Behavior

If a input element was focused before starting the table selection, the focus will be removed from the element. The focus is restored with the user cancels the selection. Either via ESC or by mouse press without CTRL pressed

Samples

  1. Svelte: https://github.com/RehmatFalcon/table-copy-samples/tree/master/svelte

table-copy-vanilla's People

Contributors

code-sujan avatar rehmatfalcon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.