New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fullcalendar-copy-paste

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fullcalendar-copy-paste

The Plugin expands for FullCalendar, which aims to add copy and paste features using shortcuts.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
5
-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

FullCalendar Copy-paste Plugin

The Plugin expands for FullCalendar, which aims to add copy and paste features using shortcuts.

ActionsWindowMacDescription
CopyCtrl + CCmd + CSelect event to copy.
CutCtrl + XCmd + XSelect event to cut.
PasteCtrl + VCmd + VOr you can press Enter or Click to paste.
DuplicateCtrl + DCmd + DInstantly clone an event.
CancelESCESCOr click on the location outside the Calendar.

Installation

  • Install this library in your project.
npm i fullcalendar-copy-paste

  • Use the plugin.
import copyPastePlugin from 'fullcalendar-copy-paste'

new Calendar(calendarEl, {
  plugins: [copyPastePlugin],
  height: "100%",
}

Configuration

FieldsTypeDescription
previewCopyBooleanDefault: true, Set false if the u wants to catch the event without wanting the view to change.
eventCopyCallbackUsed when you want tho track changes of new and old events.

Exp:

new Calendar(calendarEl, {
  plugins: [copyPastePlugin],
  height: "100%",
  previewCopy: false,
  eventCopy: (trigger) => {
    const oldEvent = trigger.oldEvent;
    const newEvent = trigger.event;
    const type = trigger.type;
    if (trigger.type === 'copy') {
      // do something
    } else if (trigger.type === 'cut') {
      // do something
    }
  }
});

API:

API for external code:

window.calendarUtils.copy(element as HTMLElement)

window.calendarUtils.cut(element as HTMLElement);

Demo:

Copy:

Copy


Cut:

Copy


Duplicate:

Copy


Contributor: ToanNguyen

@Classfunc

Keywords

fullcalendar

FAQs

Package last updated on 16 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts