quill_delta 1.0.0-dev.4.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 82

Build Status Pub

Implementation of Quill editor Delta format in Dart. Refer to official documentation for more details.

Usage

import 'package:quill_delta/quill_delta.dart';

void main() {
  var doc = new Delta()..insert('Hello world', {'h': '1'});
  var change = new Delta()
    ..retain(6)
    ..delete(5)
    ..insert('Earth');
  var result = doc.compose(change);
  print('Original document:\n$doc\n');
  print('Change:\n$change\n');
  print('Updated document:\n$result\n');

  /// Prints:
  ///
  ///     Original document:
  ///     ins⟨Hello world⟩ + {h: 1}
  ///
  ///     Change:
  ///     ret⟨6⟩
  ///     ins⟨Earth⟩
  ///     del⟨5⟩
  ///
  ///     Updated document:
  ///     ins⟨Hello ⟩ + {h: 1}
  ///     ins⟨Earth⟩
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

1.0.0-dev.4.0

  • Internal clean-up replacing hardcoded strings with constants.

1.0.0-dev.3.0

  • Updated dependency on quiver_hashcode.

1.0.0-dev.2.0

  • Prepare for Dart 2 stable.

1.0.0-dev.1.0

  • Initial release.

example/main.dart

// Copyright (c) 2018, Anatoly Pulyaevskiy. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:quill_delta/quill_delta.dart';

void main() {
  var doc = new Delta()..insert('Hello world', {'h': '1'});
  var change = new Delta()
    ..retain(6)
    ..delete(5)
    ..insert('Earth');
  var result = doc.compose(change);
  print('Original document:\n$doc\n');
  print('Change:\n$change\n');
  print('Updated document:\n$result\n');

  /// Prints:
  ///
  ///     Original document:
  ///     ins⟨Hello world⟩ + {h: 1}
  ///
  ///     Change:
  ///     ret⟨6⟩
  ///     ins⟨Earth⟩
  ///     del⟨5⟩
  ///
  ///     Updated document:
  ///     ins⟨Hello ⟩ + {h: 1}
  ///     ins⟨Earth⟩
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  quill_delta: ^1.0.0-dev.4.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:quill_delta/quill_delta.dart';
  
Version Uploaded Documentation Archive
1.0.0-dev.4.0 Dec 12, 2018 Go to the documentation of quill_delta 1.0.0-dev.4.0 Download quill_delta 1.0.0-dev.4.0 archive
1.0.0-dev.3.0 Aug 29, 2018 Go to the documentation of quill_delta 1.0.0-dev.3.0 Download quill_delta 1.0.0-dev.3.0 archive
1.0.0-dev.2.0 Jul 26, 2018 Go to the documentation of quill_delta 1.0.0-dev.2.0 Download quill_delta 1.0.0-dev.2.0 archive
1.0.0-dev.1.0 Jun 14, 2018 Go to the documentation of quill_delta 1.0.0-dev.1.0 Download quill_delta 1.0.0-dev.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
75
Overall:
Weighted score of the above. [more]
82
Learn more about scoring.

We analyzed this package on Dec 12, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:quill_delta/quill_delta.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution, their API may change in breaking ways.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
collection ^1.14.5 1.14.11
quiver_hashcode ^2.0.0 2.0.0
Dev dependencies
test ^1.0.0