Skip to content

Commit

Permalink
Release v1.14.0 (#247)
Browse files Browse the repository at this point in the history
* Release v1.14.0

* Small refactor in clipboard manager
  • Loading branch information
Amir-P authored Jan 26, 2024
1 parent 754f169 commit 5ef97c8
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 7 deletions.
8 changes: 6 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Parchment

## 1.11.0 > 1.12.0

* Change `FleatherController(document);` to `FleatherController(document: document);`

## 1.6.0 > 1.7.0

* Change `import 'package:parchment/convert.dart';` to `import 'package:parchment/codecs.dart';`
* Change `parchmentMarkdown.encode(delta);` to `parchmentMarkdown.encode(ParchmentDocument.fromDelta(delta));`
* Change `parchmentMarkdown.decode(markdown);` to `parchmentMarkdown.decode(markdown).toDelta()`
* Change `parchmentMarkdown.decode(markdown);` to `parchmentMarkdown.decode(markdown).toDelta();`
* Change `parchmentHtml.encode(delta);` to `parchmentHtml.encode(ParchmentDocument.fromDelta(delta));`
* Change `parchmentHtml.decode(html);` to `parchmentHtml.decode(html).toDelta()`
* Change `parchmentHtml.decode(html);` to `parchmentHtml.decode(html).toDelta();`
8 changes: 8 additions & 0 deletions packages/fleather/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.14.0

* Add `ClipboardManager` which can be used to implement rich clipboard
* Use overlay entries to prevent focus loss when selection color or heading in default toolbar
* Replace quill_delta package with parchment_delta
* [Fix] Caret movement issues
* [Fix] Caret painting on focus gain

## 1.13.2

* [Fix] pub.dev issues
Expand Down
2 changes: 1 addition & 1 deletion packages/fleather/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Add Fleather to your dependencies.
dependencies:
flutter:
sdk: flutter
fleather: ^1.13.2
fleather: ^1.14.0
```
## Usage
Expand Down
2 changes: 2 additions & 0 deletions packages/fleather/lib/src/services/clipboard_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class FleatherClipboardData {
bool get hasDelta => delta != null;

bool get hasPlainText => plainText != null;

bool get isEmpty => !hasPlainText && !hasDelta;
}

/// An abstract class for getting and setting data to clipboard
Expand Down
4 changes: 2 additions & 2 deletions packages/fleather/lib/src/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1197,11 +1197,11 @@ class RawEditorState extends EditorState
// Snapshot the input before using `await`.
// See https://github.com/flutter/flutter/issues/11427
final data = await widget.clipboardManager.getData();
if (data?.hasPlainText != true && data?.hasDelta != true) {
if (data == null || data.isEmpty) {
return;
}

if (data!.hasDelta) {
if (data.hasDelta) {
controller.compose(
(Delta()
..retain(selection.baseOffset)
Expand Down
2 changes: 1 addition & 1 deletion packages/fleather/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fleather
description: Clean, minimalistic and collaboration-ready rich text editor for Flutter.
version: 1.13.2
version: 1.14.0
homepage: https://fleather-editor.github.io
repository: https://github.com/fleather-editor/fleather
issue_tracker: https://github.com/fleather-editor/fleather/issues
Expand Down
6 changes: 6 additions & 0 deletions packages/parchment/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
## 1.13.0

* Replace quill_delta package with parchment_delta

## 1.13.0

* Upgrade dependencies

## 1.12.0

* Introduce AutoFormats to handle automatic text formatting and make Heuristics only responsible for validity of document
* [Fix] preserve line style on new line

Expand Down
2 changes: 1 addition & 1 deletion packages/parchment/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: parchment
description: Platform-agnostic rich text document model based on Delta format and used in Fleather editor.
version: 1.13.0
version: 1.14.0
homepage: https://fleather-editor.github.io
repository: https://github.com/fleather-editor/fleather
issue_tracker: https://github.com/fleather-editor/fleather/issues
Expand Down

0 comments on commit 5ef97c8

Please sign in to comment.