Merge branch 'singerdmx:master' into master

pull/1980/head
AtlasAutocode 9 months ago committed by GitHub
commit 8bce363f3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 28
      CHANGELOG.md
  2. 2
      CHANGELOG_DATA.json
  3. 28
      dart_quill_delta/CHANGELOG.md
  4. 2
      dart_quill_delta/pubspec.yaml
  5. 8
      doc/custom_toolbar.md
  6. 4
      example/lib/screens/quill/my_quill_toolbar.dart
  7. 28
      flutter_quill_extensions/CHANGELOG.md
  8. 2
      flutter_quill_extensions/pubspec.yaml
  9. 28
      flutter_quill_test/CHANGELOG.md
  10. 2
      flutter_quill_test/pubspec.yaml
  11. 6
      lib/src/l10n/generated/quill_localizations.dart
  12. 3
      lib/src/l10n/generated/quill_localizations_ar.dart
  13. 3
      lib/src/l10n/generated/quill_localizations_bg.dart
  14. 3
      lib/src/l10n/generated/quill_localizations_bn.dart
  15. 3
      lib/src/l10n/generated/quill_localizations_cs.dart
  16. 3
      lib/src/l10n/generated/quill_localizations_da.dart
  17. 3
      lib/src/l10n/generated/quill_localizations_de.dart
  18. 6
      lib/src/l10n/generated/quill_localizations_en.dart
  19. 3
      lib/src/l10n/generated/quill_localizations_es.dart
  20. 3
      lib/src/l10n/generated/quill_localizations_fa.dart
  21. 3
      lib/src/l10n/generated/quill_localizations_fr.dart
  22. 3
      lib/src/l10n/generated/quill_localizations_he.dart
  23. 3
      lib/src/l10n/generated/quill_localizations_hi.dart
  24. 3
      lib/src/l10n/generated/quill_localizations_id.dart
  25. 3
      lib/src/l10n/generated/quill_localizations_it.dart
  26. 3
      lib/src/l10n/generated/quill_localizations_ja.dart
  27. 3
      lib/src/l10n/generated/quill_localizations_ko.dart
  28. 6
      lib/src/l10n/generated/quill_localizations_ku.dart
  29. 3
      lib/src/l10n/generated/quill_localizations_ms.dart
  30. 3
      lib/src/l10n/generated/quill_localizations_ne.dart
  31. 3
      lib/src/l10n/generated/quill_localizations_nl.dart
  32. 3
      lib/src/l10n/generated/quill_localizations_no.dart
  33. 3
      lib/src/l10n/generated/quill_localizations_pl.dart
  34. 6
      lib/src/l10n/generated/quill_localizations_pt.dart
  35. 6
      lib/src/l10n/generated/quill_localizations_ro.dart
  36. 3
      lib/src/l10n/generated/quill_localizations_ru.dart
  37. 3
      lib/src/l10n/generated/quill_localizations_sk.dart
  38. 3
      lib/src/l10n/generated/quill_localizations_sr.dart
  39. 3
      lib/src/l10n/generated/quill_localizations_sv.dart
  40. 3
      lib/src/l10n/generated/quill_localizations_sw.dart
  41. 3
      lib/src/l10n/generated/quill_localizations_tk.dart
  42. 3
      lib/src/l10n/generated/quill_localizations_tr.dart
  43. 3
      lib/src/l10n/generated/quill_localizations_uk.dart
  44. 3
      lib/src/l10n/generated/quill_localizations_ur.dart
  45. 3
      lib/src/l10n/generated/quill_localizations_vi.dart
  46. 9
      lib/src/l10n/generated/quill_localizations_zh.dart
  47. 3
      lib/src/l10n/quill_ar.arb
  48. 3
      lib/src/l10n/quill_bg.arb
  49. 3
      lib/src/l10n/quill_bn.arb
  50. 3
      lib/src/l10n/quill_cs.arb
  51. 3
      lib/src/l10n/quill_da.arb
  52. 3
      lib/src/l10n/quill_de.arb
  53. 3
      lib/src/l10n/quill_en.arb
  54. 1
      lib/src/l10n/quill_en_US.arb
  55. 3
      lib/src/l10n/quill_es.arb
  56. 3
      lib/src/l10n/quill_fa.arb
  57. 1
      lib/src/l10n/quill_fr.arb
  58. 3
      lib/src/l10n/quill_he.arb
  59. 3
      lib/src/l10n/quill_hi.arb
  60. 3
      lib/src/l10n/quill_id.arb
  61. 3
      lib/src/l10n/quill_it.arb
  62. 3
      lib/src/l10n/quill_ja.arb
  63. 1
      lib/src/l10n/quill_ko.arb
  64. 1
      lib/src/l10n/quill_ku.arb
  65. 1
      lib/src/l10n/quill_ku_CKB.arb
  66. 3
      lib/src/l10n/quill_ms.arb
  67. 3
      lib/src/l10n/quill_ne.arb
  68. 3
      lib/src/l10n/quill_nl.arb
  69. 3
      lib/src/l10n/quill_no.arb
  70. 3
      lib/src/l10n/quill_pl.arb
  71. 3
      lib/src/l10n/quill_pt.arb
  72. 3
      lib/src/l10n/quill_pt_br.arb
  73. 1
      lib/src/l10n/quill_ro.arb
  74. 1
      lib/src/l10n/quill_ro_RO.arb
  75. 1
      lib/src/l10n/quill_ru.arb
  76. 3
      lib/src/l10n/quill_sk.arb
  77. 3
      lib/src/l10n/quill_sr.arb
  78. 3
      lib/src/l10n/quill_sv.arb
  79. 3
      lib/src/l10n/quill_sw.arb
  80. 3
      lib/src/l10n/quill_tk.arb
  81. 3
      lib/src/l10n/quill_tr.arb
  82. 3
      lib/src/l10n/quill_uk.arb
  83. 3
      lib/src/l10n/quill_ur.arb
  84. 3
      lib/src/l10n/quill_vi.arb
  85. 3
      lib/src/l10n/quill_zh.arb
  86. 3
      lib/src/l10n/quill_zh_CN.arb
  87. 3
      lib/src/l10n/quill_zh_HK.arb
  88. 78
      lib/src/models/config/toolbar/buttons/select_line_height_style_dropdown_button_configurations.dart
  89. 6
      lib/src/models/config/toolbar/simple_toolbar_button_options.dart
  90. 5
      lib/src/models/config/toolbar/simple_toolbar_configurations.dart
  91. 26
      lib/src/models/documents/attribute.dart
  92. 6
      lib/src/models/documents/document.dart
  93. 22
      lib/src/models/documents/nodes/container.dart
  94. 35
      lib/src/models/documents/nodes/leaf.dart
  95. 9
      lib/src/models/documents/nodes/line.dart
  96. 36
      lib/src/models/documents/nodes/node.dart
  97. 17
      lib/src/models/rules/delete.dart
  98. 15
      lib/src/models/rules/format.dart
  99. 36
      lib/src/models/rules/insert.dart
  100. 7
      lib/src/models/rules/rule.dart
  101. Some files were not shown because too many files have changed in this diff Show More

