Skip to content

Commit 7abe6d2

Browse files
committed
chore!: disable clipboard buttons in QuillSimpleToolbar by default
1 parent 6640579 commit 7abe6d2

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
1111
## [Unreleased]
1212

13+
### Changed
14+
15+
- **BREAKING**: Clipboard action buttons in `QuillSimpleToolbar` are now disabled by default. To enable them, set `showClipboardCut`, `showClipboardCopy`, and `showClipboardPaste` to `true` in `QuillSimpleToolbarConfig`.
16+
1317
## [11.0.0-dev.17] - 2024-12-19
1418

1519
### Fixed

doc/migration/10_to_11.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,22 @@ void dispose() {
466466
}
467467
```
468468

469+
### 4. Clipboard action buttons in `QuillSimpleToolbar` are now disabled by default
470+
471+
This change was made due to a performance issue ([#2421](https://github.com/singerdmx/flutter-quill/issues/2421)) and reverts a minor update ([9.3.10](https://pub.dev/packages/flutter_quill/changelog#9310)) that unexpectedly enabled these buttons by default, increasing UI space usage.
472+
473+
To show them again, set `showClipboardCut`, `showClipboardCopy`, and `showClipboardPaste` to `true` in `QuillSimpleToolbarConfig`:
474+
475+
```dart
476+
QuillSimpleToolbar(
477+
config: QuillSimpleToolbarConfig(
478+
showClipboardCut: true,
479+
showClipboardCopy: true,
480+
showClipboardPaste: true,
481+
)
482+
)
483+
```
484+
469485
## 🚧 Experimental
470486

471487
APIs that were indicated as stable but are now updated to indicate

example/lib/main.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ class _HomePageState extends State<HomePage> {
101101
controller: _controller,
102102
config: QuillSimpleToolbarConfig(
103103
embedButtons: FlutterQuillEmbeds.toolbarButtons(),
104-
showClipboardCopy: false,
105-
showClipboardCut: false,
106104
showClipboardPaste: true,
107105
customButtons: [
108106
QuillToolbarCustomButtonOptions(

lib/src/toolbar/config/simple_toolbar_config.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ class QuillSimpleToolbarConfig {
107107
this.showSearchButton = true,
108108
this.showSubscript = true,
109109
this.showSuperscript = true,
110-
this.showClipboardCut = true,
111-
this.showClipboardCopy = true,
112-
this.showClipboardPaste = true,
110+
this.showClipboardCut = false,
111+
this.showClipboardCopy = false,
112+
this.showClipboardPaste = false,
113113
this.linkStyleType = LinkStyleType.original,
114114
this.headerStyleType = HeaderStyleType.original,
115115

0 commit comments

Comments
 (0)