/quill-to-plaintext-js

📝 Converts a Quill Delta to plaintext - doesn't depend on Quill!

Primary LanguageJavaScriptMIT LicenseMIT

npm version

quill-to-plaintext

PHP Version

Converts a Quill Delta to plaintext. It will ignore any non-insert operations.

You can either supply the JSON for a Quill Delta, or a Quill Delta object itself.

Installation

Using npm:

$ npm install quill-to-plaintext

How to use

const QuillToPlaintext = require('chat-arg-parser');

QuillToPlaintext('{"ops":[{"insert":"Fixed problem with core files."}]}');
// => Fixed problem with core files.

let quill_delta = JSON.parse('{"ops":[{"insert":"Fixed problem with core files."}]}'); // this is emulating creating an actual Quill Delta object
QuillToPlaintext(quill_delta);
// => Fixed problem with core files.