@ -4,6 +4,34 @@
All notable changes to this project will be documented in this file.
## 9.5.6
* fix: common link is detected as a video link by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1978
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.5...v9.5.6
## 9.5.5
* fix: context menu behavior in mouse, desktop env by @n7484443 in https://github.com/singerdmx/flutter-quill/pull/1976
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.4...v9.5.5
## 9.5.4
* Feat: Line height support by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1972
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.3...v9.5.4
## 9.5.3
* Perf: Performance optimization by @Alspb in https://github.com/singerdmx/flutter-quill/pull/1964
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.2...v9.5.3
## 9.5.2
* Fix style settings by @AtlasAutocode in https://github.com/singerdmx/flutter-quill/pull/1962

File diff suppressed because one or more lines are too long

@ -4,6 +4,34 @@
All notable changes to this project will be documented in this file.
## 9.5.6
* fix: common link is detected as a video link by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1978
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.5...v9.5.6
## 9.5.5
* fix: context menu behavior in mouse, desktop env by @n7484443 in https://github.com/singerdmx/flutter-quill/pull/1976
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.4...v9.5.5
## 9.5.4
* Feat: Line height support by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1972
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.3...v9.5.4
## 9.5.3
* Perf: Performance optimization by @Alspb in https://github.com/singerdmx/flutter-quill/pull/1964
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.2...v9.5.3
## 9.5.2
* Fix style settings by @AtlasAutocode in https://github.com/singerdmx/flutter-quill/pull/1962

@ -1,6 +1,6 @@
name: dart_quill_delta
description: A port of quill-js-delta from typescript to dart
version: 9.5.2
version: 9.5.6
homepage: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/
repository: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

@ -73,6 +73,14 @@ QuillToolbar.simple(
isBackground: true,
),
const VerticalDivider(),
// This is an implementation that only is used on
// flutter_quill and it's not originally
// implemented in Quill JS API, so it could cause conflicts
// with the original Quill Delta format
QuillToolbarSelectLineHeightStyleDropdownButton(
controller: globalController,
),
const VerticalDivider(),
QuillToolbarSelectHeaderStyleButton(
controller: controller,
),

@ -164,6 +164,10 @@ class MyQuillToolbar extends StatelessWidget {
controller: controller,
),
const VerticalDivider(),
QuillToolbarSelectLineHeightStyleDropdownButton(
controller: controller,
),
const VerticalDivider(),
QuillToolbarToggleCheckListButton(
controller: controller,
),

@ -4,6 +4,34 @@
All notable changes to this project will be documented in this file.
## 9.5.6
* fix: common link is detected as a video link by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1978
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.5...v9.5.6
## 9.5.5
* fix: context menu behavior in mouse, desktop env by @n7484443 in https://github.com/singerdmx/flutter-quill/pull/1976
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.4...v9.5.5
## 9.5.4
* Feat: Line height support by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1972
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.3...v9.5.4
## 9.5.3
* Perf: Performance optimization by @Alspb in https://github.com/singerdmx/flutter-quill/pull/1964
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.2...v9.5.3
## 9.5.2
* Fix style settings by @AtlasAutocode in https://github.com/singerdmx/flutter-quill/pull/1962

@ -1,6 +1,6 @@
name: flutter_quill_extensions
description: Embed extensions for flutter_quill including image, video, formula and etc.
version: 9.5.2
version: 9.5.6
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

@ -4,6 +4,34 @@
All notable changes to this project will be documented in this file.
## 9.5.6
* fix: common link is detected as a video link by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1978
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.5...v9.5.6
## 9.5.5
* fix: context menu behavior in mouse, desktop env by @n7484443 in https://github.com/singerdmx/flutter-quill/pull/1976
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.4...v9.5.5
## 9.5.4
* Feat: Line height support by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/1972
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.3...v9.5.4
## 9.5.3
* Perf: Performance optimization by @Alspb in https://github.com/singerdmx/flutter-quill/pull/1964
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v9.5.2...v9.5.3
## 9.5.2
* Fix style settings by @AtlasAutocode in https://github.com/singerdmx/flutter-quill/pull/1962

@ -1,6 +1,6 @@
name: flutter_quill_test
description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases.
version: 9.5.2
version: 9.5.6
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

