Docs
Serializing CSV

Serializing CSV

Copy paste from CSV to Slate.

Deserialize CSV

Copy and paste CSV content into a table.

Features

  • Convert CSV content to a Slate value.

Installation

npm install @udecode/plate-serializer-csv

Usage

CSV -> Slate

import { createDeserializeCsvPlugin } from '@udecode/plate-serializer-csv';
 
const plugins = [
  // ...otherPlugins,
  createDeserializeCsvPlugin(),
];

API

createDeserializeCsvPlugin

Attributes

Collapse all

    Options.

    The tolerance for errors in the CSV data, represented as a percentage in decimal form. This value is calculated as the ratio of errors to the total number of rows.

    • Default: 0.25 (This indicates that up to 25% of the rows can contain errors.)

    Options to be passed to the PapaParse library for parsing CSV data.

    • Default: { header: true } (Indicating that the first row of the CSV data should be treated as a header.)

    Refer to PapaParse documentation for more details about these options.

deserializeCsv