@ -577,6 +577,12 @@ abstract class FlutterQuillLocalizations {
/// **'Color'**
String get color;
/// No description provided for @lineheight.
///
/// In en, this message translates to:
/// **'Line height'**
String get lineheight;
/// No description provided for @findText.
///
/// In en, this message translates to:

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsAr extends FlutterQuillLocalizations {
@override
String get color => 'اللون';
@override
String get lineheight => 'ارتفاع خط';
@override
String get findText => 'بحث عن نص';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsBg extends FlutterQuillLocalizations {
@override
String get color => 'Цвят';
@override
String get lineheight => 'височина на линията';
@override
String get findText => 'Намери текст';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsBn extends FlutterQuillLocalizations {
@override
String get color => '';
@override
String get lineheight => 'ইনর উচচত';
@override
String get findText => 'য খ';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsCs extends FlutterQuillLocalizations {
@override
String get color => 'Barva';
@override
String get lineheight => 'Výška čáry';
@override
String get findText => 'Najít text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsDa extends FlutterQuillLocalizations {
@override
String get color => 'Farve';
@override
String get lineheight => 'altezza della linea';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsDe extends FlutterQuillLocalizations {
@override
String get color => 'Farbe';
@override
String get lineheight => 'Zeilenhöhe';
@override
String get findText => 'Text suchen';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsEn extends FlutterQuillLocalizations {
@override
String get color => 'Color';
@override
String get lineheight => 'Line height';
@override
String get findText => 'Find text';
@ -482,6 +485,9 @@ class FlutterQuillLocalizationsEnUs extends FlutterQuillLocalizationsEn {
@override
String get color => 'Color';
@override
String get lineheight => 'Line height';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsEs extends FlutterQuillLocalizations {
@override
String get color => 'Color';
@override
String get lineheight => 'Interlineado';
@override
String get findText => 'Buscar texto';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsFa extends FlutterQuillLocalizations {
@override
String get color => 'رنگ';
@override
String get lineheight => 'ارتفاع خط';
@override
String get findText => 'جستجوی متن';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsFr extends FlutterQuillLocalizations {
@override
String get color => 'Couleur';
@override
String get lineheight => 'Hauteur de la ligne';
@override
String get findText => 'Rechercher du texte';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsHe extends FlutterQuillLocalizations {
@override
String get color => 'צבע';
@override
String get lineheight => 'גובה קו';
@override
String get findText => 'מצא טקסט';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsHi extends FlutterQuillLocalizations {
@override
String get color => '';
@override
String get lineheight => 'ईन';
@override
String get findText => 'मद क';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsId extends FlutterQuillLocalizations {
@override
String get color => 'Warna';
@override
String get lineheight => 'Tinggi garis';
@override
String get findText => 'Temukan Teks';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsIt extends FlutterQuillLocalizations {
@override
String get color => 'Colore';
@override
String get lineheight => 'Altezza della linea';
@override
String get findText => 'Trova testo';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsJa extends FlutterQuillLocalizations {
@override
String get color => 'Color';
@override
String get lineheight => '行の高さ';
@override
String get findText => '検索テキスト';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsKo extends FlutterQuillLocalizations {
@override
String get color => '색상';
@override
String get lineheight => '선 높이';
@override
String get findText => '찾기';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsKu extends FlutterQuillLocalizations {
@override
String get color => 'ڕەنگ';
@override
String get lineheight => 'بەرزی هێڵ';
@override
String get findText => 'دۆزینەوەی نوسین';
@ -504,6 +507,9 @@ class FlutterQuillLocalizationsKuCkb extends FlutterQuillLocalizationsKu {
@override
String get color => 'ڕەنگ';
@override
String get lineheight => 'بەرزی هێڵ';
@override
String get findText => 'دۆزینەوەی نوسین';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsMs extends FlutterQuillLocalizations {
@override
String get color => 'Warna';
@override
String get lineheight => 'Ketinggian garisan';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsNe extends FlutterQuillLocalizations {
@override
String get color => 'रङ';
@override
String get lineheight => '-उच';
@override
String get findText => 'ट फ';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsNl extends FlutterQuillLocalizations {
@override
String get color => 'Kleur';
@override
String get lineheight => 'Lijnhoogte';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsNo extends FlutterQuillLocalizations {
@override
String get color => 'Farge';
@override
String get lineheight => 'Linjehøyde';
@override
String get findText => 'Finn tekst';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsPl extends FlutterQuillLocalizations {
@override
String get color => 'Kolor';
@override
String get lineheight => 'Wysokość linii';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsPt extends FlutterQuillLocalizations {
@override
String get color => 'Cor';
@override
String get lineheight => 'Altura da linha';
@override
String get findText => 'Find text';
@ -482,6 +485,9 @@ class FlutterQuillLocalizationsPtBr extends FlutterQuillLocalizationsPt {
@override
String get color => 'Cor';
@override
String get lineheight => 'Altura da linha';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsRo extends FlutterQuillLocalizations {
@override
String get color => 'Culoare';
@override
String get lineheight => 'Inaltimea liniei';
@override
String get findText => 'Găsește text';
@ -506,6 +509,9 @@ class FlutterQuillLocalizationsRoRo extends FlutterQuillLocalizationsRo {
@override
String get color => 'Culoare';
@override
String get lineheight => 'Inaltimea liniei';
@override
String get findText => 'Găsește text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsRu extends FlutterQuillLocalizations {
@override
String get color => 'Цвет';
@override
String get lineheight => 'Высота линии';
@override
String get findText => 'Найти текст';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsSk extends FlutterQuillLocalizations {
@override
String get color => 'Farba';
@override
String get lineheight => 'Výška riadku';
@override
String get findText => 'Nájsť text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsSr extends FlutterQuillLocalizations {
@override
String get color => 'Boja';
@override
String get lineheight => 'Visina linije';
@override
String get findText => 'Nađi tekst';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsSv extends FlutterQuillLocalizations {
@override
String get color => 'Färg';
@override
String get lineheight => 'Radavstånd';
@override
String get findText => 'Hitta text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsSw extends FlutterQuillLocalizations {
@override
String get color => 'Rangi';
@override
String get lineheight => 'Urefu wa mstari';
@override
String get findText => 'Pata Maandishi';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsTk extends FlutterQuillLocalizations {
@override
String get color => 'Reňk';
@override
String get lineheight => 'Çyzyk beýikligi';
@override
String get findText => 'Tekst tapyň';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsTr extends FlutterQuillLocalizations {
@override
String get color => 'Renk';
@override
String get lineheight => 'Satır yüksekliği';
@override
String get findText => 'Find text';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsUk extends FlutterQuillLocalizations {
@override
String get color => 'Колір';
@override
String get lineheight => 'Висота лінії';
@override
String get findText => 'Знайти текст';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsUr extends FlutterQuillLocalizations {
@override
String get color => 'رنگ';
@override
String get lineheight => 'لکیر کی اونچائی';
@override
String get findText => 'متن تلاش کریں';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsVi extends FlutterQuillLocalizations {
@override
String get color => 'Màu';
@override
String get lineheight => 'Chiều cao giữa các dòng';
@override
String get findText => 'Tìm văn bản';

@ -208,6 +208,9 @@ class FlutterQuillLocalizationsZh extends FlutterQuillLocalizations {
@override
String get color => '颜色';
@override
String get lineheight => '行高';
@override
String get findText => '搜索文本';
@ -500,6 +503,9 @@ class FlutterQuillLocalizationsZhCn extends FlutterQuillLocalizationsZh {
@override
String get color => '颜色';
@override
String get lineheight => '行高';
@override
String get findText => '搜索文本';
@ -745,6 +751,9 @@ class FlutterQuillLocalizationsZhHk extends FlutterQuillLocalizationsZh {
@override
String get color => '顏色';
@override
String get lineheight => '行高';
@override
String get findText => '搜尋文本';

@ -60,6 +60,7 @@
"hex": "Hex",
"material": "Material",
"color": "اللون",
"lineheight": "ارتفاع خط",
"findText": "بحث عن نص",
"moveToPreviousOccurrence": "الانتقال إلى الحدث السابق",
"moveToNextOccurrence": "الانتقال إلى الحدث التالي",
@ -88,4 +89,4 @@
"recordAVideoUsingYourCamera": "تسجيل فيديو باستخدام الكاميرا",
"pasteAVideoUsingALink": "لصق فيديو باستخدام رابط"
}

@ -60,6 +60,7 @@
"hex": "Hex",
"material": "Material",
"color": "Цвят",
"lineheight": "височина на линията",
"findText": "Намери текст",
"moveToPreviousOccurrence": "Премести към предишното съвпадение",
"moveToNextOccurrence": "Премести към следващото съвпадение",
@ -76,4 +77,4 @@
"caseSensitivityAndWholeWordSearch": "Чувствителност на кутията и търсене на цялата дума",
"insertImage": "Вмъкване на изображение"
}

@ -60,6 +60,7 @@
"hex": "হস",
"material": "মিল",
"color": "কর",
"lineheight": "লইনর উচচত",
"findText": "পয খন",
"moveToPreviousOccurrence": "পববর ঘটন চলন",
"moveToNextOccurrence": "পরবর ঘটন চলন",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "কস সিিিি এবণ শবদ অনসনন",
"insertImage": "চির সনিশ"
}

@ -60,6 +60,7 @@
"hex": "Hex",
"material": "Material",
"color": "Barva",
"lineheight": "Výška čáry",
"findText": "Najít text",
"moveToPreviousOccurrence": "Přesunout na předchozí výskyt",
"moveToNextOccurrence": "Přesunout na následující výskyt",
@ -102,4 +103,4 @@
"recordAVideoUsingYourCamera": "Natočit video pomocí kamery",
"pasteAVideoUsingALink": "Vložit video pomocí odkazu"
}

@ -69,10 +69,11 @@
"hex": "Hex",
"material": "Materiale",
"color": "Farve",
"lineheight": "altezza della linea",
"pleaseEnterAValidVideoURL": "Angiv en gyldig video-URL",
"photo": "Foto",
"image": "Billede",
"caseSensitivityAndWholeWordSearch": "Stor- og småbogstavsfølsomhed samt helordsøgning",
"insertImage": "Indsæt billede"
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Material",
"color": "Farbe",
"lineheight": "Zeilenhöhe",
"pleaseEnterAValidVideoURL": "Bitte geben Sie eine gültige Video-URL ein",
"photo": "Foto",
"image": "Bild",
@ -79,4 +80,4 @@
"pasteAPhotoUsingALink": "Fügen Sie ein Foto über einen Link ein",
"pickAVideoFromYourGallery": "Wählen Sie ein Video aus Ihrer Galerie",
"recordAVideoUsingYourCamera": "Nehmen Sie ein Video mit Ihrer Kamera auf"
}
}

@ -71,6 +71,7 @@
"hex": "Hex",
"material": "Material",
"color": "Color",
"lineheight": "Line height",
"findText": "Find text",
"moveToPreviousOccurrence": "Move to previous occurrence",
"moveToNextOccurrence": "Move to next occurrence",
@ -108,4 +109,4 @@
"cut": "Cut",
"paste": "Paste",
"insertTable": "Insert table"
}
}

@ -60,6 +60,7 @@
"hex": "Hex",
"material": "Material",
"color": "Color",
"lineheight": "Line height",
"findText": "Find text",
"moveToPreviousOccurrence": "Move to previous occurrence",
"moveToNextOccurrence": "Move to next occurrence",

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Material",
"color": "Color",
"lineheight": "Interlineado",
"pleaseEnterAValidVideoURL": "Por favor, ingrese una URL de video válida",
"photo": "Foto",
"image": "Imagen",
@ -79,4 +80,4 @@
"pasteAPhotoUsingALink": "Pega una foto usando un enlace",
"pickAVideoFromYourGallery": "Elige un video de tu galería",
"recordAVideoUsingYourCamera": "Graba un video con tu cámara"
}
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "مواد",
"color": "رنگ",
"lineheight": "ارتفاع خط",
"savedUsingTheNetwork": "با استفاده از شبکه ذخیره شده است",
"pleaseEnterTextForYourLink": "لطفاً متن لینک خود را وارد کنید (مثال: 'بیشتر بدانید')",
"pleaseEnterTheLinkURL": "لطفاً URL لینک را وارد کنید (مثال: 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "حساسیت به کوچکی و بزرگی حروف و جستجوی کلمه کامل",
"insertImage": "وارد کردن تصویر"
}

@ -67,6 +67,7 @@
"hex": "Hex",
"material": "Matériel",
"color": "Couleur",
"lineheight": "Hauteur de la ligne",
"findText": "Rechercher du texte",
"moveToPreviousOccurrence": "Aller à l'occurrence précédente",
"moveToNextOccurrence": "Aller à l'occurrence suivante",

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "חומר",
"color": "צבע",
"lineheight": "גובה קו",
"savedUsingTheNetwork": "נשמר באמצעות הרשת",
"pleaseEnterTextForYourLink": "אנא הזן טקסט לקישור שלך (לדוגמה, 'מידע נוסף')",
"pleaseEnterTheLinkURL": "אנא הזן את כתובת ה-URL של הקישור (לדוגמה, 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "רגישות לאותות רישיות וחיפוש לפי מילה שלמה",
"insertImage": "הכנס תמונה"
}

@ -69,6 +69,7 @@
"hex": "हस",
"material": "समग",
"color": "रग",
"lineheight": "ऊईन",
"savedUsingTheNetwork": "नटवरक क उपयग करक सह गय",
"pleaseEnterTextForYourLink": "कपय अपनिक किए एक पठ दरज कर (उदहरण: 'और अधिक ज')",
"pleaseEnterTheLinkURL": "कपयिक URL दरज कर (उदहरण: 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "कस सििि और प शबद कज",
"insertImage": "छवि"
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Material",
"color": "Warna",
"lineheight": "Tinggi garis",
"savedUsingTheNetwork": "Tersimpan menggunakan jaringan",
"pleaseEnterTextForYourLink": "Harap masukkan teks untuk tautan Anda (contoh: 'Pelajari lebih lanjut')",
"pleaseEnterTheLinkURL": "Harap masukkan URL tautan (contoh: 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Sensitivitas huruf besar dan kecil dan pencarian kata utuh",
"insertImage": "Sisipkan Gambar"
}

@ -60,6 +60,7 @@
"hex": "Esadecimale",
"material": "Materiale",
"color": "Colore",
"lineheight": "Altezza della linea",
"findText": "Trova testo",
"moveToPreviousOccurrence": "Vai all'occorrenza precedente",
"moveToNextOccurrence": "Vai all'occorrenza successiva",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Sensibilità maiuscole/minuscole e ricerca di parole intere",
"insertImage": "Inserisci immagine"
}

@ -69,10 +69,11 @@
"hex": "Hex",
"material": "Material",
"color": "Color",
"lineheight": "行の高さ",
"pleaseEnterAValidVideoURL": "有効なビデオURLを入力してください",
"photo": "写真",
"image": "画像",
"caseSensitivityAndWholeWordSearch": "大文字と小文字の区別と完全一致検索",
"insertImage": "画像を挿入"
}

@ -67,6 +67,7 @@
"hex": "Hex 값",
"material": "Material 색상",
"color": "색상",
"lineheight": "선 높이",
"findText": "찾기",
"moveToPreviousOccurrence": "이전 위치로 이동",
"moveToNextOccurrence": "다음 위치로 이동",

@ -67,6 +67,7 @@
"hex": "هێکس",
"material": "بابەت",
"color": "ڕەنگ",
"lineheight": "بەرزی هێڵ",
"findText": "دۆزینەوەی نوسین",
"moveToPreviousOccurrence": "بچۆ بۆ ڕووداوی پێشوو",
"moveToNextOccurrence": "بڕۆ بۆ ڕووداوی داهاتوو",

@ -67,6 +67,7 @@
"hex": "هێکس",
"material": "بابەت",
"color": "ڕەنگ",
"lineheight": "بەرزی هێڵ",
"findText": "دۆزینەوەی نوسین",
"moveToPreviousOccurrence": "بچۆ بۆ ڕووداوی پێشوو",
"moveToNextOccurrence": "بڕۆ بۆ ڕووداوی داهاتوو",

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Bahan",
"color": "Warna",
"lineheight": "Ketinggian garisan",
"savedUsingTheNetwork": "Disimpan menggunakan rangkaian",
"pleaseEnterTextForYourLink": "Sila masukkan teks untuk pautan anda (contoh, 'Ketahui lebih lanjut')",
"pleaseEnterTheLinkURL": "Sila masukkan URL pautan (contoh, 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Sensitiviti huruf besar dan kecil dan carian penuh perkataan",
"insertImage": "Masukkan imej"
}

@ -67,6 +67,7 @@
"hex": "Hex",
"material": "Material",
"color": "रङ",
"lineheight": "र-उचइ",
"findText": "टट फ",
"moveToPreviousOccurrence": "अघि घटन",
"moveToNextOccurrence": "अर घटन",
@ -97,4 +98,4 @@
"pickAVideoFromYourGallery": "आफलरट भिि",
"recordAVideoUsingYourCamera": "आफरयग गरर भििकरड गर",
"pasteAVideoUsingALink": "लिक परयग गरर भिि"
}
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Materiaal",
"color": "Kleur",
"lineheight": "Lijnhoogte",
"savedUsingTheNetwork": "Opgeslagen via het netwerk",
"pleaseEnterTextForYourLink": "Voer tekst in voor uw link (bijvoorbeeld 'Meer weten')",
"pleaseEnterTheLinkURL": "Voer de URL van de link in (bijvoorbeeld 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Hoofdlettergevoeligheid en volledig woord zoeken",
"insertImage": "Afbeelding invoegen"
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Materiale",
"color": "Farge",
"lineheight": "Linjehøyde",
"savedUsingTheNetwork": "Lagret ved hjelp av nettverket",
"pleaseEnterTextForYourLink": "Vennligst skriv inn tekst for lenken din (for eksempel 'Lær mer')",
"pleaseEnterTheLinkURL": "Vennligst skriv inn lenkens URL (for eksempel 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Stor/liten bokstavfølsomhet og helordsøk",
"insertImage": "Sett inn bilde"
}

@ -69,10 +69,11 @@
"hex": "Hex",
"material": "Materiał",
"color": "Kolor",
"lineheight": "Wysokość linii",
"pleaseEnterAValidVideoURL": "Proszę wprowadzić poprawny adres URL wideo",
"photo": "Zdjęcie",
"image": "Obraz",
"caseSensitivityAndWholeWordSearch": "Czułość na wielkość liter i wyszukiwanie całego słowa",
"insertImage": "Wstaw obraz"
}

@ -69,10 +69,11 @@
"hex": "Hex",
"material": "Material",
"color": "Cor",
"lineheight": "Altura da linha",
"pleaseEnterAValidVideoURL": "Por favor, insira uma URL de vídeo válida",
"photo": "Foto",
"image": "Imagem",
"caseSensitivityAndWholeWordSearch": "Sensibilidade a maiúsculas e minúsculas e pesquisa de palavras inteiras",
"insertImage": "Inserir imagem"
}

@ -69,10 +69,11 @@
"hex": "Hex",
"material": "Material",
"color": "Cor",
"lineheight": "Altura da linha",
"pleaseEnterAValidVideoURL": "Por favor, insira uma URL de vídeo válida",
"photo": "Foto",
"image": "Imagem",
"caseSensitivityAndWholeWordSearch": "Sensibilidade a maiúsculas e minúsculas e pesquisa de palavras inteiras",
"insertImage": "Inserir imagem"
}

@ -67,6 +67,7 @@
"hex": "Hex",
"material": "Material",
"color": "Culoare",
"lineheight": "Inaltimea liniei",
"findText": "Găsește text",
"moveToPreviousOccurrence": "Mutați la apariția anterioară",
"moveToNextOccurrence": "Mutați la apariția următoare",

@ -67,6 +67,7 @@
"hex": "Hex",
"material": "Material",
"color": "Culoare",
"lineheight": "Inaltimea liniei",
"findText": "Găsește text",
"moveToPreviousOccurrence": "Mutați la apariția anterioară",
"moveToNextOccurrence": "Mutați la apariția următoare",

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Материал",
"color": "Цвет",
"lineheight": "Высота линии",
"pleaseEnterAValidVideoURL": "Пожалуйста, введите действительный URL-адрес видео",
"photo": "Фото",
"image": "Изображение",

@ -67,6 +67,7 @@
"hex": "Hex",
"material": "Materiál",
"color": "Farba",
"lineheight": "Výška riadku",
"findText": "Nájsť text",
"moveToPreviousOccurrence": "Prejsť na predchádzajúce výskyty",
"moveToNextOccurrence": "Prejsť na ďalší výskyt",
@ -97,4 +98,4 @@
"pickAVideoFromYourGallery": "Vyberte video z vašej galérie",
"recordAVideoUsingYourCamera": "Natočiť video pomocou vašej kamery",
"pasteAVideoUsingALink": "Vložiť video pomocou odkazu"
}
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Materijal",
"color": "Boja",
"lineheight": "Visina linije",
"savedUsingTheNetwork": "Sačuvano korišćenjem mreže",
"pleaseEnterTextForYourLink": "Unesite tekst za svoj link (na primer, 'Saznajte više')",
"pleaseEnterTheLinkURL": "Unesite URL linka (na primer, 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Osetljivost na velika i mala slova i potraga za celom rečju",
"insertImage": "Umetni sliku"
}

@ -67,6 +67,7 @@
"hex": "Hex",
"material": "Material",
"color": "Färg",
"lineheight": "Radavstånd",
"findText": "Hitta text",
"moveToPreviousOccurrence": "Gå till föregående förekomst",
"moveToNextOccurrence": "Gå till nästa förekomst",
@ -87,4 +88,4 @@
"pickAVideoFromYourGallery": "Välj en video från ditt galleri",
"recordAVideoUsingYourCamera": "Spela in en video med din kamera",
"pasteAVideoUsingALink": "Klistra in en video med en länk"
}
}

@ -60,6 +60,7 @@
"hex": "Hexi",
"material": "Nyenzo",
"color": "Rangi",
"lineheight": "Urefu wa mstari",
"findText": "Pata Maandishi",
"moveToPreviousOccurrence": "Nenda Kwenye Tukio la Awali",
"moveToNextOccurrence": "Nenda kwa Tukio linalofuata",
@ -76,4 +77,4 @@
"caseSensitivityAndWholeWordSearch": "Uwiano wa herufi kubwa na ndogo na utafutaji wa neno zima",
"insertImage": "Weka Picha"
}

@ -60,6 +60,7 @@
"hex": "Hex",
"material": "Material",
"color": "Reňk",
"lineheight": "Çyzyk beýikligi",
"findText": "Tekst tapyň",
"moveToPreviousOccurrence": "Öňki hadysa geçiň",
"moveToNextOccurrence": "Indiki hadysa geçiň",
@ -76,4 +77,4 @@
"caseSensitivityAndWholeWordSearch": "Iňkisar we iň oňg söz gözleýinç",
"insertImage": "Surat goş"
}

@ -69,10 +69,11 @@
"hex": "Hex",
"material": "Malzeme",
"color": "Renk",
"lineheight": "Satır yüksekliği",
"pleaseEnterAValidVideoURL": "Lütfen geçerli bir video URL'si girin",
"photo": "Fotoğraf",
"image": "Görüntü",
"caseSensitivityAndWholeWordSearch": "Büyük/küçük harf hassasiyeti ve tam kelime arama",
"insertImage": "Görüntü ekle"
}

@ -14,6 +14,7 @@
"hex": "Hex",
"material": "Матеріал",
"color": "Колір",
"lineheight": "Висота лінії",
"pleaseEnterAValidVideoURL": "Будь ласка, введіть дійсну URL-адресу відео",
"photo": "Фото",
"image": "Зображення",
@ -88,4 +89,4 @@
"heading5": "Заголовок 5",
"heading6": "Заголовок 6"
}

@ -69,6 +69,7 @@
"hex": "ہیکس",
"material": "مواد",
"color": "رنگ",
"lineheight": "لکیر کی اونچائی",
"savedUsingTheNetwork": "نیٹ ورک کا استعمال کر کے محفوظ ہوا",
"pleaseEnterTextForYourLink": "براہ کرم اپنے لنک کے لیے متن درج کریں (مثال کے طور پر، 'مزید جانیں')",
"pleaseEnterTheLinkURL": "براہ کرم لنک کا URL درج کریں (مثال کے طور پر، 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "معاملے کی حساسیت اور پورے الفاظ کی تلاش",
"insertImage": "تصویر داخل کریں"
}

@ -69,6 +69,7 @@
"hex": "Hex",
"material": "Chất liệu",
"color": "Màu",
"lineheight": "Chiều cao giữa các dòng",
"savedUsingTheNetwork": "Đã lưu bằng cách sử dụng mạng",
"pleaseEnterTextForYourLink": "Vui lòng nhập văn bản cho liên kết của bạn (ví dụ: 'Tìm hiểu thêm')",
"pleaseEnterTheLinkURL": "Vui lòng nhập URL của liên kết (ví dụ: 'https://example.com')",
@ -79,4 +80,4 @@
"caseSensitivityAndWholeWordSearch": "Độ nhạy cảm chữ hoa/chữ thường và tìm kiếm toàn bộ từ",
"insertImage": "Chèn hình ảnh"
}

@ -67,6 +67,7 @@
"hex": "十六进制",
"material": "Material 设计",
"color": "颜色",
"lineheight": "行高",
"findText": "搜索文本",
"moveToPreviousOccurrence": "上一个匹配项",
"moveToNextOccurrence": "下一个匹配项",
@ -87,4 +88,4 @@
"pickAVideoFromYourGallery": "从相册选取视频",
"recordAVideoUsingYourCamera": "使用相机录制",
"pasteAVideoUsingALink": "从链接获取视频"
}
}

@ -67,6 +67,7 @@
"hex": "十六进制",
"material": "Material 设计",
"color": "颜色",
"lineheight": "行高",
"findText": "搜索文本",
"moveToPreviousOccurrence": "上一个匹配项",
"moveToNextOccurrence": "下一个匹配项",
@ -87,4 +88,4 @@
"pickAVideoFromYourGallery": "从相册选取视频",
"recordAVideoUsingYourCamera": "使用相机录制",
"pasteAVideoUsingALink": "从链接获取视频"
}
}

@ -69,10 +69,11 @@
"hex": "十六進制",
"material": "物料",
"color": "顏色",
"lineheight": "行高",
"pleaseEnterAValidVideoURL": "請輸入有效的視頻URL",
"photo": "照片",
"image": "圖像",
"caseSensitivityAndWholeWordSearch": "區分大小寫和整詞搜索",
"insertImage": "插入圖像"
}

@ -0,0 +1,78 @@
import 'package:flutter/widgets.dart'
show IconData, TextStyle, ValueChanged, VoidCallback;
import '../../../../widgets/toolbar/base_toolbar.dart';
import '../../../documents/attribute.dart';
import '../../../themes/quill_icon_theme.dart';
class QuillToolbarSelectLineHeightStyleDropdownButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions {
const QuillToolbarSelectLineHeightStyleDropdownButtonExtraOptions({
required super.controller,
required super.context,
required super.onPressed,
required this.currentValue,
});
final Attribute currentValue;
}
class QuillToolbarSelectLineHeightStyleDropdownButtonOptions
extends QuillToolbarBaseButtonOptions<
QuillToolbarSelectLineHeightStyleDropdownButtonOptions,
QuillToolbarSelectLineHeightStyleDropdownButtonExtraOptions> {
const QuillToolbarSelectLineHeightStyleDropdownButtonOptions({
super.afterButtonPressed,
super.childBuilder,
super.iconTheme,
super.tooltip,
super.iconSize,
super.iconButtonFactor,
this.textStyle,
super.iconData,
this.attributes,
this.defaultDisplayText,
this.width,
});
final TextStyle? textStyle;
/// Line-height attributes, defaults to:
/// ```dart
/// [
/// Attribute.lineHeightNormal,
/// Attribute.lineHeightTight,
/// Attribute.lineHeightOneAndHalf,
/// Attribute.lineHeightDouble,
/// ]
/// ```
final List<Attribute<double?>>? attributes;
final double? width;
final String? defaultDisplayText;
QuillToolbarSelectLineHeightStyleDropdownButtonOptions copyWith({
ValueChanged<String>? onSelected,
List<Attribute<double>>? attributes,
TextStyle? style,
double? iconSize,
double? iconButtonFactor,
IconData? iconData,
VoidCallback? afterButtonPressed,
String? tooltip,
QuillIconTheme? iconTheme,
String? defaultDisplayText,
double? width,
}) {
return QuillToolbarSelectLineHeightStyleDropdownButtonOptions(
attributes: attributes ?? this.attributes,
iconData: iconData ?? this.iconData,
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed,
tooltip: tooltip ?? this.tooltip,
iconTheme: iconTheme ?? this.iconTheme,
iconSize: iconSize ?? this.iconSize,
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
defaultDisplayText: defaultDisplayText ?? this.defaultDisplayText,
width: width ?? this.width,
);
}
}

@ -16,6 +16,7 @@ import 'buttons/search_configurations.dart';
import 'buttons/select_alignment_configurations.dart';
import 'buttons/select_header_style_buttons_configurations.dart';
import 'buttons/select_header_style_dropdown_button_configurations.dart';
import 'buttons/select_line_height_style_dropdown_button_configurations.dart';
import 'buttons/toggle_check_list_configurations.dart';
import 'buttons/toggle_style_configurations.dart';
@ -72,6 +73,8 @@ class QuillSimpleToolbarButtonOptions extends Equatable {
const QuillToolbarSelectHeaderStyleButtonsOptions(),
this.selectHeaderStyleDropdownButton =
const QuillToolbarSelectHeaderStyleDropdownButtonOptions(),
this.selectLineHeightStyleDropdownButton =
const QuillToolbarSelectLineHeightStyleDropdownButtonOptions(),
this.linkStyle = const QuillToolbarLinkStyleButtonOptions(),
this.linkStyle2 = const QuillToolbarLinkStyleButton2Options(),
this.customButtons = const QuillToolbarCustomButtonOptions(),
@ -131,6 +134,9 @@ class QuillSimpleToolbarButtonOptions extends Equatable {
final QuillToolbarSelectHeaderStyleDropdownButtonOptions
selectHeaderStyleDropdownButton;
final QuillToolbarSelectLineHeightStyleDropdownButtonOptions
selectLineHeightStyleDropdownButton;
final QuillToolbarLinkStyleButtonOptions linkStyle;
final QuillToolbarLinkStyleButton2Options linkStyle2;

@ -97,6 +97,7 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
this.showItalicButton = true,
this.showSmallButton = false,
this.showUnderLineButton = true,
this.showLineHeightButton = false,
this.showStrikeThrough = true,
this.showInlineCode = true,
this.showColorButton = true,
@ -217,6 +218,10 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
final bool showClipboardCopy;
final bool showClipboardPaste;
/// This activates a functionality that is only implemented in [flutter_quill] and is NOT originally
/// used in the [Quill Js API]. So it could cause conflicts if you use this attribute with the original Delta format of Quill Js
final bool showLineHeightButton;
/// Toolbar items to display for controls of embed blocks
final List<EmbedButtonBuilder>? embedButtons;

@ -40,6 +40,7 @@ class Attribute<T> extends Equatable {
Attribute.background.key: Attribute.background,
Attribute.placeholder.key: Attribute.placeholder,
Attribute.header.key: Attribute.header,
Attribute.lineHeight.key: Attribute.lineHeight,
Attribute.align.key: Attribute.align,
Attribute.direction.key: Attribute.direction,
Attribute.list.key: Attribute.list,
@ -87,6 +88,8 @@ class Attribute<T> extends Equatable {
static const HeaderAttribute header = HeaderAttribute();
static const LineHeightAttribute lineHeight = LineHeightAttribute();
static const IndentAttribute indent = IndentAttribute();
static const AlignAttribute align = AlignAttribute(null);
@ -147,6 +150,7 @@ class Attribute<T> extends Equatable {
Attribute.blockQuote.key,
Attribute.indent.key,
Attribute.direction.key,
Attribute.lineHeight.key,
});
static final Set<String> blockKeysExceptHeader = LinkedHashSet.of({
@ -154,6 +158,7 @@ class Attribute<T> extends Equatable {
Attribute.align.key,
Attribute.codeBlock.key,
Attribute.blockQuote.key,
Attribute.lineHeight.key,
Attribute.indent.key,
Attribute.direction.key,
});
@ -349,6 +354,27 @@ class HeaderAttribute extends Attribute<int?> {
: super('header', AttributeScope.block, level);
}
/// This attribute represents the space between text lines. The line height can be
/// adjusted using predefined constants or custom values
///
/// The attribute at the json looks like: "attributes":{"line-height": 1.5 }
class LineHeightAttribute extends Attribute<double?> {
const LineHeightAttribute({double? lineHeight})
: super('line-height', AttributeScope.block, lineHeight);
static const Attribute<double?> lineHeightNormal =
LineHeightAttribute(lineHeight: 1);
static const Attribute<double?> lineHeightTight =
LineHeightAttribute(lineHeight: 1.15);
static const Attribute<double?> lineHeightOneAndHalf =
LineHeightAttribute(lineHeight: 1.5);
static const Attribute<double?> lineHeightDouble =
LineHeightAttribute(lineHeight: 2);
}
class IndentAttribute extends Attribute<int?> {
const IndentAttribute({int? level})
: super('indent', AttributeScope.block, level);

@ -354,10 +354,7 @@ class Document {
} catch (e) {
throw StateError('_delta compose failed');
}
if (_delta != _root.toDelta()) {
throw StateError('Compose failed');
}
assert(_delta == _root.toDelta(), 'Compose failed');
final change = DocChange(originalDelta, delta, changeSource);
documentChangeObserver.add(change);
history.handleDocChange(change);
@ -442,7 +439,6 @@ class Document {
doc.toString(), 'Document Delta cannot be empty.');
}
// print(doc.last.data.runtimeType);
assert((doc.last.data as String).endsWith('\n'));
var offset = 0;

@ -47,11 +47,14 @@ abstract base class QuillContainer<T extends Node?> extends Node {
/// Always returns fresh instance.
T get defaultChild;
int? _length;
/// Adds [node] to the end of this container children list.
void add(T node) {
assert(node?.parent == null);
node?.parent = this;
_children.add(node as Node);
clearLengthCache();
}
/// Adds [node] to the beginning of this container children list.
@ -59,6 +62,7 @@ abstract base class QuillContainer<T extends Node?> extends Node {
assert(node?.parent == null);
node?.parent = this;
_children.addFirst(node as Node);
clearLengthCache();
}
/// Removes [node] from this container.
@ -66,6 +70,7 @@ abstract base class QuillContainer<T extends Node?> extends Node {
assert(node?.parent == this);
node?.parent = null;
_children.remove(node as Node);
clearLengthCache();
}
/// Moves children of this node to [newParent].
@ -118,11 +123,20 @@ abstract base class QuillContainer<T extends Node?> extends Node {
.map((e) => e.toPlainText(embedBuilders, unknownEmbedBuilder))
.join();
/// Content length of this node's children.
///
/// To get number of children in this node use [childCount].
@override
int get length => _children.fold(0, (cur, node) => cur + node.length);
int get length {
_length ??= _children.fold(0, (cur, node) => (cur ?? 0) + node.length);
return _length!;
}
@override
void clearLengthCache() {
_length = null;
clearOffsetCache();
if (parent != null) {
parent!.clearLengthCache();
}
}
@override
void insert(int index, Object data, Style? style) {

@ -24,18 +24,39 @@ abstract base class Leaf extends Node {
/// Contents of this node, either a String if this is a [QuillText] or an
/// [Embed] if this is an [BlockEmbed].
Object get value => _value;
set value(Object v) {
_value = v;
_length = null;
clearOffsetCache();
}
Object _value;
@override
Line? get parent => super.parent as Line?;
int? _length;
@override
int get length {
if (_length != null) {
return _length!;
}
if (_value is String) {
return (_value as String).length;
_length = (_value as String).length;
} else {
// return 1 for embedded object
_length = 1;
}
return _length!;
}
@override
void clearLengthCache() {
if (parent != null) {
parent!.clearLengthCache();
}
// return 1 for embedded object
return 1;
}
@override
@ -47,6 +68,7 @@ abstract base class Leaf extends Node {
@override
void insert(int index, Object data, Style? style) {
final length = this.length;
assert(index >= 0 && index <= length);
final node = Leaf(data);
if (index < length) {
@ -75,6 +97,7 @@ abstract base class Leaf extends Node {
@override
void delete(int index, int? len) {
final length = this.length;
assert(index < length);
final local = math.min(length - index, len!);
@ -117,7 +140,7 @@ abstract base class Leaf extends Node {
// Merging it with previous node if style is the same.
final prev = node.previous;
if (!node.isFirst && prev is QuillText && prev.style == node.style) {
prev._value = prev.value + node.value;
prev.value = prev.value + node.value;
node.unlink();
node = prev;
}
@ -125,7 +148,7 @@ abstract base class Leaf extends Node {
// Merging it with next node if style is the same.
final next = node.next;
if (!node.isLast && next is QuillText && next.style == node.style) {
node._value = node.value + next.value;
node.value = node.value + next.value;
next.unlink();
}
}
@ -152,7 +175,7 @@ abstract base class Leaf extends Node {
assert(this is QuillText);
final text = _value as String;
_value = text.substring(0, index);
value = text.substring(0, index);
final split = Leaf(text.substring(index))..applyStyle(style);
insertAfter(split);
return split;

@ -127,11 +127,11 @@ base class Line extends QuillContainer<Leaf?> {
if (style == null) {
return;
}
final thisLength = length;
final length = this.length;
final local = math.min(thisLength - index, len!);
final local = math.min(length - index, len!);
// If index is at newline character then this is a line/block style update.
final isLineFormat = (index + local == thisLength) && local == 1;
final isLineFormat = (index + local == length) && local == 1;
if (isLineFormat) {
assert(
@ -145,7 +145,7 @@ base class Line extends QuillContainer<Leaf?> {
assert(style.values.every((attr) =>
attr.scope == AttributeScope.inline ||
attr.scope == AttributeScope.ignore));
assert(index + local != thisLength);
assert(index + local != length);
super.retain(index, local, style);
}
@ -158,6 +158,7 @@ base class Line extends QuillContainer<Leaf?> {
@override
void delete(int index, int? len) {
final length = this.length;
final local = math.min(length - index, len!);
final isLFDeleted = index + local == length; // Line feed
if (isLFDeleted) {

@ -47,24 +47,41 @@ abstract base class Node extends LinkedListEntry<Node> {
/// Length of this node in characters.
int get length;
void clearLengthCache();
Node clone() => newInstance()..applyStyle(style);
int? _offset;
/// Offset in characters of this node relative to [parent] node.
///
/// To get offset of this node in the document see [documentOffset].
int get offset {
var offset = 0;
if (_offset != null) {
return _offset!;
}
if (list == null || isFirst) {
return offset;
return 0;
}
var offset = 0;
for (final node in list!) {
if (node == this) {
break;
}
offset += node.length;
}
var cur = this;
do {
cur = cur.previous!;
offset += cur.length;
} while (!cur.isFirst);
return offset;
_offset = offset;
return _offset!;
}
void clearOffsetCache() {
_offset = null;
final next = this.next;
if (next != null) {
next.clearOffsetCache();
}
}
/// Offset in characters of this node in the document.
@ -100,6 +117,7 @@ abstract base class Node extends LinkedListEntry<Node> {
assert(entry.parent == null && parent != null);
entry.parent = parent;
super.insertBefore(entry);
clearLengthCache();
}
@override
@ -107,11 +125,13 @@ abstract base class Node extends LinkedListEntry<Node> {
assert(entry.parent == null && parent != null);
entry.parent = parent;
super.insertAfter(entry);
clearLengthCache();
}
@override
void unlink() {
assert(parent != null);
clearLengthCache();
parent = null;
super.unlink();
}

@ -1,6 +1,7 @@
import 'package:meta/meta.dart' show immutable;
import '../../../quill_delta.dart';
import '../../models/documents/document.dart';
import '../documents/attribute.dart';
import '../documents/nodes/embeddable.dart';
import 'rule.dart';
@ -26,9 +27,9 @@ class EnsureLastLineBreakDeleteRule extends DeleteRule {
const EnsureLastLineBreakDeleteRule();
@override
Delta? applyRule(Delta document, int index,
Delta? applyRule(Document document, int index,
{int? len, Object? data, Attribute? attribute}) {
final itr = DeltaIterator(document)..skip(index + len!);
final itr = DeltaIterator(document.toDelta())..skip(index + len!);
return Delta()
..retain(index)
@ -43,9 +44,9 @@ class CatchAllDeleteRule extends DeleteRule {
const CatchAllDeleteRule();
@override
Delta applyRule(Delta document, int index,
Delta applyRule(Document document, int index,
{int? len, Object? data, Attribute? attribute}) {
final itr = DeltaIterator(document)..skip(index + len!);
final itr = DeltaIterator(document.toDelta())..skip(index + len!);
return Delta()
..retain(index)
@ -64,9 +65,9 @@ class PreserveLineStyleOnMergeRule extends DeleteRule {
const PreserveLineStyleOnMergeRule();
@override
Delta? applyRule(Delta document, int index,
Delta? applyRule(Document document, int index,
{int? len, Object? data, Attribute? attribute}) {
final itr = DeltaIterator(document)..skip(index);
final itr = DeltaIterator(document.toDelta())..skip(index);
var op = itr.next(1);
if (op.data != '\n') {
return null;
@ -121,9 +122,9 @@ class EnsureEmbedLineRule extends DeleteRule {
const EnsureEmbedLineRule();
@override
Delta? applyRule(Delta document, int index,
Delta? applyRule(Document document, int index,
{int? len, Object? data, Attribute? attribute}) {
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
var op = itr.skip(index);
final opAfter = itr.skip(index + 1);

@ -1,6 +1,7 @@
import 'package:meta/meta.dart' show immutable;
import '../../../quill_delta.dart';
import '../../models/documents/document.dart';
import '../documents/attribute.dart';
import 'rule.dart';
@ -28,7 +29,7 @@ class ResolveLineFormatRule extends FormatRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -41,7 +42,7 @@ class ResolveLineFormatRule extends FormatRule {
// Apply line styles to all newline characters within range of this
// retain operation.
var result = Delta()..retain(index);
final itr = DeltaIterator(document)..skip(index);
final itr = DeltaIterator(document.toDelta())..skip(index);
Operation op;
for (var cur = 0; cur < len! && itr.hasNext; cur += op.length!) {
op = itr.next(len - cur);
@ -119,7 +120,7 @@ class FormatLinkAtCaretPositionRule extends FormatRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -130,7 +131,7 @@ class FormatLinkAtCaretPositionRule extends FormatRule {
}
final delta = Delta();
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
final before = itr.skip(index), after = itr.next();
int? beg = index, retain = 0;
if (before != null && before.hasAttribute(attribute.key)) {
@ -159,7 +160,7 @@ class ResolveInlineFormatRule extends FormatRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -170,7 +171,7 @@ class ResolveInlineFormatRule extends FormatRule {
}
final delta = Delta()..retain(index);
final itr = DeltaIterator(document)..skip(index);
final itr = DeltaIterator(document.toDelta())..skip(index);
Operation op;
for (var cur = 0; cur < len! && itr.hasNext; cur += op.length!) {
@ -205,7 +206,7 @@ class ResolveImageFormatRule extends FormatRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,

@ -33,7 +33,7 @@ class PreserveLineStyleOnSplitRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -42,8 +42,7 @@ class PreserveLineStyleOnSplitRule extends InsertRule {
if (data is! String || data != '\n') {
return null;
}
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
final before = itr.skip(index);
if (before == null) {
return null;
@ -84,7 +83,7 @@ class PreserveBlockStyleOnInsertRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -94,8 +93,7 @@ class PreserveBlockStyleOnInsertRule extends InsertRule {
// Only interested in text containing at least one newline character.
return null;
}
final itr = DeltaIterator(document)..skip(index);
final itr = DeltaIterator(document.toDelta())..skip(index);
// Look for the next newline.
final nextNewLine = _getNextNewLine(itr);
@ -171,7 +169,7 @@ class AutoExitBlockRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -181,7 +179,7 @@ class AutoExitBlockRule extends InsertRule {
return null;
}
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
final prev = itr.skip(index), cur = itr.next();
final blockStyle = Style.fromJson(cur.attributes).getBlockExceptHeader();
// We are not in a block, ignore.
@ -241,7 +239,7 @@ class ResetLineFormatOnNewLineRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -251,7 +249,7 @@ class ResetLineFormatOnNewLineRule extends InsertRule {
return null;
}
final itr = DeltaIterator(document)..skip(index);
final itr = DeltaIterator(document.toDelta())..skip(index);
final cur = itr.next();
if (cur.data is! String || !(cur.data as String).startsWith('\n')) {
return null;
@ -278,7 +276,7 @@ class InsertEmbedsRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -295,7 +293,7 @@ class InsertEmbedsRule extends InsertRule {
}
final delta = Delta()..retain(index + (len ?? 0));
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
final prev = itr.skip(index), cur = itr.next();
final textBefore = prev?.data is String ? prev!.data as String? : '';
@ -386,7 +384,7 @@ class AutoFormatMultipleLinksRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -397,7 +395,7 @@ class AutoFormatMultipleLinksRule extends InsertRule {
if (data is! String) return null;
// Get current text.
final entireText = Document.fromDelta(document).toPlainText();
final entireText = document.toPlainText();
// Get word before insertion.
final leftWordPart = entireText
@ -502,7 +500,7 @@ class AutoFormatLinksRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -512,7 +510,7 @@ class AutoFormatLinksRule extends InsertRule {
return null;
}
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
final prev = itr.skip(index);
if (prev == null || prev.data is! String) {
return null;
@ -548,7 +546,7 @@ class PreserveInlineStylesRule extends InsertRule {
@override
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -558,7 +556,7 @@ class PreserveInlineStylesRule extends InsertRule {
return null;
}
final itr = DeltaIterator(document);
final itr = DeltaIterator(document.toDelta());
var prev = itr.skip(len == 0 ? index : index + 1);
if (prev == null || prev.data is! String) return null;
@ -628,7 +626,7 @@ class CatchAllInsertRule extends InsertRule {
@override
Delta applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,

@ -14,7 +14,7 @@ abstract class Rule {
const Rule();
Delta? apply(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -35,7 +35,7 @@ abstract class Rule {
/// Applies heuristic rule to an operation on a [document] and returns
/// resulting [Delta].
Delta? applyRule(
Delta document,
Document document,
int index, {
int? len,
Object? data,
@ -85,13 +85,12 @@ class Rules {
Object? data,
Attribute? attribute,
}) {
final delta = document.toDelta();
for (final rule in _customRules + _rules) {
if (rule.type != ruleType) {
continue;
}
try {
final result = rule.apply(delta, index,
final result = rule.apply(document, index,
len: len, data: data, attribute: attribute);
if (result != null) {
return result..trim();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save